Extension SDK

oracle.jdevimpl.uieditor
Class AbstractCanvas

java.lang.Object
  extended byoracle.ide.addin.AbstractView
      extended byoracle.ide.explorer.AbstractExplorer
          extended byoracle.jdevimpl.uieditor.AbstractCanvas
All Implemented Interfaces:
ContextMenuListener, Explorer, Helpable, Subview, UIEditorCanvas, View, ViewSelectionListener
Direct Known Subclasses:
DefaultCanvas, UIExplorer

public abstract class AbstractCanvas
extends AbstractExplorer
implements UIEditorCanvas, ViewSelectionListener, ContextMenuListener


Field Summary
protected  UIEditor editor
           
protected static javax.swing.JSeparator LAYOUT_SEPARATOR
           
protected  oracle.jdeveloper.cmt.CmtModel model
           
protected static IdeAction SERIALIZE_ACTION
           
protected static javax.swing.JMenuItem SERIALIZE_ITEM
           
protected static javax.swing.JSeparator SERIALIZE_SEPARATOR
           
static int X_MARGIN
           
static int Y_MARGIN
           
 
Fields inherited from class oracle.ide.explorer.AbstractExplorer
defaultDocument, defaultProject, defaultWorkspace
 
Fields inherited from class oracle.ide.addin.AbstractView
owner, SEPARATOR, viewListeners, viewSelectionListeners
 
Fields inherited from interface oracle.ide.explorer.Explorer
CLOSED, HIDDEN, SHOWN
 
Fields inherited from interface oracle.ide.addin.View
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP
 
Constructor Summary
protected AbstractCanvas()
          Constructor.
 
Method Summary
 void close()
          Closes the view
 Context getContext()
          Gets the current view context.
 Context getContext(java.util.EventObject e)
          Gets the current view context.
 Controller getController()
          Gets the Controller associated with this view.
 java.awt.Component getDefaultFocusComponent()
          Get the default Component upon which to set focus when focus is switched to the hosting UI Editor.
 oracle.jdeveloper.cmt.CmtModel getModel()
          Get the CmtModel being depicted.
protected  java.awt.Component getPrecedingContextItem()
           
 Element[] getSelection()
          Gets the selection context.
 UIEditor getUIEditor()
          Get the UIEditor host instance.
 boolean handleDefaultAction(Context context)
          Called when the user double clicks on an item that has a popup menu.
 void poppingDown(ContextMenu cMenu)
           
 void poppingUp(ContextMenu cMenu)
          Called just before the context menu is popping up.
 void setContext(Context context)
          (Re)initialize the contents of the gui.
 void setModel(oracle.jdeveloper.cmt.CmtModel model)
          Set the CmtModel to be depicted.
 void setOwner(View owner)
          Set the View which is to act as the host of this Explorer.
 void stateChanged(int state)
          Respond to a change of state between SHOWN, HIDDEN or CLOSED.
 void viewSelectionChanged(ViewSelectionEvent e)
          This method is called every time the selection changes in a view.
 
Methods inherited from class oracle.ide.explorer.AbstractExplorer
getContextMenu
 
Methods inherited from class oracle.ide.addin.AbstractView
activate, addViewListener, addViewSelectionListener, deactivate, fireViewActivated, fireViewClosed, fireViewDeactivated, fireViewSelectionChanged, getHelpInfo, getId, getToolbar, isVisible, loadToolbar, loadToolbar, newId, owner, removeViewListener, removeViewSelectionListener, setId, show, updateTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.ide.addin.View
activate, addViewListener, addViewSelectionListener, deactivate, getId, getToolbar, removeViewListener, removeViewSelectionListener, updateTitle
 
Methods inherited from interface oracle.ide.help.Helpable
getHelpInfo
 
Methods inherited from interface oracle.ide.addin.Subview
getContextMenu, getGUI, isVisible, owner, show
 

Field Detail

X_MARGIN

public static final int X_MARGIN
See Also:
Constant Field Values

Y_MARGIN

public static final int Y_MARGIN
See Also:
Constant Field Values

LAYOUT_SEPARATOR

protected static javax.swing.JSeparator LAYOUT_SEPARATOR

SERIALIZE_SEPARATOR

protected static javax.swing.JSeparator SERIALIZE_SEPARATOR

SERIALIZE_ITEM

protected static javax.swing.JMenuItem SERIALIZE_ITEM

SERIALIZE_ACTION

protected static IdeAction SERIALIZE_ACTION

editor

protected UIEditor editor

model

protected oracle.jdeveloper.cmt.CmtModel model
Constructor Detail

AbstractCanvas

protected AbstractCanvas()
Constructor. Protected access to prevent direct creation.

Method Detail

getUIEditor

public final UIEditor getUIEditor()
Description copied from interface: UIEditorCanvas
Get the UIEditor host instance.

Specified by:
getUIEditor in interface UIEditorCanvas

getController

public Controller getController()
Gets the Controller associated with this view. By default just returns the controller of the UIEditor. Subclasses overriding this method should ensure that the Controller returned defers to the UIEditorController singleton from the its Controller.supervisor() implementation to ensure consistent UIEditor behavior.

Specified by:
getController in interface Subview
Overrides:
getController in class AbstractView
Returns:
the Controller associated with this view.

getContext

public final Context getContext()
Description copied from interface: Subview
Gets the current view context.

Specified by:
getContext in interface Subview
Overrides:
getContext in class AbstractView
Returns:
the current view context.

getContext

public final Context getContext(java.util.EventObject e)
Description copied from interface: View
Gets the current view context.

Specified by:
getContext in interface View
Parameters:
e - event associated with the context;
Returns:
the current view context.

setContext

public void setContext(Context context)
Description copied from interface: Explorer
(Re)initialize the contents of the gui.

Specified by:
setContext in interface Explorer
Overrides:
setContext in class AbstractExplorer

setOwner

public void setOwner(View owner)
Description copied from interface: Explorer
Set the View which is to act as the host of this Explorer.

Specified by:
setOwner in interface Explorer
Overrides:
setOwner in class AbstractExplorer

getSelection

public final Element[] getSelection()
Description copied from interface: View
Gets the selection context. Within a view multiple objects can be selected. This method returns a list of selected objects.

Specified by:
getSelection in interface View
Overrides:
getSelection in class AbstractView
Returns:
list of selected items in the view.

getModel

public oracle.jdeveloper.cmt.CmtModel getModel()
Description copied from interface: UIEditorCanvas
Get the CmtModel being depicted.

Specified by:
getModel in interface UIEditorCanvas

setModel

public void setModel(oracle.jdeveloper.cmt.CmtModel model)
Description copied from interface: UIEditorCanvas
Set the CmtModel to be depicted.

Specified by:
setModel in interface UIEditorCanvas

getDefaultFocusComponent

public java.awt.Component getDefaultFocusComponent()
Description copied from interface: UIEditorCanvas
Get the default Component upon which to set focus when focus is switched to the hosting UI Editor.

Specified by:
getDefaultFocusComponent in interface UIEditorCanvas
See Also:
oracle.ide.editor.AbstractEditor.getDefaultFocusComponent

viewSelectionChanged

public void viewSelectionChanged(ViewSelectionEvent e)
Description copied from interface: ViewSelectionListener
This method is called every time the selection changes in a view. The ViewSelectionEvent object has detailed information of the objects selected in the view.

Specified by:
viewSelectionChanged in interface ViewSelectionListener

stateChanged

public void stateChanged(int state)
Description copied from interface: Explorer
Respond to a change of state between SHOWN, HIDDEN or CLOSED.

Specified by:
stateChanged in interface Explorer
Overrides:
stateChanged in class AbstractExplorer

close

public void close()
Description copied from interface: Subview
Closes the view

Specified by:
close in interface Subview
Overrides:
close in class AbstractView

poppingUp

public void poppingUp(ContextMenu cMenu)
Description copied from interface: ContextMenuListener
Called just before the context menu is popping up.

Specified by:
poppingUp in interface ContextMenuListener

poppingDown

public void poppingDown(ContextMenu cMenu)
Specified by:
poppingDown in interface ContextMenuListener

handleDefaultAction

public boolean handleDefaultAction(Context context)
Description copied from interface: ContextMenuListener
Called when the user double clicks on an item that has a popup menu. Only one listener should return true from this menu.

Specified by:
handleDefaultAction in interface ContextMenuListener
Parameters:
context - the current context

getPrecedingContextItem

protected java.awt.Component getPrecedingContextItem()

Extension SDK

 

Copyright ©1997, 2003, Oracle. All rights reserved.