class UIListView
A view composite that manages views for each item in a list of objects or values.
class UIListView extends ViewComposite
Description
A list component creates and renders content based on a provided list data structure.
Constructor
- constructor()Creates a new list view composite object.
Type Members
- class ItemValueWrapper staticA managed object class that contains a list (array) item which is itself not a managed object.
- class ItemControllerView staticA view that’s created automatically for each list item by UIListView.
- type UIListView.ItemEvent staticType alias for events delegated by UIListView.ItemControllerView.
Instance Members
- applyViewPreset(preset)Applies the provided preset properties to this object.
- bodyThe list container component.
- itemsThe list of objects, from which each object is used to construct one view object.
- firstIndexIndex of first item to be shown in the list.
- maxItemsThe maximum number of items to be shown in the list.
- animationList content animation options.
- lastFocusedIndexThe index of the last focused list item view, if any.
- getIndexOfView(view?)Returns the list index of the specified view, or of its parent(s).
- requestFocus()Requests input focus on the last-focused list view object, or the first one, if possible.
- focusPreviousItem()Requests input focus on the view object before the last focused item.
- focusNextItem()Requests input focus on the view object after the last focused item.
- onFocusIn(event) protectedFocusIn event handler, stores the index of the focused item as lastFocusedIndex.
- onFocusPrevious() protectedFocusPrevious event handler, calls focusPreviousItem() or moves focus back to a containing list.
- onFocusNext() protectedFocusNext event handler, calls focusNextItem().
Inherited Members
- createView() protectedCreates the encapsulated view object, to be overridden if needed.
- beforeRender() protectedA method that’s called before the view is rendered, to be overridden if needed.
- findViewContent(type)Searches the view hierarchy for view objects of the provided type.
- delegateViewEvent(event) protectedDelegates events from the current view.
- render(callback?)Renders the current view, if any.
- emit(event)Emits an event, immediately calling all event handlers.
- emitChange(name?, data?)Emits a change event, an instance of ManagedChangeEvent.
- listen(handler)Adds a handler for all events emitted by this object.
- isUnlinked()Returns true if the object has been unlinked.
- unlink()Unlinks this managed object.
- beforeUnlink() protectedA method that’s called immediately before unlinking an object, can be overridden.
- attach(target, observer?) protectedAttaches the provided managed object to this object.
- autoAttach(propertyName, observer?) protectedObserves a property, so that any object assigned to it is attached immediately.