|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
To drive our GUI we find ourselves adding additional useful methods on top of the JFace tree viewer in our subclasses. We capture those here in an interface so they can be implemented by other viewers that wish to fully drive our UI. Typically this is for interesting properties in the property sheet.
| Method Summary | |
|---|---|
boolean |
areAnySelectedItemsExpandable()
|
boolean |
areAnySelectedItemsExpanded()
|
int |
getChildCount(Object element)
|
Object[] |
getElementNodes(Object element)
This returns an array containing each element in the tree, up to but not including the root. |
Object |
getNextElement()
This returns the element immediately after the last selected element in this tree level Often needed for enablement decisions for move down actions. |
Object |
getPreviousElement()
This returns the element immediately before the first selected element in this tree level. |
Object |
getRootParent()
This is called to walk the tree back up to the roots and return the visible root node for the first selected object. |
Object |
getSelectedParent()
This is called to accurately get the parent object for the current selection for this viewer. |
Item |
getViewerItem()
Returns the tree item of the first selected object. |
boolean |
isSelectedOrChildSelected(Object parentElement)
Helper method to determine if a given object is currently selected. |
boolean |
sameParent()
This is called to ensure all elements in a multiple-selection have the same parent in the tree viewer. |
void |
select(Object element,
boolean expand)
Called to select an object within the tree, and optionally expand it. |
void |
updatePropertySheet()
Called when a property is updated and we need to inform the Property Sheet viewer. |
| Method Detail |
public boolean sameParent()
public void select(Object element,
boolean expand)
element - the element in the tree to selectexpand - true if the element is to be expandedpublic int getChildCount(Object element)
element - the element in the tree to query
public Object getSelectedParent()
public Object getPreviousElement()
public Object getNextElement()
public Object getRootParent()
public Object[] getElementNodes(Object element)
element - the element from which to begin
public boolean isSelectedOrChildSelected(Object parentElement)
parentElement - the element to query
public void updatePropertySheet()
public Item getViewerItem()
public boolean areAnySelectedItemsExpanded()
public boolean areAnySelectedItemsExpandable()
|
RSE Release 1.0 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||