|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.amattioli.applicate.browsing.DefaultTreeBrowser<I,T>
public class DefaultTreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
| Constructor Summary | |
|---|---|
protected |
DefaultTreeBrowser()
|
|
DefaultTreeBrowser(Class<T> entityClass,
I rootId,
String childrenPropertyName,
String parentPropertyName)
|
|
DefaultTreeBrowser(it.amattioli.dominate.Repository<I,T> repository,
I rootId,
String childrenPropertyName,
String parentPropertyName)
|
| Method Summary | |
|---|---|
void |
addContentChangeListener(ContentChangeListener listener)
Add a listener for events fired when the browser content changes. |
void |
addPropertyChangeListener(PropertyChangeListener listener)
|
void |
addSelectionListener(SelectionListener listener)
Register a listener for the object selection. |
void |
commandDone(CommandEvent evt)
This method will be called every time a CommandEvent is fired by
the command to which this listener has been added. |
void |
deselect()
|
protected void |
fireContentChange()
|
protected void |
firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
|
List<T> |
getChildrenOf(T target)
Retrieves the list of the children of a given node |
T |
getParentOf(T target)
|
TreePath |
getPathOf(T target)
Retrieves the path of node |
T |
getRoot()
Retrieves the root of the tree |
I |
getRootId()
|
T |
getSelectedObject()
Retrieves the object currently selected. |
TreePath |
getSelectedPath()
Retrieves the path of the selected object |
it.amattioli.dominate.Specification<T> |
getSpecification()
|
T |
getTargetOf(TreePath path)
Retrieves a tree node given its path inside the tree |
void |
next()
Select next node in tree. |
void |
previous()
Select previous node in tree. |
void |
release()
Releases eventually acquired resources. |
void |
removeContentChangeListener(ContentChangeListener listener)
Remove a listener for events fired when the browser content changes. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
|
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(T selected)
Select a node |
void |
select(TreePath path)
Select a node given its path |
void |
setRootId(I rootId)
|
void |
setSpecification(it.amattioli.dominate.Specification<T> spec)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DefaultTreeBrowser()
public DefaultTreeBrowser(it.amattioli.dominate.Repository<I,T> repository,
I rootId,
String childrenPropertyName,
String parentPropertyName)
public DefaultTreeBrowser(Class<T> entityClass,
I rootId,
String childrenPropertyName,
String parentPropertyName)
| Method Detail |
|---|
public I getRootId()
public void setRootId(I rootId)
public T getRoot()
TreeBrowser
getRoot in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public List<T> getChildrenOf(T target)
TreeBrowser
getChildrenOf in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public T getParentOf(T target)
public TreePath getPathOf(T target)
TreeBrowser
getPathOf in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public T getTargetOf(TreePath path)
TreeBrowser
getTargetOf in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void select(TreePath path)
TreeBrowser
select in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void select(T selected)
TreeBrowser
select in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void deselect()
deselect in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public T getSelectedObject()
Selector
getSelectedObject in interface Selector<T extends it.amattioli.dominate.Entity<I>>public TreePath getSelectedPath()
TreeBrowser
getSelectedPath in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>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 void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface it.amattioli.dominate.util.PropertyChangeEmitterpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface it.amattioli.dominate.util.PropertyChangeEmitter
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
public void commandDone(CommandEvent evt)
CommandListenerCommandEvent is fired by
the command to which this listener has been added.
commandDone in interface CommandListenerevt - the fired eventpublic void release()
Browser
release in interface Browser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>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 removedprotected void fireContentChange()
public void next()
TreeBrowser
next in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void previous()
TreeBrowser
previous in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public it.amattioli.dominate.Specification<T> getSpecification()
getSpecification in interface TreeBrowser<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>public void setSpecification(it.amattioli.dominate.Specification<T> spec)
setSpecification in interface TreeBrowser<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 | |||||||||