|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.part.DrillDownAdapter
Implements a simple web style navigation metaphor for a TreeViewer
.
Home, back, and "drill into" functions are supported for the viewer,
To use the DrillDownAdapter
..
TreeViewer
. DrillDownAdapter
for the viewer.
If the input for the underlying viewer is changed by something other than the
adapter the reset
method should be called. This will clear
the drill stack and update the navigation buttons to reflect the new
state of the underlying viewer.
Constructor Summary | |
DrillDownAdapter(TreeViewer tree)
Allocates a new DrillDownTreePart. |
Method Summary | |
void |
addNavigationActions(IMenuManager manager)
Adds actions for "go back", "go home", and "go into" to a menu manager. |
void |
addNavigationActions(IToolBarManager toolBar)
Adds actions for "go back", "go home", and "go into" to a tool bar manager. |
boolean |
canExpand(IAdaptable element)
Returns whether expansion is possible for the current selection. |
boolean |
canGoBack()
Returns whether "go back" is possible for child tree. |
boolean |
canGoHome()
Returns whether "go home" is possible for child tree. |
boolean |
canGoInto()
Returns whether "go into" is possible for child tree. |
void |
goBack()
Reverts the input for the tree back to the state when goInto
was last called. |
void |
goHome()
Reverts the input for the tree back to the state when the adapter was created. |
void |
goInto()
Sets the input for the tree to the current selection. |
void |
goInto(IAdaptable newInput)
Sets the input for the tree to a particular item in the tree. |
void |
reset()
Resets the drill down adapter. |
void |
selectionChanged(SelectionChangedEvent event)
Updates the navigation buttons when a selection change occurs in the tree. |
protected void |
updateNavigationButtons()
Updates the enabled state for each navigation button. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DrillDownAdapter(TreeViewer tree)
tree
- the target tree for refocusingMethod Detail |
public void addNavigationActions(IMenuManager manager)
manager
- is the target manager to updatepublic void addNavigationActions(IToolBarManager toolBar)
public boolean canExpand(IAdaptable element)
element
- the object to test for expansion
true
if expansion is possible; otherwise
return false
public boolean canGoBack()
true
if "go back" is possible; false
otherwisepublic boolean canGoHome()
true
if "go home" is possible; false
otherwisepublic boolean canGoInto()
true
if "go into" is possible; false
otherwisepublic void goBack()
goInto
was last called.
A frame is removed from the drill stack. Then that frame is used to reset the input and expansion state for the child tree.
public void goHome()
All of the frames are removed from the drill stack. Then the oldest frame is used to reset the input and expansion state for the child tree.
public void goInto()
The current input and expansion state are saved in a frame and added to the drill stack. Then the input for the tree is changed to be the current selection. The expansion state for the tree is maintained during the operation.
On return the client may revert back to the previous state by invoking
goBack
or goHome
.
public void goInto(IAdaptable newInput)
The current input and expansion state are saved in a frame and added to the
drill stack. Then the input for the tree is changed to be newInput
.
The expansion state for the tree is maintained during the operation.
On return the client may revert back to the previous state by invoking
goBack
or goHome
.
newInput
- the new input elementpublic void reset()
This method is typically called when the input for the underlying view is reset by something other than the adapter. On return the drill stack has been cleared and the navigation buttons reflect the new state of the underlying viewer.
public void selectionChanged(SelectionChangedEvent event)
selectionChanged
in interface ISelectionChangedListener
event
- event object describing the changeprotected void updateNavigationButtons()
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |