|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.applicate.browsing.DefaultGroupBrowser<I,T>
public class DefaultGroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface it.amattioli.applicate.browsing.GroupBrowser |
|---|
GroupBrowser.Selection |
| Constructor Summary | |
|---|---|
DefaultGroupBrowser()
|
|
DefaultGroupBrowser(it.amattioli.dominate.groups.EntityGroupFactory<I,T> groupFactory)
|
|
| Method Summary | |
|---|---|
void |
addContentChangeListener(ContentChangeListener listener)
Add a listener for events fired when the browser content changes. |
void |
addSelectionListener(SelectionListener listener)
Register a listener for the object selection. |
void |
commandDone(CommandEvent e)
This method will be called every time a CommandEvent is fired by
the command to which this listener has been added. |
void |
deselect()
Removes all the selections |
protected void |
fireContentChange()
|
it.amattioli.dominate.groups.EntityGroup<I,T> |
getGroup(int index)
Retrieves the group with a given index inside the GroupBrowser.getGroups() list. |
it.amattioli.dominate.groups.EntityGroupFactory<I,T> |
getGroupFactory()
|
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 GroupBrowser.isGroupSelected(int) |
T |
getSelectedObject()
Retrieves the object currently selected. |
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 index,
int i)
Check if an entity is selected. |
void |
release()
Releases eventually acquired resources. |
void |
removeContentChangeListener(ContentChangeListener listener)
Remove a listener for events fired when the browser content changes. |
void |
removeSelectionListener(SelectionListener listener)
Remove a listener from the collection of the listeners that will be notified when an object is slected in this browser. |
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 |
setGroupFactory(it.amattioli.dominate.groups.EntityGroupFactory<I,T> groupFactory)
|
void |
setMultiple(boolean multiple)
Set the selection mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultGroupBrowser()
public DefaultGroupBrowser(it.amattioli.dominate.groups.EntityGroupFactory<I,T> groupFactory)
| Method Detail |
|---|
public void setGroupFactory(it.amattioli.dominate.groups.EntityGroupFactory<I,T> groupFactory)
public it.amattioli.dominate.groups.EntityGroupFactory<I,T> getGroupFactory()
public List<it.amattioli.dominate.groups.EntityGroup<I,T>> getGroups()
GroupBrowser
getGroups in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public it.amattioli.dominate.groups.EntityGroup<I,T> getGroup(int index)
GroupBrowserGroupBrowser.getGroups() list.
getGroup in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>index - the group index
public int getGroupSize(int index)
GroupBrowser
getGroupSize in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>index - the group index
public T getMember(int groupIndex,
int memberIndex)
GroupBrowser
getMember in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>groupIndex - the index of the group inside the GroupBrowser.getGroups() listmemberIndex - the index of the member inside the group
public void addContentChangeListener(ContentChangeListener listener)
Browser
addContentChangeListener in interface Browser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>listener - the listener to be addedpublic void removeContentChangeListener(ContentChangeListener listener)
Browser
removeContentChangeListener in interface Browser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>listener - the listener to be removedpublic void release()
Browser
release in interface Browser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void commandDone(CommandEvent e)
CommandListenerCommandEvent is fired by
the command to which this listener has been added.
commandDone in interface CommandListenere - the fired eventprotected void fireContentChange()
public void addSelectionListener(SelectionListener listener)
Selector
addSelectionListener in interface Selector<T extends it.amattioli.dominate.Entity<I>>listener - the listener to be registeredpublic void removeSelectionListener(SelectionListener listener)
Selector
removeSelectionListener in interface Selector<T extends it.amattioli.dominate.Entity<I>>listener - the listener to be removedpublic boolean isMultiple()
GroupBrowser
isMultiple in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void setMultiple(boolean multiple)
GroupBrowser
setMultiple in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>multiple - true to set the multiple mode, false to set the single modepublic T getSelectedObject()
Selector
getSelectedObject in interface Selector<T extends it.amattioli.dominate.Entity<I>>public List<T> getSelectedObjects()
GroupBrowserIn single mode the list will contain only the last selected object.
getSelectedObjects in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public GroupBrowser.Selection getSelection()
GroupBrowserGroupBrowser.Selection object containing the group and member indexes
of the last selected entity.
getSelection in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public List<GroupBrowser.Selection> getSelections()
GroupBrowserGroupBrowser.Selection containing the indexes of all the selected objects.In single mode the list will contain only the last selected object.
getSelections in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
public void select(int groupIndex,
int memberIndex)
GroupBrowser
select in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>groupIndex - the index of the group inside the GroupBrowser.getGroups() listmemberIndex - the index of the member inside the grouppublic void select(T toBeSelected)
GroupBrowser
select in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>toBeSelected - the member to be selected
public boolean isSelected(int index,
int i)
GroupBrowser
isSelected in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>index - the group indexi - the index of the member inside the group
public void selectGroup(int index)
GroupBrowser
selectGroup in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>index - the index of the group inside the GroupBrowser.getGroups() listpublic void selectGroup(it.amattioli.dominate.groups.EntityGroup<I,T> toBeSelected)
GroupBrowser
selectGroup in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>toBeSelected - the group to be selectedpublic List<Integer> getSelectedGroupsIndex()
GroupBrowserGroupBrowser.isGroupSelected(int)
getSelectedGroupsIndex in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public boolean isGroupSelected(int index)
GroupBrowser
isGroupSelected in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>index - the group index
public void deselect()
GroupBrowser
deselect in interface GroupBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||