|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.jguiraffe.gui.platform.swing.builder.action.SwingCheckedItemController
class SwingCheckedItemController
A helper class used for controlling the checked property of
action controls.
Swing does not directly support the checked property for
actions that is required by the action builder framework. Here it is possible
to create checked menu items or toolbar buttons whose checked
state is connected to the corresponding action. This class establishes such a
connection. It registers itself as a PropertyChangeListener at
a Swing action. Whenever the value of the checked property
changes, the associated control is updated, too. The other direction is also
supported: If the checked state of a control is changed, the
action will be notified.
| Constructor Summary | |
|---|---|
SwingCheckedItemController(SwingFormAction formAction,
javax.swing.AbstractButton aButton)
Creates a new instance of SwingCheckedItemController and
initializes it. |
|
| Method Summary | |
|---|---|
SwingFormAction |
getAction()
Returns the wrapped Swing form action object. |
javax.swing.AbstractButton |
getButton()
Returns the wrapped button component. |
void |
itemStateChanged(java.awt.event.ItemEvent event)
Reacts on state changes of the associated button. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Reacts on property change events of the associated action. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwingCheckedItemController(SwingFormAction formAction,
javax.swing.AbstractButton aButton)
SwingCheckedItemController and
initializes it.
formAction - the action that must be associated with the controlaButton - the button controlled by this object| Method Detail |
|---|
public javax.swing.AbstractButton getButton()
public SwingFormAction getAction()
public void propertyChange(java.beans.PropertyChangeEvent event)
checked property is affected, the button's state is
updated.
propertyChange in interface java.beans.PropertyChangeListenerevent - the change eventpublic void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged in interface java.awt.event.ItemListenerevent - the item event
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||