All Packages Class Hierarchy This Package Previous Next Index
Class com.sgi.sysadm.ui.taskData.StringJTextComponentBinder
java.lang.Object
|
+----com.sgi.sysadm.ui.taskData.TaskDataBinder
|
+----com.sgi.sysadm.ui.taskData.StringJTextComponentBinder
- public class StringJTextComponentBinder
- extends TaskDataBinder
- implements DocumentListener
StringJTextComponentBinder keeps a piece of String TaskData
synchronized with a JTextComponent. If the TaskData changes
then StringJTextFieldBinder changes the JTextComponent, and if the
JTextComponent changes then StringJTextComponentBinder changes the
TaskData.
-
StringJTextComponentBinder(JTextComponent)
- Construct a StringJTextComponentBinder.
-
bind(TaskData, String, JTextComponent)
- Bind the Attribute name in taskData to
text, so that when text changes the Attribute
is updated and vice versa.
Deprecated.
-
changedUpdate(DocumentEvent)
- Called when our JTextComponent changes.
-
insertUpdate(DocumentEvent)
- Called when our JTextComponent changes.
-
removeUpdate(DocumentEvent)
- Called when our JTextComponent changes.
-
taskDataChanged(TaskDataEvent)
- Called when our TaskData Attribute changes.
StringJTextComponentBinder
public StringJTextComponentBinder(JTextComponent text)
- Construct a StringJTextComponentBinder. Add this as a
DocumentListener to text to keep it in sync with
TaskData.
- Parameters:
- text - JTextComponent to keep synchronized.
bind
public static void bind(TaskData taskData,
String name,
JTextComponent text)
- Note: bind() is deprecated.
Use
taskData.addTaskDataBinder(name,
new StringJTextComponentBinder(text))
- Bind the Attribute name in taskData to
text, so that when text changes the Attribute
is updated and vice versa.
- Parameters:
- taskData - TaskData to bind.
- name - name of Attribute to bind.
- text - JTextComponent to bind.
taskDataChanged
public void taskDataChanged(TaskDataEvent event)
- Called when our TaskData Attribute changes. Update our
JTextComponent.
- Parameters:
- event - the TaskDataEvent.
- Overrides:
- taskDataChanged in class TaskDataBinder
changedUpdate
public void changedUpdate(DocumentEvent event)
- Called when our JTextComponent changes. Update our TaskData
Attribute.
- Parameters:
- event - the DocumentEvent.
insertUpdate
public void insertUpdate(DocumentEvent event)
- Called when our JTextComponent changes. Update our TaskData
Attribute.
- Parameters:
- event - the DocumentEvent.
removeUpdate
public void removeUpdate(DocumentEvent event)
- Called when our JTextComponent changes. Update our TaskData
Attribute.
- Parameters:
- event - the DocumentEvent.
All Packages Class Hierarchy This Package Previous Next Index