
Public Member Functions | |
| ColoredEditorHelper (PropertyEditor ped, ColorMaster colorMaster) | |
| void | paintValue (Graphics g, Rectangle rectangle) |
| boolean | isPaintable () |
Private Attributes | |
| Color | currentColor |
| final ColorMaster | colorMaster |
| final PropertyEditor | ped |
A helper class used to build editors that set the background color of the field they edit. Normally, this class is used inside an Editor class that cannot inherit from ColoredEditorSupport. In this case, that editor delegates the paintValue and the isPaintable calls to this class.
This uses the Tie-delegation idiom.
| cern::gp::beans::editors::support::ColoredEditorHelper::ColoredEditorHelper | ( | PropertyEditor | ped, | |
| ColorMaster | colorMaster | |||
| ) | [inline] |
Constructor
| ped | the property editor, that owns this object, needed to know the text to be displayed | |
| colorMaster | the class that knows what color shall be used |
| boolean cern::gp::beans::editors::support::ColoredEditorHelper::isPaintable | ( | ) | [inline] |
the method that determines whether the text shall be drawn using the paintValue() method This method is delegated to from the Editor
References colorMaster, cern::gp::beans::editors::support::ColorMaster::getBackgroundColor(), and cern::gp::beans::editors::support::ColorMaster::getForegroundColor().
Referenced by cern::gp::explorer::test::helpers::ColoredIntegerEditor::isPaintable(), and cern::laser::guiplatform::alarms::editors::AlarmColoredEditor::isPaintable().
| void cern::gp::beans::editors::support::ColoredEditorHelper::paintValue | ( | Graphics | g, | |
| Rectangle | rectangle | |||
| ) | [inline] |
method that draws the text retrieved from PropertyEditor with the given background given by ColorMaster. This method is delegated to from the Editor
References colorMaster, cern::gp::beans::editors::support::ColorMaster::getBackgroundColor(), cern::gp::beans::editors::support::ColorMaster::getForegroundColor(), and ped.
Referenced by cern::gp::explorer::test::helpers::ColoredIntegerEditor::paintValue(), and cern::laser::guiplatform::alarms::editors::AlarmColoredEditor::paintValue().
Referenced by isPaintable(), and paintValue().
final PropertyEditor cern::gp::beans::editors::support::ColoredEditorHelper::ped [private] |
Referenced by paintValue().
1.6.2