All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sgi.sysadm.ui.taskData.BooleanAbstractButtonBinder

java.lang.Object
   |
   +----com.sgi.sysadm.ui.taskData.TaskDataBinder
           |
           +----com.sgi.sysadm.ui.taskData.BooleanAbstractButtonBinder

public class BooleanAbstractButtonBinder
extends TaskDataBinder
implements ChangeListener
BooleanAbstractButtonBinder keeps a piece of Boolean TaskData synchronized with an AbstractButton (such as JCheckBox). If TaskData changes then BooleanAbstractButtonBinder changes the AbstractButton, and if the AbstractButton changes then BooleanAbstractButtonBinder changes the TaskData.


Constructor Index

 o BooleanAbstractButtonBinder(AbstractButton)
Construct a BooleanAbstractButtonBinder.
 o BooleanAbstractButtonBinder(AbstractButton, boolean)
Construct a BooleanAbstractButtonBinder.

Method Index

 o bind(TaskData, String, AbstractButton)
Bind the Attribute name in taskData to button, so that when button changes the Attribute is updated and vice versa. Deprecated.
 o bind(TaskData, String, AbstractButton, boolean)
Bind the Attribute name in taskData to button, so that when button changes the Attribute is updated and vice versa. Deprecated.
 o stateChanged(ChangeEvent)
Called when the selection state of our button changes.
 o taskDataChanged(TaskDataEvent)
Called when our task data changes.

Constructors

 o BooleanAbstractButtonBinder
 public BooleanAbstractButtonBinder(AbstractButton button)
Construct a BooleanAbstractButtonBinder. Add this as a ChangeListener to button to keep it in sync with TaskData.

Parameters:
button - AbstractButton to keep synchronized.
 o BooleanAbstractButtonBinder
 public BooleanAbstractButtonBinder(AbstractButton button,
                                    boolean value)
Construct a BooleanAbstractButtonBinder. Add this as a ChangeListener to button to keep it in sync with TaskData.

Parameters:
button - AbstractButton to keep synchronized.
value - Value corresponding to set state of button. If value is false, the button will be selected when the task data is false.

Methods

 o bind
 public static void bind(TaskData taskData,
                         String name,
                         AbstractButton button)
Note: bind() is deprecated. Use taskData.addTaskDataBinder(name, new BooleanAbstractButtonBinder(button))

Bind the Attribute name in taskData to button, so that when button changes the Attribute is updated and vice versa.

Parameters:
taskData - TaskData to bind.
name - name of Attribute to bind.
button - AbstractButton to bind.
 o bind
 public static void bind(TaskData taskData,
                         String name,
                         AbstractButton button,
                         boolean value)
Note: bind() is deprecated. Use taskData.addTaskDataBinder(name, new BooleanAbstractButtonBinder(button, value))

Bind the Attribute name in taskData to button, so that when button changes the Attribute is updated and vice versa.

Parameters:
taskData - TaskData to bind.
name - name of Attribute to bind.
button - AbstractButton to bind.
value - Value corresponding to set state of button.
 o taskDataChanged
 public void taskDataChanged(TaskDataEvent event)
Called when our task data changes. Update our button.

Parameters:
event - TaskDataEvent.
Overrides:
taskDataChanged in class TaskDataBinder
 o stateChanged
 public void stateChanged(ChangeEvent event)
Called when the selection state of our button changes. Update our task data.

Parameters:
event - ChangeEvent.

All Packages  Class Hierarchy  This Package  Previous  Next  Index