Display a list of items in a Panel.
This is the controller in a model-view-controller construction, where
the model is a list of items and the view is a Panel.
CLASS |
SelectEvent @public |
|
|
NEW(view, model, builder) @public | Display the items of model in view.
|
|
$setModel(model) @public | Set the model to be displayed.
Set to NIL to not display any items.
|
|
$getModel()
list<Titem> @public | Return the current model.
|
|
$setView(view) @public | Set the view to display the items in.
|
|
$getView()
ZWT.Panel @public | Return the current view.
|
|
$update() @file | Fill the view with items from the model.
|
|
$update(item) @public | Update the view for item.
|
|
$update(index) @public | Update the view for the item at position index.
|
|
$add(item)
ZWT.Widget @public | Add item to the list of items.
|
|
$insert(item) @public | Insert item at the start of the list of items.
|
|
$insert(item, index) @public | Insert item before item index in the list of items.
|
|
$remove(item) @public | Remove the item.
|
|
$remove(index)
Titem @public | Remove the item at index.
|
|
$getItem(index)
Titem @public | Get the item in the model at index.
Return NIL when index is out of range.
|
|
$getWidget(index)
ZWT.Widget @public | Get the Widget in the view at index.
Return NIL when index is out of range.
|
|
$getWidget(item)
ZWT.Widget @public | Get the Widget in the view for item in the model.
Return NIL when not found.
|
|
$setHighlightIndex(index) @public | Set the highlight in the view by index.
|
|
$setHighlighted(item) @public | Set the highlight in the view for an item in the model.
|
|
$addHighlighted(index) @public | Add a highlighted item in the view by index.
|
|
$addHighlighted(item) @public | Add a highlighted item in the view for an item in the model.
|
|
$getHighlighted()
ZWT.Widget @public | Return the first highlighted item in the view. NIL if there is none.
|
|
$getHighlightedItem()
Titem @public | Return the first highlighted item in the model. NIL if there is none.
|
|
$getHighlightIndex()
int @public | Return the lowest highlighted item index.
|
|
$setSelectionHandler(handler) @public | Set a handler for selection events. Currently only mouse clicks.
|
|
$keepSorted(on) @public | Set sorting to on.
|
|
$setSortMethod(method) @public | Set the method to use for sorting.
|
|
|
clickHandler(event) @file |
|