- Inherits from:
- (com.apple.client.eointerface) EOAssociation : EODelayedObserver (EOControl) : Object
(com.apple.yellow.eointerface) EOAssociation : EODelayedObserver (EOControl) : NSObject
- Implements:
- EOObserving (EODelayedObserver)
- (com.apple.client.eointerface only) java.awt.event.FocusListener
- (com.apple.client.eointerface only) NSDisposable (EOAssociation)
- Package:
- com.apple.client.eointerface
- com.apple.yellow.eointerface
In a Java Client application (using com.apple.client.eointerface), an EOTextAssociation object displays a plain text attribute in an EOTextField, EOTextArea, or EOFormCell by binding the text object to a string. Text is written back to the object as a String.
In a com.apple.yellow.eointerface application, an EOTextAssociation object displays a plain or rich text attribute in an NSText object (Application Kit) by binding the text object to a string or NSData attribute. It determines the kind of text received from an object by examining the beginning for signature codes specific to RTF and RTFD. When writing text back to the object, the association examines the configuration of the NSText object to determine the type to use according to the following table:
Multiple Fonts | Allows Graphics | Type Written to Object |
NO | NO | NSString text |
YES | NO | NSData containing RTF |
YES | YES | NSData containing RTFD |
The following tables describe the display objects an EOTextAssociation can be used with, the aspects of an EOTextAssociation, and the object keys it takes.
Usable With |
(com.apple.client.eointerface) EOTextField, EOTextArea, EOFormCell |
(com.apple.yellow.eointerface) NSText, NSTextView |
Aspects | |
value | A text attribute of the selected object. |
(com.apple.yellow.eointerface only) editable | A boolean attribute of the selected object, which determines whether the text object is editable. |
(com.apple.client.eointerface only) enabled | A boolean attribute of the selected object, which determines whether the text object is enabled. |
Object Keys Taken | |
(com.apple.yellow.eointerface only) delegate | An EOTextAssociation accepts delegate messages related to the editing and validation of text; see the NSText and NSTextView class specifications for more information. |
public
EOTextAssociation
(Object aDisplayObject)
You normally set up associations with the Interface Builder application, in which case you don't need to create them programmatically. However, if you do create them up programmatically, setting them up is a multi-step process. After creating an association, you must bind its aspects and establish its connections.
See Also: bindAspect (EOAssociation), establishConnection (EOAssociation)
public void
breakConnection
()
public void
endEditing
()
public void
establishConnection
()
public void
focusGained
(java.awt.event.FocusEvent aFocusEvent)
focusGained
is invoked when the
user selected the display object in order to edit its value.public void
focusLost
(java.awt.event.FocusEvent aFocusEvent)
public java.text.Format
format
()
ValueAspect
for
display and editing.public boolean
isUsableWithObject
(Object aDisplayObject)
true
if aDisplayObject implements
the EOTextAssociation.JTextComponentAccess interface
and if its jTextComponent is non null
, false
otherwise.See Also: isUsableWithObject ( EOAssociation)
public String
primaryAspect
()
public void
setFormat
(java.text.Format aFormat)
public void
subjectChanged
()