|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JMenuItem
javax.swing.JCheckBoxMenuItem
info.monitorenter.gui.chart.controls.LayoutFactory.PropertyChangeCheckBoxMenuItem
public static class LayoutFactory.PropertyChangeCheckBoxMenuItem
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JCheckBoxMenuItem |
|---|
JCheckBoxMenuItem.AccessibleJCheckBoxMenuItem |
| Nested classes/interfaces inherited from class javax.swing.JMenuItem |
|---|
JMenuItem.AccessibleJMenuItem |
| Nested classes/interfaces inherited from class javax.swing.AbstractButton |
|---|
AbstractButton.AccessibleAbstractButton, AbstractButton.ButtonChangeListener |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
PROPERTY_SELECTED
The property identifying a change of selection. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
|
LayoutFactory.PropertyChangeCheckBoxMenuItem(JComponent component,
Action action,
boolean checked)
Creates an instance with the given name that listens to the components background color, foreground color and font. |
protected |
LayoutFactory.PropertyChangeCheckBoxMenuItem(JComponent component,
boolean checked)
Internal constructor that should not be used unless AbstractButton.setAction(javax.swing.Action) is invoked afterwards on
this instance (else NPE!). |
| Method Summary | |
|---|---|
void |
setAction(Action a)
|
| Methods inherited from class javax.swing.JCheckBoxMenuItem |
|---|
getAccessibleContext, getSelectedObjects, getState, getUIClassID, paramString, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String PROPERTY_SELECTED
| Constructor Detail |
|---|
public LayoutFactory.PropertyChangeCheckBoxMenuItem(JComponent component,
Action action,
boolean checked)
The source of the ActionEvent given to the Action (EventObject.getSource())
will be of type JCheckBoxMenuItem- the state (selected / deselected) may be obtained
from it.
component - The component to whose basic UI properties this item will adapt.action - The Action to trigger when this item is clicked.checked - the inital state of the checkbox.
protected LayoutFactory.PropertyChangeCheckBoxMenuItem(JComponent component,
boolean checked)
AbstractButton.setAction(javax.swing.Action) is invoked afterwards on
this instance (else NPE!).
component - The component to whose basic UI properties this item will adapt.checked - the inital state of the checkbox.| Method Detail |
|---|
public void setAction(Action a)
setAction in class AbstractButtonAbstractButton.setAction(javax.swing.Action)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||