|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wotonomy.control.EODelayedObserver net.wotonomy.ui.EOAssociation
public class EOAssociation
Associations observe DisplayGroups and associate
a user interface component with one or more keys
on the objects in the display group.
Associations are created with a ui component in
the constructor. Then, one or more aspects are
bound to display groups and/or property keys with
the bindAspect() method. Finally, the association
is initialized with the establishConnection()
method.
Per the openstep convention, you do not need to
retain a reference to the association after it is
created; the association will be garbage-collected
when the ui component is garbage-collected.
(Because java components don't have delegates like
openstep components do, java-based associations
will likely need to implement some sort of listener
and add itself to the component's list of listeners
so that the component will have a strong reference
(and the only reference) to the association.)
Field Summary | |
---|---|
static java.lang.String |
ActionAspect
|
static java.lang.String |
ArgumentAspect
|
protected net.wotonomy.foundation.NSMutableDictionary |
aspectToGroup
|
protected net.wotonomy.foundation.NSMutableDictionary |
aspectToKey
|
static java.lang.String |
AttributeAspectSignature
|
static java.lang.String |
AttributeToManyAspectSignature
|
static java.lang.String |
AttributeToOneAspectSignature
|
static java.lang.String |
AttributeToOneToManyAspectSignature
|
static java.lang.String |
BoldAspect
|
static java.lang.String |
ChildrenAspect
|
protected java.lang.Object |
control
|
static java.lang.String |
DestinationAspect
|
static java.lang.String |
EditableAspect
|
static java.lang.String |
EnabledAspect
|
static java.lang.String |
IconAspect
|
static java.lang.String |
IsLeafAspect
|
static java.lang.String |
ItalicAspect
|
static java.lang.String |
LabelAspect
|
static java.lang.String |
NullAspectSignature
|
static java.lang.String |
ObjectsAspect
|
static java.lang.String |
ParentAspect
|
static java.lang.String |
SelectedObjectAspect
|
static java.lang.String |
SelectedTitleAspect
|
static java.lang.String |
SourceAspect
|
static java.lang.String |
TitlesAspect
|
static java.lang.String |
ToManyAspectSignature
|
static java.lang.String |
ToOneAspectSignature
|
static java.lang.String |
ToOneToManyAspectSignature
|
static java.lang.String |
URLAspect
|
static java.lang.String |
ValueAspect
|
static java.lang.String |
VisibleAspect
|
Fields inherited from class net.wotonomy.control.EODelayedObserver |
---|
ObserverNumberOfPriorities, ObserverPriorityFifth, ObserverPriorityFirst, ObserverPriorityFourth, ObserverPriorityImmediate, ObserverPriorityLater, ObserverPrioritySecond, ObserverPrioritySixth, ObserverPriorityThird |
Constructor Summary | |
---|---|
EOAssociation()
Default constructor. |
|
EOAssociation(java.lang.Object anObject)
Constructor specifying the object to be controlled by this association. |
Method Summary | |
---|---|
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 |
associationClassesForObject(java.lang.Object anObject)
Returns all registered subclasses of EOAssociation for which usableWithObject with the specified object returns true. |
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,
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,
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 |
copyMatchingBindingsFromAssociation(EOAssociation anAssociation)
Copies the binding for each aspect in this association that has a matching aspect in the specified association. |
EODisplayGroup |
displayGroupForAspect(java.lang.String anAspect)
Returns the display group that is bound the specified aspect, or null if no display group is currently bound to that aspect. |
java.lang.String |
displayGroupKeyForAspect(java.lang.String anAspect)
Returns the key for the display group bound to the specified aspect, or null if no display group is currently bound to that aspect. |
java.lang.String |
displayName()
The human-readable descriptive name for this association. |
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. |
static boolean |
isUsableWithObject(java.lang.Object anObject)
Returns whether this class can control the specified object. |
java.lang.Object |
object()
Returns the object that is currently controlled by this association, or null if no object is currently controlled. |
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. |
boolean |
setValueForAspect(java.lang.Object aValue,
java.lang.String anAspect)
Writes the specified value for the display group and key currently bound to the specified aspect. |
boolean |
setValueForAspectAtIndex(java.lang.Object aValue,
java.lang.String anAspect,
int anIndex)
Writes the specified value for the display group and key currently bound to the specified aspect, at the specified index (assuming it's an indexed property). |
boolean |
shouldEndEditing(java.lang.String anAspect,
java.lang.String anInvalidInput,
java.lang.String anErrorDescription)
Called by subclasses to notify that the user's input failed validation. |
boolean |
shouldEndEditingAtIndex(java.lang.String anAspect,
java.lang.String anInvalidInput,
java.lang.String anErrorDescription,
int anIndex)
Called by subclasses to notify that the user's input failed validation. |
void |
subjectChanged()
Called when either the selection or the contents of an associated display group have changed. |
java.lang.Object |
valueForAspect(java.lang.String anAspect)
Returns the current value for the display group and key associated with the specified aspect. |
java.lang.Object |
valueForAspectAtIndex(java.lang.String anAspect,
int anIndex)
Returns the current value for the display group and key associated with the specified aspect, and the specified index (assuming multiple values). |
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 |
---|
public static final java.lang.String ActionAspect
public static final java.lang.String EnabledAspect
public static final java.lang.String SourceAspect
public static final java.lang.String ArgumentAspect
public static final java.lang.String ParentAspect
public static final java.lang.String TitlesAspect
public static final java.lang.String BoldAspect
public static final java.lang.String SelectedObjectAspect
public static final java.lang.String ValueAspect
public static final java.lang.String DestinationAspect
public static final java.lang.String SelectedTitleAspect
public static final java.lang.String URLAspect
public static final java.lang.String ItalicAspect
public static final java.lang.String ChildrenAspect
public static final java.lang.String IsLeafAspect
public static final java.lang.String EditableAspect
public static final java.lang.String VisibleAspect
public static final java.lang.String ObjectsAspect
public static final java.lang.String LabelAspect
public static final java.lang.String IconAspect
public static final java.lang.String AttributeAspectSignature
public static final java.lang.String NullAspectSignature
public static final java.lang.String AttributeToOneAspectSignature
public static final java.lang.String ToOneAspectSignature
public static final java.lang.String AttributeToOneToManyAspectSignature
public static final java.lang.String ToOneToManyAspectSignature
public static final java.lang.String AttributeToManyAspectSignature
public static final java.lang.String ToManyAspectSignature
protected java.lang.Object control
protected net.wotonomy.foundation.NSMutableDictionary aspectToGroup
protected net.wotonomy.foundation.NSMutableDictionary aspectToKey
Constructor Detail |
---|
public EOAssociation()
public EOAssociation(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 associationClassesForObject(java.lang.Object anObject)
public static net.wotonomy.foundation.NSArray associationClassesSuperseded()
public void bindAspect(java.lang.String anAspect, EODisplayGroup aDisplayGroup, java.lang.String aKey)
public void breakConnection()
public boolean canBindAspect(java.lang.String anAspect, EODisplayGroup aDisplayGroup, java.lang.String aKey)
public void copyMatchingBindingsFromAssociation(EOAssociation anAssociation)
public EODisplayGroup displayGroupForAspect(java.lang.String anAspect)
public java.lang.String displayGroupKeyForAspect(java.lang.String anAspect)
public java.lang.String displayName()
public boolean endEditing()
public void establishConnection()
public static boolean isUsableWithObject(java.lang.Object anObject)
public java.lang.Object object()
public static net.wotonomy.foundation.NSArray objectKeysTaken()
public static java.lang.String primaryAspect()
public boolean setValueForAspect(java.lang.Object aValue, java.lang.String anAspect)
public boolean setValueForAspectAtIndex(java.lang.Object aValue, java.lang.String anAspect, int anIndex)
public boolean shouldEndEditing(java.lang.String anAspect, java.lang.String anInvalidInput, java.lang.String anErrorDescription)
public boolean shouldEndEditingAtIndex(java.lang.String anAspect, java.lang.String anInvalidInput, java.lang.String anErrorDescription, int anIndex)
public void subjectChanged()
subjectChanged
in class net.wotonomy.control.EODelayedObserver
public java.lang.Object valueForAspect(java.lang.String anAspect)
public java.lang.Object valueForAspectAtIndex(java.lang.String anAspect, int anIndex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |