|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.DefaultButtonModel | +--javax.swing.JToggleButton.ToggleButtonModel | +--org.joda.swing.binder.PropertyCheckBoxModel
JCheckBox model that binds to an property. Use of this model is best achieved by using SwingBinder.
This class can be used for both mutable and immutable properties. Immutable properties cannot be updated by the swing GUI, however they will update correctly if their value changes.
Field Summary |
Fields inherited from class javax.swing.DefaultButtonModel |
actionCommand, ARMED, changeEvent, ENABLED, group, listenerList, mnemonic, PRESSED, ROLLOVER, SELECTED, stateMask |
Constructor Summary | |
PropertyCheckBoxModel()
Constructor |
|
PropertyCheckBoxModel(javax.swing.JCheckBox comp,
DataProperty property)
Constructor that binds to a particular property. |
Method Summary | |
protected void |
activate()
Activate the connection between the GUI and the model |
void |
bind(javax.swing.JComponent component,
Property property)
Bind a Property object to the component. |
protected void |
deactivate()
Deactivate the connection between the GUI and the model |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Handle programmatic changes made to the property by updating the swing model. |
void |
setActive(boolean active)
Set the model to GUI binding as active or inactive |
void |
setArmed(boolean b)
|
void |
setPressed(boolean b)
|
void |
setRollover(boolean b)
|
void |
setSelected(boolean selected)
Called when the checkbox is selected. |
Methods inherited from class javax.swing.JToggleButton.ToggleButtonModel |
isSelected |
Methods inherited from class javax.swing.DefaultButtonModel |
addActionListener, addChangeListener, addItemListener, fireActionPerformed, fireItemStateChanged, fireStateChanged, getActionCommand, getActionListeners, getChangeListeners, getGroup, getItemListeners, getListeners, getMnemonic, getSelectedObjects, isArmed, isEnabled, isPressed, isRollover, removeActionListener, removeChangeListener, removeItemListener, setActionCommand, setEnabled, setGroup, setMnemonic |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PropertyCheckBoxModel()
public PropertyCheckBoxModel(javax.swing.JCheckBox comp, DataProperty property)
Method Detail |
public void setSelected(boolean selected)
setSelected
in interface javax.swing.ButtonModel
setSelected
in class javax.swing.JToggleButton.ToggleButtonModel
public void setPressed(boolean b)
setPressed
in interface javax.swing.ButtonModel
setPressed
in class javax.swing.JToggleButton.ToggleButtonModel
ButtonModel.setPressed(boolean)
public void setArmed(boolean b)
setArmed
in interface javax.swing.ButtonModel
setArmed
in class javax.swing.DefaultButtonModel
ButtonModel.setArmed(boolean)
public void setRollover(boolean b)
setRollover
in interface javax.swing.ButtonModel
setRollover
in class javax.swing.DefaultButtonModel
ButtonModel.setRollover(boolean)
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
event
- the property change eventpublic void setActive(boolean active)
setActive
in interface JComponentBinder
protected void activate()
protected void deactivate()
public void bind(javax.swing.JComponent component, Property property)
JComponentBinder
bind
in interface JComponentBinder
component
- the component to bindproperty
- the property to bind toJComponentBinder.bind(JComponent,Property)
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |