|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ISystemTree
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 | |
---|---|
void |
addDoubleClickListener(IDoubleClickListener listener)
Adds a double-click listener |
void |
addFilter(ViewerFilter filter)
Adds a view filter |
void |
addSelectionChangedListener(ISelectionChangedListener listener)
Adds a selection changed listener |
boolean |
areAnySelectedItemsExpandable()
|
boolean |
areAnySelectedItemsExpanded()
|
void |
createTreeItems(TreeItem widget,
Object[] children)
Create tree items for the specified children |
void |
expandTo(Object parentObject,
Object remoteObject)
Expands the parent object down to the remote object |
void |
expandTo(String filterString)
Expand to the object specified by the filter string |
List |
findAllRemoteItemReferences(Object element,
Object elementObject,
List matches)
Recursively tries to find a given remote object. |
Item |
findFirstRemoteItemReference(Object remoteObject,
Item parentItem)
Find the first binary-match or name-match of a remote object, given its binary object. |
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. |
Tree |
getTree()
Return the Tree widget |
Item |
getViewerItem()
Returns the tree item of the first selected object. |
boolean |
isExpandable(Object elementOrTreePath)
Checks whether the element is expandable or not |
boolean |
isSelectedOrChildSelected(Object parentElement)
Helper method to determine if a given object is currently selected. |
ISystemFilterReference |
revealAndExpand(ISubSystem parentSubSystem,
ISystemFilter filter)
Expand a given filter, given a subsystem that contains a reference to the filter's pool. |
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 |
setAutoExpandLevel(int level)
Sets the auto expand level for the corresponding tree |
void |
updatePropertySheet()
Called when a property is updated and we need to inform the Property Sheet viewer. |
Method Detail |
---|
boolean sameParent()
void select(Object element, boolean expand)
element
- the element in the tree to selectexpand
- true if the element is to be expandedint getChildCount(Object element)
element
- the element in the tree to query
Object getSelectedParent()
Object getPreviousElement()
Object getNextElement()
Object getRootParent()
Object[] getElementNodes(Object element)
element
- the element from which to begin
boolean isSelectedOrChildSelected(Object parentElement)
parentElement
- the element to query
void updatePropertySheet()
Item getViewerItem()
boolean areAnySelectedItemsExpanded()
boolean areAnySelectedItemsExpandable()
Item findFirstRemoteItemReference(Object remoteObject, Item parentItem)
remoteObject
- - The remote object to find.parentItem
- - Optionally, the parent item to start the search at
ISystemFilterReference revealAndExpand(ISubSystem parentSubSystem, ISystemFilter filter)
parentSubSystem
- - the subsystem containing a reference to the filter's parent poolfilter
- - the filter to find, reveal, and expand within the subsystem context
Tree getTree()
void createTreeItems(TreeItem widget, Object[] children)
widget
- the parent item for the items to createchildren
- the children to create items forList findAllRemoteItemReferences(Object element, Object elementObject, List matches)
element
- the remote object to which we want to find a tree item which references it. Can be a string or an objectelementObject
- the actual remote element to find, for binary matching, optionally for cases when element is a stringmatches
- the List to populate with hits, or null
to
get a new List created and returned with the hits.
null
if null
was passed in as the List to populate and no hits were found.void setAutoExpandLevel(int level)
level
- the level to expandvoid addDoubleClickListener(IDoubleClickListener listener)
listener
- the listener to addboolean isExpandable(Object elementOrTreePath)
elementOrTreePath
- the object to expand
void expandTo(Object parentObject, Object remoteObject)
parentObject
- the parent objectremoteObject
- the child objectvoid expandTo(String filterString)
filterString
- the string represending the object to expand tovoid addFilter(ViewerFilter filter)
filter
- the view filtervoid addSelectionChangedListener(ISelectionChangedListener listener)
listener
- the listener
|
RSE Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |