public abstract class AbstractBaseTreeDockable extends DockableWindow implements Controller, ContextMenuListener
CLOSED, HIDDEN, SHOWN
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
DEFAULT_VISIBILITY_MINIMIZED, DEFAULT_VISIBILITY_RAISED, DEFAULT_VISIBILITY_VISIBLE, TYPE_DISCARDABLE, TYPE_FORGETTABLE, TYPE_GLOBAL_VISIBLE, TYPE_NO_BUTTONS, TYPE_NORMAL, TYPE_NOT_TABBED, TYPE_RECYCLABLE, TYPE_TRUNCATE_TITLE
Constructor and Description |
---|
AbstractBaseTreeDockable(java.lang.String viewId) |
Modifier and Type | Method and Description |
---|---|
ContextMenu |
getContextMenu() |
protected abstract int[] |
getContextMenuActionIds() |
Controller |
getController()
Get the
Controller associated with this view. |
int |
getDefaultVisibility(Layout layout)
The first time a Dockable is exposed to a layout, if the dockable is not of type
Dockable.TYPE_GLOBAL_VISIBLE ,
it will be asked if it wants to be shown in that layout. |
protected abstract java.lang.String |
getEmptyTipText() |
java.awt.Component |
getGUI() |
protected abstract RescatContext |
getRescatContext() |
protected abstract Element |
getRootNode() |
protected Element[] |
getSelectionFromUI()
This method retrieve's the selection in this View directly from the UI.
|
protected Element |
getSelectionRoot(java.lang.Class<? extends Element> ofInstance) |
java.lang.String |
getTitleName()
Gets title to display in a title bar.
|
boolean |
handleDefaultAction(Context context)
Called when the user double clicks on an item that has a
context menu.
|
boolean |
handleEvent(IdeAction action,
Context context)
This method is called when a user interaction with a
View
triggers the execution of a command. |
void |
menuWillHide(ContextMenu contextMenu)
This method is called just before a showing context menu is
dismissed.
|
void |
menuWillShow(ContextMenu contextMenu)
Called just before the context menu is shown.
|
boolean |
update(IdeAction action,
Context context)
This method updates the enabled status of the specified action within the
specified context.
|
void |
updateRootNode(Element rootNode) |
addTitleChangeListener, close, dockableHidden, dockableShown, fireTitleChangeListener, getCachedDockable, getHeaderComponents, getHostedComponent, getMenuTitle, getSite, getTabDropListener, getTabIcon, getType, getUniqueName, isDrawer, isVisible, removeTitleChangeListener, setDockableVisible, setSite, setType, show, stateChange, updateTitle
afterAutoExpanding, afterRestoringFromAutoExpansion, beforeAutoExpanding, getAutoExpansionPreferredSize, getAutoExpansionSize, isAutoExpandable, isAutoExpandableEnabled, setAutoExpandable, setAutoExpandableEnabled
activate, deactivate, getContext, getDecorated, getHelpInfo, getToolbar, getViewWithoutDecoration, isDecorated, loadLayout, newId, saveLayout, setDecorated, setOwner, setToolbarVisible, updateVisibleActions
addViewListener, addViewSelectionListener, addViewStateListener, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getId, getSelection, getTabName, loadManifestToolbar, loadManifestToolbar, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, scheduleUpdateSelection, setId, toString, updateSelection, updateSelectionImpl, updateToolbarActions, updateVisibleActions
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTabName, loadLayout, saveLayout
public AbstractBaseTreeDockable(java.lang.String viewId)
protected abstract Element getRootNode()
protected abstract java.lang.String getEmptyTipText()
public final Controller getController()
ControllerProvider
Controller
associated with this view.getController
in interface ControllerProvider
getController
in class ViewDecorator
public boolean update(IdeAction action, Context context)
Controller
update
in interface Controller
action
- action whose command is to be executed.context
- the current contextpublic boolean handleEvent(IdeAction action, Context context)
Controller
View
triggers the execution of a command.handleEvent
in interface Controller
action
- action whose command is to be executed.public java.awt.Component getGUI()
getGUI
in class ViewDecorator
public ContextMenu getContextMenu()
getContextMenu
in class ViewDecorator
ContextMenu
, if any.public void updateRootNode(Element rootNode)
public final java.lang.String getTitleName()
Dockable
getTitleName
in interface Dockable
Dockable.getTabIcon()
public void menuWillShow(ContextMenu contextMenu)
ContextMenuListener
menuWillShow
in interface ContextMenuListener
contextMenu
- the context menu being shownprotected abstract int[] getContextMenuActionIds()
public void menuWillHide(ContextMenu contextMenu)
ContextMenuListener
ContextMenuListener.menuWillShow(oracle.ide.controller.ContextMenu)
, since the IDE takes care of that
automatically.menuWillHide
in interface ContextMenuListener
contextMenu
- the context menu being hiddenpublic final boolean handleDefaultAction(Context context)
ContextMenuListener
true
; otherwise it must return
false
. Processing of handleDefaultAction
stops on the first return of true
.handleDefaultAction
in interface ContextMenuListener
context
- the context on which the default action needs
to occur.public int getDefaultVisibility(Layout layout)
Dockable
Dockable.TYPE_GLOBAL_VISIBLE
,
it will be asked if it wants to be shown in that layout.getDefaultVisibility
in interface Dockable
getDefaultVisibility
in class DockableWindow
protected final Element[] getSelectionFromUI()
View
getSelectionFromUI
in class ViewDecorator
protected final Element getSelectionRoot(java.lang.Class<? extends Element> ofInstance)
ofInstance
class.protected abstract RescatContext getRescatContext()