|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.joda.swing.SwingBinder
SwingBinder controls and manages the connection between the Swing GUI and the Joda property model.
It is used as follows:
Person person = new PersonBean();
JTextField textField = new JTextField();
SwingBinder binder = new SwingBinder();
binder.bind(textField, person.surname());
SwingBinder features an active flag controlled by setActive(). This allows large changes to the model to be made without immediate effect on the GUI. When complete, the binder is reactivated and the GUI updates.
Constructor Summary | |
SwingBinder()
Constructor |
|
SwingBinder(boolean active)
Constructor |
Method Summary | |
void |
bind(javax.swing.JComponent component,
Property property)
Bind a JComponent to a property. |
boolean |
getActive()
Gets the active flag. |
void |
setActive(boolean active)
Sets the active flag. |
java.lang.String |
toString()
Debugging toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SwingBinder()
public SwingBinder(boolean active)
Method Detail |
public boolean getActive()
public void setActive(boolean active)
active
- whether the binder is active or notpublic void bind(javax.swing.JComponent component, Property property)
public java.lang.String toString()
toString
in class java.lang.Object
|
Joda System API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |