|
Remote Systems v6.4.1 |
||||||||||
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.
Ultimately, these are methods that AbstractTreeViewer itself should have!
Field Summary | |
---|---|
static String |
Copyright
|
Method Summary | |
---|---|
boolean |
areAnySelectedItemsExpandable()
Returns true if any of the selected items are expandable but not yet expanded |
boolean |
areAnySelectedItemsExpanded()
Returns true if any of the selected items are currently expanded |
int |
getChildCount(Object element)
Return the number of immediate children in the tree, for the given tree node |
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. |
Field Detail |
public static final String Copyright
Method Detail |
public boolean sameParent()
Designed to be as fast as possible by going directly to the SWT widgets
public void select(Object element, boolean expand)
public int getChildCount(Object element)
public Object getSelectedParent()
The getParent() method in the adapter is very unreliable... adapters can't be sure of the context which can change via filtering and view options.
public Object getPreviousElement()
public Object getNextElement()
public Object getRootParent()
public Object[] getElementNodes(Object element)
public boolean isSelectedOrChildSelected(Object parentElement)
public void updatePropertySheet()
public Item getViewerItem()
public boolean areAnySelectedItemsExpanded()
public boolean areAnySelectedItemsExpandable()
|
Remote Systems v6.4.1 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |