public abstract class AbstractCanvas extends UIEditorCanvas implements ViewSelectionListener, ContextMenuListener
UIEditorCanvas
,
Explorer
Modifier and Type | Field and Description |
---|---|
protected UIEditor |
editor
UIEditor to which this canvas is associated.
|
protected CmtModel |
model
Current model being rendered by this canvas.
|
protected static IdeAction |
SERIALIZE_ACTION
IdeAction for serializing a selected GUI control.
|
static javax.swing.JMenuItem |
SERIALIZE_ITEM
Item to appear in main menu for serializing a selected GUI control.
|
static int |
X_MARGIN
The horizontal inset to use when redering a GUI on a UIEditorCanvas.
|
static int |
Y_MARGIN
The vertical inset to use when rendering a GUI on a UIEditorCanvas.
|
CLOSED, defaultNode, defaultProject, defaultWorkspace, HIDDEN, SHOWN
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
Modifier | Constructor and Description |
---|---|
protected |
AbstractCanvas()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Respond to the associated UIEditor closing.
|
Context |
getContext(java.util.EventObject e)
Get the Context relative to the given event.
|
Controller |
getController()
Gets the
Controller associated with this view. |
java.awt.Component |
getDefaultFocusComponent()
Get the Component that should reciev focus upon activation of this canvas.
|
CmtModel |
getModel()
Get the current model being rendered.
|
protected Element[] |
getSelectionFromUI()
Get the current selection.
|
UIEditor |
getUIEditor()
Get the UIEditor associated with this UIEditorCanvas.
|
boolean |
handleDefaultAction(Context context)
Handle the default action of the UIEditor ContextMenu.
|
void |
menuWillHide(ContextMenu cMenu)
Respond to the UIEditor ContextMenu popping down.
|
void |
menuWillShow(ContextMenu cMenu)
Respond to the UIEditor ContextMenu popping up.
|
void |
setContext(Context context)
Set the Context.
|
void |
setModel(CmtModel model)
Set the current model to render.
|
void |
setOwner(View owner)
Set the owning View.
|
void |
stateChanged(int state)
Respond to a change of state between hidden, shown or closed.
|
void |
viewSelectionChanged(ViewSelectionEvent e)
Respond to a ViewSelectionEvent in our associated UIEditor by firing our
own ViewSelectionEvent reflecting the new selection.
|
getContextMenu, getTitle
activate, addViewListener, addViewSelectionListener, addViewStateListener, deactivate, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getGUI, getHelpInfo, getId, getSelection, getTabName, getToolbar, getViewWithoutDecoration, isVisible, loadLayout, loadManifestToolbar, loadManifestToolbar, newId, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, saveLayout, scheduleUpdateSelection, setId, setToolbarVisible, show, toString, updateSelection, updateSelectionImpl, updateTitle, updateToolbarActions, updateVisibleActions, updateVisibleActions
public static final int X_MARGIN
public static final int Y_MARGIN
public static javax.swing.JMenuItem SERIALIZE_ITEM
protected static IdeAction SERIALIZE_ACTION
protected UIEditor editor
protected CmtModel model
protected AbstractCanvas()
public final UIEditor getUIEditor()
getUIEditor
in class UIEditorCanvas
public Controller getController()
Controller
associated with this view. By default
returns null.getController
in interface ControllerProvider
getController
in class Explorer
public Context getContext(java.util.EventObject e)
getContext
in class View
e
- the event to be considered.View.getContext()
public void setContext(Context context)
setContext
in class Explorer
context
- the Context to depict.editor
,
View.getContext()
,
getContext(EventObject)
public void setOwner(View owner)
protected Element[] getSelectionFromUI()
getSelectionFromUI
in class View
public CmtModel getModel()
getModel
in class UIEditorCanvas
model
,
setModel(oracle.jdeveloper.cmt.CmtModel)
public void setModel(CmtModel model)
setModel
in class UIEditorCanvas
model
- the model to render.model
,
getModel()
public java.awt.Component getDefaultFocusComponent()
getDefaultFocusComponent
in class UIEditorCanvas
public void viewSelectionChanged(ViewSelectionEvent e)
viewSelectionChanged
in interface ViewSelectionListener
e
- ViewSelectionEvent upon the UIEditorpublic void stateChanged(int state)
stateChanged
in class Explorer
state
- the new state.editor
,
oracle.ide.addin.ViewSelectionListener
public void close()
public void menuWillShow(ContextMenu cMenu)
menuWillShow
in interface ContextMenuListener
cMenu
- the ContextMenu popping up.public void menuWillHide(ContextMenu cMenu)
menuWillHide
in interface ContextMenuListener
cMenu
- the ContextMenu popping up.public boolean handleDefaultAction(Context context)
handleDefaultAction
in interface ContextMenuListener
context
- the Context upon which to perform the default action.