Methods


initWithView:andLabel:
Initializes an instance.
viewListView
Returns the owning MOViewListView.
setViewListView:
Sets the owning MOViewListView.
view
Returns the item's view.
setView:
Sets the item's view.
label
Returns the item's label.
setLabel:
Sets the item's label.
identifier
Returns the item's identifier.
setIdentifier:
Sets the item's identifier.
representedObject
Returns the item's representedObject.
setRepresentedObject:
Sets the item's representedObject.
userInfo
Returns the item's userInfo.
setUserInfo:
Sets the item's userInfo.
isCollapsed
Returns whether the item is collapsed.
labelYPosition
Returns the y position of the top of the item's label rect within the MOViewListView.

identifier

Returns the item's identifier.
- ( id ) identifier;

This method returns the item's identifier (if any). MOViewListView does not ever look at or use this object. You can set any object as the identifier and use it however you like. Traditionally identifiers are NSStrings, but they need not be. The identifier is retained by the MOViewListViewItem.

method result
The item's identifier.

initWithView:andLabel:

Initializes an instance.
- ( id ) initWithView:
        (NSView *) view andLabel:
        (NSString *) label;

Designated Initializer. Initializes the receiver with the given view and label.

Parameter Descriptions
view
The view for this item. This can be nil, and will be in cases where lazy nib loading is desired.
label
The label to use in the MOViewListView for this item.
method result
The initialized instance.

isCollapsed

Returns whether the item is collapsed.
- ( BOOL ) isCollapsed;

This method returns whether the item is collapsed. This state is managed by the MOViewListView and cannot be modified directly.

method result
Whether the item is collapsed.

label

Returns the item's label.
- ( NSString *) label;

This method returns the item's label (if any).

method result
The item's label.

labelYPosition

Returns the y position of the top of the item's label rect within the MOViewListView.
- ( float ) labelYPosition;

This method returns the y position of the top of the item's label rect within the MOViewListView. This position is managed by the MOViewListView and cannot be modified directly.

method result
The y position of the top of the item's label rect within the MOViewListView.

representedObject

Returns the item's representedObject.
- ( id ) representedObject;

This method returns the item's representedObject (if any). MOViewListView does not ever look at or use this object. You can set any object as the representedObject and use it however you like. One good use for this is to keep a pointer to the controller object responsible for the item's view. The representedObject is retained by the MOViewListViewItem.

method result
The item's representedObject.

setIdentifier:

Sets the item's identifier.
- ( void ) setIdentifier:
        (id ) identifier;

This method sets the item's identifier. MOViewListView does not ever look at or use this object. You can set any object as the identifier and use it however you like. Traditionally identifiers are NSStrings, but they need not be. The identifier is retained by the MOViewListViewItem.

Parameter Descriptions
identifier
The identifier.

setLabel:

Sets the item's label.
- ( void ) setLabel:
        (NSString *) label;

Sets the item's label. If the item has a viewLisView, this method invalidates display for the item's label rect.

Parameter Descriptions
label
The label.

setRepresentedObject:

Sets the item's representedObject.
- ( void ) setRepresentedObject:
        (id ) obj;

This method sets the item's representedObject. MOViewListView does not ever look at or use this object. You can set any object as the representedObject and use it however you like. One good use for this is to keep a pointer to the controller object responsible for the item's view. The representedObject is retained by the MOViewListViewItem.

Parameter Descriptions
obj
The representedObject.

setUserInfo:

Sets the item's userInfo.
- ( void ) setUserInfo:
        (id ) userInfo;

This method sets the item's userInfo (if any). MOViewListView does not ever look at or use this object. You can set any object as the userInfo and use it however you like. Traditionally userInfos are NSDictionaries, but they need not be. The userInfo is retained by the MOViewListViewItem.

Parameter Descriptions
The
userInfo.

setView:

Sets the item's view.
- ( void ) setView:
        (NSView *) view;

Sets the item's view. This method can be called from the MOViewListView's delegate's -viewListView:willExpandViewListViewItem: method to implement lazy view loading. If the item has a viewListView then this method will stop the MOViewListView from observing the old view's frame and will start the MOViewListView observing the new view's frame.

Parameter Descriptions
view
The view.

setViewListView:

Sets the owning MOViewListView.
- ( void ) setViewListView:
        (MOViewListView *) viewListView;

Sets the owning MOViewListView. This method is automatically called by MOViewListView and should not be called directly, but it can be overridden by subclasses. Overriders should be sure to call super. If the item has a view then this method will stop the old MOViewListView from observing its frame and will start the new MOViewListView observing its frame.

Parameter Descriptions
viewListView
owning MOViewListView.

userInfo

Returns the item's userInfo.
- ( id ) userInfo;

This method returns the item's userInfo (if any). MOViewListView does not ever look at or use this object. You can set any object as the userInfo and use it however you like. Traditionally userInfos are NSDictionaries, but they need not be. The userInfo is retained by the MOViewListViewItem.

method result
The item's userInfo.

view

Returns the item's view.
- ( NSView *) view;

This method returns the item's view (if any).

method result
The item's view.

viewListView

Returns the owning MOViewListView.
- ( MOViewListView *) viewListView;

This method returns the MOViewListView that owns the receiver (or nil, if the item is not currently being managed by any MOViewListView).

method result
The owning MOViewListView.

(Last Updated 3/20/2005)