EOOutlineViewAssociation
- Inherits from:
- EOTableViewAssociation : EOAssociation : EODelayedObserver (EOControl) : NSObject
- Conforms to:
- NSCoding
- (EOAssociation)
- EOObserving (EODelayedObserver)
- NSObject (NSObject)
Declared in:
- EOInterface/EOOutlineAssociation.h
Class Description
The EOOutlineViewAssociation is an uncoventional EOAssociation to manage a hierarchy of EOEnterprise Objects. Whereas other EOAssociations do not modify the displayedObjects of its source EODisplayGroup directly, the EOOutlineViewAssociation will reflect the visible items (scrolling area non-withstanding) of the NSOutlineView in the set of displayedObjects of it's EODisplayGroup. The currently selected items will be reflected in the selectedObjects. allObjects will actually be "all root objects".
As a hierarchy of EOEnterprise Objects is likely to contain objects of different classes, the EODataSource and therefore by extension the EODisplayGroup can only be used for the initial fetch of the root objects, but can not be used to insert or delete objects. This has to be done manually (for now).
If no EOColumnAssociation is connected to a particular NSTableColumn
of the NSOutlineView, the EOOutlineViewAssociation will format the NSCell during display of each row for this tableColumn using the enabled, textColor, bold, italic
aspects. Otherwise the EOColumnAssociation will override this behaviour. The identifier of the NSTableColumn
will be used as the key to access the value (using key-value coding) for the currently to be displayed EOEnterprise Object.
Usable with |
---|
NSOutlineView (AppKit) |
Aspect | Description |
---|---|
source | connect this aspect to the EODisplayGroup that contains the EOEnterprise Objects to display in the NSOutlineView. This aspect doesn't use a key. |
children | provides the expandable subitems of a NSOutlineView row. Only the key is used, the connected EODisplayGroup is ignored. |
parent | provides the parent containing this item of a NSOutlineView row, the top item will be nil. Only the key is used, the connected EODisplayGroup is ignored. |
enabled | this boolean aspect controls the enabled state of the NSCell to be displayed. If a NSTableColumn is not under control of an EOColumnAssociation instance (or one of its subclasses), this aspect will be used. |
textColor | same as for enabled but allows change of the color of a text NSCell. |
bold | same as for textColor but allows changing of the font to a bold version for the text of the NSCell. |
italic | same as for bold but changes the font to an italic version. |
Object Keys Taken | Description |
---|---|
dataSource | EOOutlineViewAssociation acts as the datasource to the NSOutlineView |
delegate | delegate messages from the NSOutlineView are processed and, if applicable, forwarded to the EOColumnAssociations |
target | this is not really used, but marked as taken for compatibility |
Examples
Need an example