blob: bd76ca0e532445c3601b1297a8405426aa8ee2ae [file] [log] [blame]
{ "type": "interface",
"qname": "mx.collections.ICollectionView",
"baseInterfaceNames": [
"org.apache.royale.events.IEventDispatcher"]
,
"description": "An <code>ICollectionView</code> is a view onto a collection of data. The view can be modified to show the data sorted according to various criteria or reduced by filters without modifying the underlying data. An IViewCursor provides to access items within a collection. You can modify the collection by using the IViewCursor interface <code>insert()</code> and <code>remove()</code> methods. <p>An <code>ICollectionView</code> may be a view onto data that has been retrieved from a remote location. When Implementing this interface for data that may be remote it is important to handle the case where data may not yet be available, which is indicated by the <code>ItemPendingError</code>.</p> <p>The <code>IList</code> interface is an alternative to the <code>ICollectionView</code> interface.</p>",
"tags": [
{ "tagName": "see",
"values": ["mx.collections.IViewCursor", "mx.collections.errors.ItemPendingError", "mx.collections.IList"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "accessor",
"access": "read-only",
"return": "int",
"qname": "length",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The number of items in this view. 0 means no items, while -1 means that the length is unknown.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Function",
"qname": "filterFunction",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "A function that the view will use to eliminate items that do not match the function's criteria. A filterFunction is expected to have the following signature: <pre>f(item:Object):Boolean</pre> where the return value is <code>true</code> if the specified item should remain in the view. <p>If a filter is unsupported, Flex throws an error when accessing this property. You must call <code>refresh()</code> after setting the <code>filterFunction</code> property for the view to update.</p> <p>Note: The Flex implementations of ICollectionView retrieve all items from a remote location before executing the filter function. If you use paging, apply the filter to the remote collection before you retrieve the data.</p>",
"tags": [
{ "tagName": "see",
"values": ["#refresh()"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "mx.collections.ISort",
"qname": "sort",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The ISort that will be applied to the ICollectionView. Setting the sort does not automatically refresh the view, so you must call the <code>refresh()</code> method after setting this property. If sort is unsupported an error will be thrown when accessing this property. <p>Note: The Flex implementations of ICollectionView retrieve all items from a remote location before executing a sort. If you use paging with a sorted list, apply the sort to the remote collection before you retrieve the data.</p>",
"tags": [
{ "tagName": "see",
"values": ["#refresh()"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "method",
"qname": "createCursor",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Creates a new IViewCursor that works with this view.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["A new IViewCursor implementation."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "mx.collections.IViewCursor",
"params": []}
,
{ "type": "method",
"qname": "contains",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Returns whether the view contains the specified object. Unlike the <code>IViewCursor.find<i>xxx</i></code> methods, this search is succesful only if it finds an item that exactly matches the parameter. If the view has a filter applied to it this method may return <code>false</code> even if the underlying collection does contain the item. contains the item; false otherwise.",
"tags": [
{ "tagName": "param",
"values": ["item The object to look for."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["true if the ICollectionView, after applying any filter,"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": [{ "name": "item", "type": "Object"}]}
,
{ "type": "method",
"qname": "disableAutoUpdate",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Prevents changes to the collection itself and items within the collection from being dispatched by the view. Also prevents the view from updating the positions of items if the positions change in the collection. The changes will be queued and dispatched appropriately after <code>enableAutoUpdate</code> is called. If more events than updates to a single item occur, the view may end up resetting. The <code>disableAutoUpdate</code> method acts cumulatively; the same number of calls to <code>enableAutoUpdate</code> are required for the view to dispatch events and refresh. Note that <code>disableAutoUpdate</code> only affects the individual view; edits may be detected on an individual basis by other views.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "enableAutoUpdate",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Enables auto-updating. See <code>disableAutoUpdate</code> for more information.",
"tags": [
{ "tagName": "see",
"values": ["#disableAutoUpdate()"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "itemUpdated",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Notifies the view that an item has been updated. This method is useful if the contents of the view do not implement <code>IPropertyChangeNotifier</code>. If the call to this method includes a <code>property</code> parameter, the view may be able to optimize its notification mechanism. Otherwise it may choose to simply refresh the whole view. was null, this can be the old value of the item.). was null, there's no need to specify this as the item is assumed to be the new value.)",
"tags": [
{ "tagName": "see",
"values": ["mx.events.CollectionEvent", "mx.core.IPropertyChangeNotifier", "mx.events.PropertyChangeEvent"]},
{ "tagName": "param",
"values": ["item The item within the view that was updated.", "property The name of the property that was updated.", "oldValue The old value of that property. (If property", "newValue The new value of that property. (If property"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": [{ "name": "item", "type": "Object"},
{ "name": "property", "type": "Object"},
{ "name": "oldValue", "type": "Object"},
{ "name": "newValue", "type": "Object"}]}
,
{ "type": "method",
"qname": "refresh",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Applies the sort and filter to the view. The ICollectionView does not detect changes to a sort or filter automatically, so you must call the <code>refresh()</code> method to update the view after setting the <code>sort</code> or <code>filterFunction</code> property. If your ICollectionView implementation also implements the IMXMLObject interface, you should to call the <code>refresh()</code> method from your <code>initialized()</code> method. <p>Returns <code>true</code> if the refresh was successful and <code>false</code> if the sort is not yet complete (e.g., items are still pending). A client of the view should wait for a CollectionEvent event with the <code>CollectionEventKind.REFRESH</code> <code>kind</code> property to ensure that the <code>refresh()</code> operation is complete.</p> <code>false</code> if the refresh() is incomplete.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Royale 0.9.3"]},
{ "tagName": "return",
"values": ["<code>true</code> if the refresh() was complete,"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Boolean",
"params": []}
]
}