|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.wotonomy.control.EODelayedObserver
net.wotonomy.ui.EOAssociation
net.wotonomy.ui.swing.TimedTextAssociation
public class TimedTextAssociation
TimedTextAssociation works like TextAssociation, but instead of using a delayed event to update the model, it uses a timer so that the model is only updated if the user pauses typing for some short interval. This is useful when the update and/or re-read of the model is a costly operation. Bindings are:
Field Summary | |
---|---|
protected boolean |
autoUpdating
|
protected static java.lang.String |
EMPTY_STRING
|
protected java.text.Format |
format
|
protected boolean |
hasDocument
|
protected int |
interval
|
protected boolean |
isListening
|
protected javax.swing.Timer |
keyTimer
|
protected boolean |
needsUpdate
|
protected boolean |
wasNull
|
Fields inherited from class net.wotonomy.ui.EOAssociation |
---|
ActionAspect, ArgumentAspect, aspectToGroup, aspectToKey, AttributeAspectSignature, AttributeToManyAspectSignature, AttributeToOneAspectSignature, AttributeToOneToManyAspectSignature, BoldAspect, ChildrenAspect, control, DestinationAspect, EditableAspect, EnabledAspect, IconAspect, IsLeafAspect, ItalicAspect, LabelAspect, NullAspectSignature, ObjectsAspect, ParentAspect, SelectedObjectAspect, SelectedTitleAspect, SourceAspect, TitlesAspect, ToManyAspectSignature, ToOneAspectSignature, ToOneToManyAspectSignature, URLAspect, ValueAspect, VisibleAspect |
Fields inherited from class net.wotonomy.control.EODelayedObserver |
---|
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird |
Constructor Summary | |
---|---|
TimedTextAssociation(java.lang.Object anObject)
Constructor specifying the object to be controlled by this association. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent evt)
Updates object on action performed. |
static net.wotonomy.foundation.NSArray |
aspects()
Returns a List that describes the aspects supported by this class. |
static net.wotonomy.foundation.NSArray |
aspectSignatures()
Returns a List of aspect signatures whose contents correspond with the aspects list. |
static net.wotonomy.foundation.NSArray |
associationClassesSuperseded()
Returns a List of EOAssociation subclasses that, for the objects that are usable for this association, are less suitable than this association. |
void |
bindAspect(java.lang.String anAspect,
net.wotonomy.ui.EODisplayGroup aDisplayGroup,
java.lang.String aKey)
Binds the specified aspect of this association to the specified key on the specified display group. |
void |
breakConnection()
Breaks the connection between this association and its object. |
boolean |
canBindAspect(java.lang.String anAspect,
net.wotonomy.ui.EODisplayGroup aDisplayGroup,
java.lang.String aKey)
Returns whether this association can bind to the specified display group on the specified key for the specified aspect. |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
boolean |
endEditing()
Forces this association to cause the object to stop editing and validate the user's input. |
void |
establishConnection()
Establishes a connection between this association and the controlled object. |
void |
focusGained(java.awt.event.FocusEvent evt)
Notifies of beginning of edit. |
void |
focusLost(java.awt.event.FocusEvent evt)
Updates object on focus lost and notifies of end of edit. |
java.text.Format |
format()
Gets the Format that is used to convert values from the display group to and from text that is displayed in the component. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
boolean |
isAutoUpdating()
Returns whether the data model is updated for every change in the controlled component. |
static boolean |
isUsableWithObject(java.lang.Object anObject)
Returns whether this class can control the specified object. |
static net.wotonomy.foundation.NSArray |
objectKeysTaken()
Returns a List of properties of the controlled object that are controlled by this class. |
static java.lang.String |
primaryAspect()
Returns the aspect that is considered primary or default. |
protected void |
queueUpdate()
Triggers the key timer to start. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
void |
setAutoUpdating(boolean isAutoUpdating)
Sets whether the data model is updated for every change in the controlled component. |
void |
setFormat(java.text.Format aFormat)
Sets the Format that is used to convert values from the display group to and from text that is displayed in the component. |
void |
subjectChanged()
Called when either the selection or the contents of an associated display group have changed. |
protected boolean |
writeValueToDisplayGroup()
Writes the value currently in the component to the selected object in the display group bound to the value aspect. |
Methods inherited from class net.wotonomy.ui.EOAssociation |
---|
associationClassesForObject, copyMatchingBindingsFromAssociation, displayGroupForAspect, displayGroupKeyForAspect, displayName, object, setValueForAspect, setValueForAspectAtIndex, shouldEndEditing, shouldEndEditingAtIndex, valueForAspect, valueForAspectAtIndex |
Methods inherited from class net.wotonomy.control.EODelayedObserver |
---|
discardPendingNotification, objectWillChange, observerQueue, priority, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean wasNull
protected static final java.lang.String EMPTY_STRING
protected boolean needsUpdate
protected boolean hasDocument
protected boolean isListening
protected java.text.Format format
protected boolean autoUpdating
protected int interval
protected javax.swing.Timer keyTimer
Constructor Detail |
---|
public TimedTextAssociation(java.lang.Object anObject)
Method Detail |
---|
public static net.wotonomy.foundation.NSArray aspectSignatures()
public static net.wotonomy.foundation.NSArray aspects()
public static net.wotonomy.foundation.NSArray associationClassesSuperseded()
public static boolean isUsableWithObject(java.lang.Object anObject)
public static net.wotonomy.foundation.NSArray objectKeysTaken()
public static java.lang.String primaryAspect()
public boolean canBindAspect(java.lang.String anAspect, net.wotonomy.ui.EODisplayGroup aDisplayGroup, java.lang.String aKey)
canBindAspect
in class net.wotonomy.ui.EOAssociation
public void bindAspect(java.lang.String anAspect, net.wotonomy.ui.EODisplayGroup aDisplayGroup, java.lang.String aKey)
bindAspect
in class net.wotonomy.ui.EOAssociation
public void establishConnection()
establishConnection
in class net.wotonomy.ui.EOAssociation
public void breakConnection()
breakConnection
in class net.wotonomy.ui.EOAssociation
public void subjectChanged()
subjectChanged
in class net.wotonomy.ui.EOAssociation
public boolean endEditing()
endEditing
in class net.wotonomy.ui.EOAssociation
protected boolean writeValueToDisplayGroup()
public void setFormat(java.text.Format aFormat)
public java.text.Format format()
public void actionPerformed(java.awt.event.ActionEvent evt)
actionPerformed
in interface java.awt.event.ActionListener
public void focusGained(java.awt.event.FocusEvent evt)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent evt)
focusLost
in interface java.awt.event.FocusListener
public boolean isAutoUpdating()
public void setAutoUpdating(boolean isAutoUpdating)
protected void queueUpdate()
public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
public void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |