|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.dialog.services.impl.DefaultDialogHierarchyService
A default implementation of DialogHierarchyService using a HierarchyProvider.
| Constructor Summary | |
DefaultDialogHierarchyService(HierarchyProvider hierarchyProvider)
Creates a new DefaultDialogHierarchyService. |
|
| Method Summary | |
void |
addHierarchyProviderListener(HierarchyProviderListener listener)
Registers a listener that observes changes in the hierarchy. |
int |
getChildCount(ID parentId,
boolean deep,
boolean leafesOnly)
Returns the number of childs for the given parent id. |
ID[] |
getChildren(ID parentId)
Returns the children of a node. |
ID |
getParentForChild(ID id)
Returns the parent id of a node. |
ID[] |
getRoots()
Returns the root nodes. |
boolean |
hasID(ID id)
Tests whether a given ID is known in the hierarchy either as a parent or as a child. |
boolean |
isChild(ID id1,
ID id2,
boolean deep)
Checks if id2 is a child of id1.
|
void |
removeHierarchyProviderListener(HierarchyProviderListener listener)
Unregisters a listener. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultDialogHierarchyService(HierarchyProvider hierarchyProvider)
DefaultDialogHierarchyService.
hierarchyProvider - the HierarchyProvider to be used.| Method Detail |
public boolean hasID(ID id)
HierarchyProvider
hasID in interface HierarchyProviderid - the id to be tested
HierarchyProvider.hasID(com.sdm.quasar.client.core.common.ID)public ID[] getChildren(ID parentId)
HierarchyProvider
getChildren in interface HierarchyProviderparentId - the id of the parent node
IDs of the childrenHierarchyProvider.getChildren(com.sdm.quasar.client.core.common.ID)public ID getParentForChild(ID id)
HierarchyProvider
getParentForChild in interface HierarchyProviderid - the id of the child node
HierarchyProvider.getParentForChild(com.sdm.quasar.client.core.common.ID)
public boolean isChild(ID id1,
ID id2,
boolean deep)
HierarchyProviderid2 is a child of id1.
The check is done down the whole sub hierarchy of id1
if deep = true.
Else only direct childs are considered.
isChild in interface HierarchyProviderid1 - the potential parentid2 - the potential childdeep - true: The check is done down the whole sub hierarchy
false: only direct childs are considered
HierarchyProvider.isChild(com.sdm.quasar.client.core.common.ID, com.sdm.quasar.client.core.common.ID, boolean)
public int getChildCount(ID parentId,
boolean deep,
boolean leafesOnly)
HierarchyProvider
getChildCount in interface HierarchyProviderparentId - the ID of the parent to count childs ofdeep - if true, the whole subtree will be counted,
if false, only direct childs are countedleafesOnly - if true, the returned number is
restricted to leafes (childs, that have no childs themselfes)
HierarchyProvider.getChildCount(com.sdm.quasar.client.core.common.ID, boolean, boolean)public ID[] getRoots()
HierarchyProvider
getRoots in interface HierarchyProviderIDs of the root nodes.HierarchyProvider.getRoots()public void addHierarchyProviderListener(HierarchyProviderListener listener)
HierarchyProvider
addHierarchyProviderListener in interface HierarchyProviderlistener - the listener to be addedHierarchyProvider.addHierarchyProviderListener(com.sdm.quasar.client.core.common.hierarchy.HierarchyProviderListener)public void removeHierarchyProviderListener(HierarchyProviderListener listener)
HierarchyProvider
removeHierarchyProviderListener in interface HierarchyProviderlistener - the listener to be removedHierarchyProvider.removeHierarchyProviderListener(com.sdm.quasar.client.core.common.hierarchy.HierarchyProviderListener)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||