|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
I - The class of the group members idT - The Entity class of the group memberspublic interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
A browser that let you navigate through a set of EntityGroup and its members.
Selection can work in two distinct modes: single and multiple.
In single selection mode every time you select a member using select(Entity) or
select(int, int) this will be the only one selected. You can retrieve this selection
using Selector.getSelectedObject(). In single mode getSelectedObjects() will always
return a list containing one element.
In multiple selection mode each selection will be maintained in a list that can be retrieved using
getSelectedObjects() while Selector.getSelectedObject() will retrieve the last selected
object. In multiple mode selecting the same object twice will result in deselecting this object
| Nested Class Summary | |
|---|---|
static class |
GroupBrowser.Selection
|
| Method Summary | |
|---|---|
void |
deselect()
Removes all the selections |
it.amattioli.dominate.groups.EntityGroup<I,T> |
getGroup(int index)
Retrieves the group with a given index inside the getGroups() list. |
List<it.amattioli.dominate.groups.EntityGroup<I,T>> |
getGroups()
Retrieves all the available groups |
int |
getGroupSize(int index)
Retrieves the size of the group with a given index. |
T |
getMember(int groupIndex,
int memberIndex)
Retrieves a member of a given group. |
List<Integer> |
getSelectedGroupsIndex()
Return the indexes of all the groups that are selected as of isGroupSelected(int) |
List<T> |
getSelectedObjects()
Returns a list containing all the selected objects. |
GroupBrowser.Selection |
getSelection()
Returns a GroupBrowser.Selection object containing the group and member indexes
of the last selected entity. |
List<GroupBrowser.Selection> |
getSelections()
Returns a list of GroupBrowser.Selection containing the indexes of all the selected objects. |
boolean |
isGroupSelected(int index)
Check if a group is selected. |
boolean |
isMultiple()
Check if this browser is in multiple mode |
boolean |
isSelected(int groupIndex,
int memberIndex)
Check if an entity is selected. |
void |
select(int groupIndex,
int memberIndex)
Select a member of a group using the group and member index. |
void |
select(T toBeSelected)
Select a member of a group. |
void |
selectGroup(it.amattioli.dominate.groups.EntityGroup<I,T> toBeSelected)
Select all the members of a group. |
void |
selectGroup(int index)
Select all the members of a group. |
void |
setMultiple(boolean multiple)
Set the selection mode. |
| Methods inherited from interface it.amattioli.applicate.browsing.Browser |
|---|
addContentChangeListener, release, removeContentChangeListener |
| Methods inherited from interface it.amattioli.applicate.selection.Selector |
|---|
addSelectionListener, getSelectedObject, removeSelectionListener |
| Methods inherited from interface it.amattioli.applicate.commands.CommandListener |
|---|
commandDone |
| Method Detail |
|---|
List<it.amattioli.dominate.groups.EntityGroup<I,T>> getGroups()
it.amattioli.dominate.groups.EntityGroup<I,T> getGroup(int index)
getGroups() list.
index - the group index
int getGroupSize(int index)
index - the group index
T getMember(int groupIndex,
int memberIndex)
groupIndex - the index of the group inside the getGroups() listmemberIndex - the index of the member inside the group
void select(int groupIndex,
int memberIndex)
groupIndex - the index of the group inside the getGroups() listmemberIndex - the index of the member inside the groupvoid select(T toBeSelected)
toBeSelected - the member to be selectedvoid selectGroup(int index)
index - the index of the group inside the getGroups() listvoid selectGroup(it.amattioli.dominate.groups.EntityGroup<I,T> toBeSelected)
toBeSelected - the group to be selectedvoid deselect()
GroupBrowser.Selection getSelection()
GroupBrowser.Selection object containing the group and member indexes
of the last selected entity.
List<GroupBrowser.Selection> getSelections()
GroupBrowser.Selection containing the indexes of all the selected objects.In single mode the list will contain only the last selected object.
List<T> getSelectedObjects()
In single mode the list will contain only the last selected object.
boolean isSelected(int groupIndex,
int memberIndex)
groupIndex - the group indexmemberIndex - the index of the member inside the group
boolean isGroupSelected(int index)
index - the group index
List<Integer> getSelectedGroupsIndex()
isGroupSelected(int)
void setMultiple(boolean multiple)
multiple - true to set the multiple mode, false to set the single modeboolean isMultiple()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||