public class ViewDecorator extends View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
Modifier | Constructor and Description |
---|---|
protected |
ViewDecorator(View decorated)
Creates a ViewDecorator.
|
Modifier and Type | Method and Description |
---|---|
void |
activate() |
void |
close() |
void |
deactivate()
Cleans up after this view stops being the active view.
|
Context |
getContext(java.util.EventObject event) |
ContextMenu |
getContextMenu() |
Controller |
getController()
Get the
Controller associated with this view. |
protected View |
getDecorated() |
java.awt.Component |
getGUI() |
HelpInfo |
getHelpInfo() |
protected Element[] |
getSelectionFromUI()
This method retrieve's the selection in this View directly from the UI.
|
Toolbar |
getToolbar()
Get the toolbar associated with this view.
|
View |
getViewWithoutDecoration()
Returns the View without any decorators.
|
protected boolean |
isDecorated() |
boolean |
isVisible() |
void |
loadLayout(PropertyAccess p) |
protected java.lang.String |
newId()
Generates a unique view ID.
|
void |
saveLayout(PropertyAccess p) |
protected void |
setDecorated(View decorated) |
protected void |
setOwner(View owner) |
void |
setToolbarVisible(boolean visible) |
void |
show()
Shows the view if hidden.
|
void |
updateTitle(java.lang.Object obj)
Called when the view needs to update its title based on the specified object.
|
void |
updateVisibleActions(UpdateMessage updateMessage)
Called when the IDE or an extension requests that the
View updates the enabled state of any actions
that are visible on screen. |
addViewListener, addViewSelectionListener, addViewStateListener, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getId, getSelection, getTabName, loadManifestToolbar, loadManifestToolbar, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, scheduleUpdateSelection, setId, toString, updateSelection, updateSelectionImpl, updateToolbarActions, updateVisibleActions
protected ViewDecorator(View decorated)
decorated
- the View to decorateprotected final View getDecorated()
protected void setDecorated(View decorated)
public View getViewWithoutDecoration()
View
getViewWithoutDecoration
in class View
public void deactivate()
View
deactivate
in class View
public Context getContext(java.util.EventObject event)
getContext
in class View
event
- event associated with the context.public ContextMenu getContextMenu()
getContextMenu
in class View
ContextMenu
, if any.public Controller getController()
ControllerProvider
Controller
associated with this view.getController
in interface ControllerProvider
getController
in class View
public java.awt.Component getGUI()
public HelpInfo getHelpInfo()
getHelpInfo
in interface Helpable
getHelpInfo
in class View
protected Element[] getSelectionFromUI()
View
getSelectionFromUI
in class View
public Toolbar getToolbar()
View
getToolbar
in class View
public void loadLayout(PropertyAccess p)
loadLayout
in class View
protected java.lang.String newId()
View
public void saveLayout(PropertyAccess p)
saveLayout
in class View
public void setToolbarVisible(boolean visible)
setToolbarVisible
in class View
public void show()
View
public void updateTitle(java.lang.Object obj)
View
updateTitle
in class View
obj
- the specified object.public void updateVisibleActions(UpdateMessage updateMessage)
View
View
updates the enabled state of any actions
that are visible on screen. Typically this will involve updating actions that are in visible toolbars. If a
View
contains or manages other nested instances of View
, the outer call to
updateVisibleActions
should propagate inward to call the updateVisibleActions
of all
visible, nested View
s.updateVisibleActions
in class View
updateMessage
- information on what is triggering the update. Implementations may make use of this
information to decide whether or not an update is necessary, since updating the enabled state of a toolbar button
may be a lengthy operation. For example, buttons that control a remote debugger would involve network I/O and
evaluating their updated state could be avoided if the updateMessage indicates that the source of the update is not
relevant to the debugger.protected boolean isDecorated()