Class LayoutFactory.PropertyChangeCheckBoxMenuItem

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, MenuElement, SwingConstants
Enclosing class:
LayoutFactory

public static class LayoutFactory.PropertyChangeCheckBoxMenuItem extends JCheckBoxMenuItem
A JCheckBoxMenuItem that listens for changes of background color, foreground color and font of the given JComponent and adapts it's own settings.

Additionally - as this item has a state - it is possible to let the state be changed from outside (unlike only changing it from the UI): Sth. that seems to have been forgotten in the java implementation. It's state ( JCheckBoxMenuItem.setState(boolean), AbstractButton.setSelected(boolean)) listens on property PROPERTY_SELECTED for changes of the state. These events are normally fired by the custom Action implementations like Chart2DActionSetAxis.

Instances register themselves to receive events from the action given to their constructor.

Author:
Achim Westermann
See Also: