it.amattioli.applicate.commands.tree
Class DefaultTreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
java.lang.Object
it.amattioli.applicate.commands.tree.DefaultTreeEditor<I,T>
- All Implemented Interfaces:
- TreeEditor<I,T>, Selector<T>, it.amattioli.dominate.util.PropertyChangeEmitter
public class DefaultTreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
- extends Object
- implements TreeEditor<I,T>, it.amattioli.dominate.util.PropertyChangeEmitter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultTreeEditor
public DefaultTreeEditor()
getTreeManager
public TreeManager<T> getTreeManager()
setTreeManager
public void setTreeManager(TreeManager<T> treeManager)
initEditors
protected void initEditors()
getRoot
public T getRoot()
- Specified by:
getRoot in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
setRoot
public void setRoot(T root)
- Specified by:
setRoot in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getChildrenOf
public List<T> getChildrenOf(T target)
- Specified by:
getChildrenOf in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getParentOf
public T getParentOf(T target)
- Specified by:
getParentOf in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getPathOf
public TreePath getPathOf(T target)
- Specified by:
getPathOf in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getTargetOf
public T getTargetOf(TreePath path)
- Specified by:
getTargetOf in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
select
public void select(TreePath path)
- Specified by:
select in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
select
public void select(T selected)
- Specified by:
select in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
deselect
public void deselect()
- Specified by:
deselect in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getSelectedObject
public T getSelectedObject()
- Description copied from interface:
Selector
- Retrieves the object currently selected.
- Specified by:
getSelectedObject in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>- Specified by:
getSelectedObject in interface Selector<T extends it.amattioli.dominate.Entity<I>>
- Returns:
- the object currently selected or null if no object is selected
getSelectedPath
public TreePath getSelectedPath()
- Specified by:
getSelectedPath in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
addChild
public T addChild()
- Specified by:
addChild in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
addSibling
public T addSibling()
- Specified by:
addSibling in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
remove
public T remove()
- Specified by:
remove in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
moveTo
public void moveTo(T newParent)
moveDown
public void moveDown()
- Specified by:
moveDown in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
moveUp
public void moveUp()
- Specified by:
moveUp in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getNodeEditor
public BeanEditor<T> getNodeEditor(TreePath path)
- Specified by:
getNodeEditor in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
getNodeEditor
public BeanEditor<T> getNodeEditor(T node)
- Specified by:
getNodeEditor in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
addTreeListener
public void addTreeListener(TreeEventListener listener)
- Specified by:
addTreeListener in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
removeTreeListener
public void removeTreeListener(TreeEventListener listener)
- Specified by:
removeTreeListener in interface TreeEditor<I extends Serializable,T extends it.amattioli.dominate.Entity<I>>
fireTreeEvent
protected void fireTreeEvent(TreeEvent.Type type,
TreePath path)
addSelectionListener
public void addSelectionListener(SelectionListener listener)
- Description copied from interface:
Selector
- Register a listener for the object selection.
Every time an object is selected in this browser all the registered
objects will be notified.
- Specified by:
addSelectionListener in interface Selector<T extends it.amattioli.dominate.Entity<I>>
- Parameters:
listener - the listener to be registered
removeSelectionListener
public void removeSelectionListener(SelectionListener listener)
- Description copied from interface:
Selector
- Remove a listener from the collection of the listeners that will be
notified when an object is slected in this browser.
- Specified by:
removeSelectionListener in interface Selector<T extends it.amattioli.dominate.Entity<I>>
- Parameters:
listener - the listener to be removed
firePropertyChange
protected void firePropertyChange(String propertyName,
Object oldValue,
Object newValue)
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
- Specified by:
addPropertyChangeListener in interface it.amattioli.dominate.util.PropertyChangeEmitter
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
- Specified by:
removePropertyChangeListener in interface it.amattioli.dominate.util.PropertyChangeEmitter
Copyright © 2011. All Rights Reserved.