This mixin provides standard methods used by a CollectionView to provide additional meta-data about content in a collection view such as selection or enabled state.
You can apply this mixin to a class that you set as a delegate or to the object you set as content.
Defined in: collection_content.js
- SproutCore 1.0
- contentGroupIndexes(collection, content)
- contentIndexCollapse(collection, content, idx)
- contentIndexDisclosureState(collection, content, idx)
- contentIndexExpand(collection, content, idx)
- contentIndexIsEnabled(collection, content, idx)
- contentIndexIsGroup(collection, content, idx)
- contentIndexIsSelected(collection, content, idx)
- contentIndexOutlineLevel(collection, content, idx)
Field DetailSC.CollectionContent.isCollectionContent Boolean
Class Method Detail
Optionally return an index set containing the indexes that may be group
views. For each group view, the delegate will actually be asked to
confirm the view is a group using the
If grouping is not enabled, return null.
Called to collapse a content index item if it is currently in an open disclosure state. The default implementation does nothing.
Returns a constant indicating the disclosure state of the item. Must be
SC.LEAF_NODE. If you return one
of the BRANCH options then the item may be rendered with a disclosure
triangle open or closed. If you return
SC.LEAF_NODe then the item will
be rendered as a leaf node.
Called to expand a content index item if it is currently in a closed disclosure state. The default implementation does nothing.
YES if the content index should be enabled. Default looks at the
isEnabled state of the collection view.
YES if the item at the specified content index should be rendered
groupExampleView instead of the regular
exampleView. Note that
a group view is different from a branch/leaf view. Group views often
appear with different layout and a different look and feel.
Default always returns
YES if the content index should be selected. Default behavior
looks at the selection property on the view.
Returns the outline level for the item at the specified index. Can be used to display hierarchical lists.
Default always returns -1 (no outline).