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.


Constructor Index

 o StringJTextComponentBinder(JTextComponent)
Construct a StringJTextComponentBinder.

Method Index

 o 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.
 o changedUpdate(DocumentEvent)
Called when our JTextComponent changes.
 o insertUpdate(DocumentEvent)
Called when our JTextComponent changes.
 o removeUpdate(DocumentEvent)
Called when our JTextComponent changes.
 o taskDataChanged(TaskDataEvent)
Called when our TaskData Attribute changes.

Constructors

 o 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.

Methods

 o 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.
 o taskDataChanged
 public void taskDataChanged(TaskDataEvent event)
Called when our TaskData Attribute changes. Update our JTextComponent.

Parameters:
event - the TaskDataEvent.
Overrides:
taskDataChanged in class TaskDataBinder
 o changedUpdate
 public void changedUpdate(DocumentEvent event)
Called when our JTextComponent changes. Update our TaskData Attribute.

Parameters:
event - the DocumentEvent.
 o insertUpdate
 public void insertUpdate(DocumentEvent event)
Called when our JTextComponent changes. Update our TaskData Attribute.

Parameters:
event - the DocumentEvent.
 o 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