|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.extjs.gxt.ui.client.widget.selection.AbstractSelectionModel<C,T>
C - the container typeT - the container item typepublic abstract class AbstractSelectionModel<C extends Container<T>,T extends Component>
Concrete selection model. 3 selection models are supported:
| Constructor Summary | |
|---|---|
AbstractSelectionModel()
Creates a new single-select selection model. |
|
AbstractSelectionModel(Style.SelectionMode mode)
Creates a new selection model. |
|
| Method Summary | |
|---|---|
void |
bind(C container)
Binds the selection model to the container. |
void |
deselect(int index)
Deselects the item at the given index. |
void |
deselect(int start,
int end)
Deselects the range. |
void |
deselect(java.util.List<T> items)
Deselects the items. |
void |
deselect(T... items)
Deselects the items. |
void |
deselect(T item)
Deselects the item. |
void |
deselectAll()
Deselects all selections. |
T |
getSelectedItem()
Returns the selected item. |
java.util.List<T> |
getSelectedItems()
Returns the selected items. |
Style.SelectionMode |
getSelectionMode()
Returns the selection mode. |
void |
handleEvent(ContainerEvent ce)
Sent when an event that the listener has registered for occurs. |
boolean |
isLocked()
Returns true if selections are locked. |
boolean |
isSelected(T item)
Returns true if the item is selcted. |
void |
refresh()
Refreshes the current selections. |
void |
select(int index)
Selects the item at the given index. |
void |
select(int start,
int end)
Selects the range. |
void |
select(java.util.List<T> items)
Selects the items. |
void |
select(T... items)
Selects the items. |
void |
select(T item)
Selects the item. |
void |
selectAll()
Selets all items. |
void |
setLocked(boolean locked)
Sets whether selections are locked. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractSelectionModel()
public AbstractSelectionModel(Style.SelectionMode mode)
mode - the selection mode| Method Detail |
|---|
public void bind(C container)
SelectionModel
bind in interface SelectionModel<C extends Container<T>,T extends Component>container - the containerpublic void deselect(int index)
SelectionModel
deselect in interface SelectionModel<C extends Container<T>,T extends Component>index - the index of the item to be deselected
public void deselect(int start,
int end)
SelectionModel
deselect in interface SelectionModel<C extends Container<T>,T extends Component>start - the start indexend - the end indexpublic void deselect(java.util.List<T> items)
SelectionModel
deselect in interface SelectionModel<C extends Container<T>,T extends Component>items - the itempublic void deselect(T... items)
SelectionModel
deselect in interface SelectionModel<C extends Container<T>,T extends Component>items - the items to deselectpublic void deselect(T item)
SelectionModel
deselect in interface SelectionModel<C extends Container<T>,T extends Component>item - the item to be deselectedpublic void deselectAll()
SelectionModel
deselectAll in interface SelectionModel<C extends Container<T>,T extends Component>public T getSelectedItem()
SelectionModel
getSelectedItem in interface SelectionModel<C extends Container<T>,T extends Component>public java.util.List<T> getSelectedItems()
SelectionModel
getSelectedItems in interface SelectionModel<C extends Container<T>,T extends Component>public Style.SelectionMode getSelectionMode()
public void handleEvent(ContainerEvent ce)
Listener
handleEvent in interface Listener<ContainerEvent>ce - the event which occurredpublic boolean isLocked()
public boolean isSelected(T item)
SelectionModel
isSelected in interface SelectionModel<C extends Container<T>,T extends Component>item - the item
public void refresh()
SelectionModel
refresh in interface SelectionModel<C extends Container<T>,T extends Component>public void select(int index)
SelectionModel
select in interface SelectionModel<C extends Container<T>,T extends Component>index - the index of the item to be selected
public void select(int start,
int end)
SelectionModel
select in interface SelectionModel<C extends Container<T>,T extends Component>start - the start indexend - the end indexpublic void select(java.util.List<T> items)
SelectionModel
select in interface SelectionModel<C extends Container<T>,T extends Component>items - the items to selectpublic void select(T... items)
SelectionModel
select in interface SelectionModel<C extends Container<T>,T extends Component>items - the itemspublic void select(T item)
SelectionModel
select in interface SelectionModel<C extends Container<T>,T extends Component>item - the itempublic void selectAll()
SelectionModel
selectAll in interface SelectionModel<C extends Container<T>,T extends Component>public void setLocked(boolean locked)
locked - true to lock
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||