|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
I - the identifier class of the entities that can be browsedT - the class of the entities that can be browsedpublic interface ListBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
A ListBrowser object allows the navigation throw the entities contained in a
repository in a sequential way.
The browser allows objects filtering and sorting, the selection of an object
and forward/backward selection navigation.
You can obtain and ObjectBrowser on the selected object whose content
change when a new object is selected in this browser.
| Method Summary | |
|---|---|
void |
addOrder(String property)
Add a property that will be used to sort the browsing objects. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a listener for PropertyChangeEvent events. |
void |
deselect()
Removes the current selection. |
void |
fillCollection(Collection<? super T> toBeFilled)
Fill a collection with the browsing objects. |
it.amattioli.dominate.Filter |
getFilter()
Deprecated. |
boolean |
getHasNext()
Indicate if there is an object next to the currently selected object. |
boolean |
getHasPrevious()
Indicate if there is an object previous to the currently selected object. |
List<T> |
getList()
Retrieves the list of the browsing objects. |
String |
getOrderProperty()
Retrieves the name of the property of the browsing objects that will be used to sort the list of browsing objects. |
boolean |
getReverseOrder()
Indicates if the order is direct or reverse. |
Integer |
getSelectedIndex()
Retrieves the index of the object currently selected. |
ObjectBrowser<I,T> |
getSelectedObjectBrowser()
Retrieves a ObjectBrowser for the selected object. |
it.amattioli.dominate.Specification<T> |
getSpecification()
Retrieves the specification object set by setSpecification(Specification) |
ObjectBrowser<I,T> |
newObjectBrowser()
Create a new ObjectBrowser for the currently selected object. |
void |
next()
Move the selection to the object next to the currently selected object. |
void |
previous()
Move the selection to the object previous to the currently selected object. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove a listener for PropertyChangeEvent events. |
void |
select(int index)
Select an object using its index inside the list retrieved using getList(). |
void |
select(T object)
Select an object. |
void |
setFilter(it.amattioli.dominate.Filter filter)
Deprecated. |
void |
setOrder(String property)
Set the property that will be used to sort the browsing objects. |
void |
setOrder(String property,
boolean reverse)
Set the property that will be used to sort the browsing objects. |
void |
setSpecification(it.amattioli.dominate.Specification<T> spec)
Set the specification to be used to filter the browsing objects. |
void |
useObjectBrowserClass(Class<? extends ObjectBrowserImpl<I,T>> objectBrowserClass)
Set the class that will be used by newObjectBrowser(). |
| 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<T> getList()
setCriteria.
The list will be sorted using the property specified by setOrder.
If something causes the changing of the list of browsing objects a PropertyChange
event will be fired.
void fillCollection(Collection<? super T> toBeFilled)
getList().
toBeFilled - the collection to be filled@Deprecated void setFilter(it.amattioli.dominate.Filter filter)
getList() method will return only the objects that
satisfy the specified criteria.
The browser will listen on property changes of the filter bean
so to refresh the browsing objects accordingly.
filter - the criteria that will be used to filter the browsing objects@Deprecated it.amattioli.dominate.Filter getFilter()
setFilter(Filter).
setFilter(Filter)void setSpecification(it.amattioli.dominate.Specification<T> spec)
getList() method will return only the objects that
satisfy the specification.
The browser will listen on property changes of the specification bean
so to refresh the browsing objects accordingly.
spec - the specification that will be used to filter the browsing objectsit.amattioli.dominate.Specification<T> getSpecification()
setSpecification(Specification)
setSpecification(Specification)
void setOrder(String property,
boolean reverse)
property - the name of a property of the browsing objects that will be
used to sort the list of browsing objectsreverse - if true the objects will be sort in reverse ordervoid setOrder(String property)
property - the name of a property of the browsing objects that will be
used to sort the list of browsing objectsvoid addOrder(String property)
property - String getOrderProperty()
boolean getReverseOrder()
void select(int index)
getList().
After the selection a SelectionEvent will be notified to all
the objects that has been registered using
#addContentChangeListener(BrowserSelectionListener).
index - the index inside the list retrieved using getList()
of the object to be selectedvoid select(T object)
SelectionEvent will be notified to all
the objects that has been registered using
#addContentChangeListener(BrowserSelectionListener).
object - the object to be selectedvoid deselect()
Selector.getSelectedObject() and getSelectedIndex()
will return null.
Integer getSelectedIndex()
select(int).
void next()
boolean getHasNext()
void previous()
boolean getHasPrevious()
void useObjectBrowserClass(Class<? extends ObjectBrowserImpl<I,T>> objectBrowserClass)
newObjectBrowser().
objectBrowserClass - the class that will be used by newObjectBrowser()ObjectBrowser<I,T> newObjectBrowser()
ObjectBrowser for the currently selected object.
The object created will be an instance of the class set using
useObjectBrowserClass(Class). If no object browser class was
specified ObjectBrowserImpl will be used.
ObjectBrowserObjectBrowser<I,T> getSelectedObjectBrowser()
ObjectBrowser for the selected object.
This ObjectBrowser will be created the first time
this method is called and will be linked to the currently
selected object. Every time a new object is elected in the browser
the ObjectBrowser will be notified so it can refresh
itself to contain the currently slected object.
ObjectBrowser for the selected objectvoid addPropertyChangeListener(PropertyChangeListener listener)
PropertyChangeEvent events.
listener - a listener for PropertyChangeEvent eventsvoid removePropertyChangeListener(PropertyChangeListener listener)
PropertyChangeEvent events.
listener - a listener for PropertyChangeEvent events
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||