Extension SDK 10.1.2

oracle.ide.addin
Interface View

All Superinterfaces:
ControllerProvider, Helpable
All Known Subinterfaces:
CodeEditorGutter, DockableView, Editor, EditorFrame, Explorer, ExplorerWindow, FlatEditor, InspectorWindow, LogOwner, LogPage, LogWindow, NavigatorWindow, PaletteWindow, TreeExplorer, UICanvas, UIEditorCanvas
All Known Implementing Classes:
AbstractCanvas, AbstractEditor, AbstractExplorer, AbstractFlatEditor, AbstractLogPage, AbstractView, DockableWindow, IdeMainWindow

public interface View
extends ControllerProvider, Helpable

View components dispaly information to the user. A view obtains the data from the model. There can be multiple views of the model. Each View has an associated Controller. Controllers receive requests to handle the commands associated with user interaction with the view. A view can own other views. For example, all views are owned by the IdeMainWindow view.

See Also:
Controller, IdeMainWindow

Field Summary
static java.lang.String PROJECT_PROP
           
static java.lang.String VISIBLE_PROP
           
static java.lang.String WORKSPACE_PROP
           
 
Method Summary
 void activate()
          Respond to the fact that this View is now the active view (e.g.
 void addViewListener(ViewListener l)
          Add a ViewListener.
 void addViewSelectionListener(ViewSelectionListener l)
          Add a ViewSelectionListener.
 void close()
          Close the view
 void deactivate()
          Respond to the fact that this View is no longer the active view
 Context getContext()
          Gets the current view context.
 Context getContext(java.util.EventObject event)
          Get the current view context for the given EventObject.
 ContextMenu getContextMenu()
          Get the ContextMenu object, if any, managed by this View.
 java.awt.Component getGUI()
          Get the root graphical user interface component.
 java.lang.String getId()
          Unique id identifying this view.
 Element[] getSelection()
          Get the selection.
 Toolbar getToolbar()
          Get the toolbar associated with this view.
 boolean isVisible()
          Determine whether the View is visible.
 View owner()
          Get the owning View.
 void removeViewListener(ViewListener l)
          Remove a ViewListener.
 void removeViewSelectionListener(ViewSelectionListener l)
          Remmove a ViewSelectionListener.
 void setToolbarVisible(boolean visible)
          Set the visibility of any toolbar associated with this view.
 void show()
          Show the view if hidden.
 void updateTitle(java.lang.Object object)
          Called when the view needs to update its title based on the specified object.
 void updateVisibleActions(UpdateInfo updateInfo)
          Called when the IDE or an extension requests that the View update the enabled state of any actions that are visible on screen.
 
Methods inherited from interface oracle.ide.addin.ControllerProvider
getController
 
Methods inherited from interface oracle.ide.help.Helpable
getHelpInfo
 

Field Detail

VISIBLE_PROP

public static final java.lang.String VISIBLE_PROP
See Also:
Constant Field Values

PROJECT_PROP

public static final java.lang.String PROJECT_PROP
See Also:
Constant Field Values

WORKSPACE_PROP

public static final java.lang.String WORKSPACE_PROP
See Also:
Constant Field Values
Method Detail

owner

public View owner()
Get the owning View. In general, views should return the IdeMainWindow as their owner, but should return a different value if nested within another View.


close

public void close()
Close the view


show

public void show()
Show the view if hidden. Raise the view to the top if covered by other windows.


isVisible

public boolean isVisible()
Determine whether the View is visible.


getGUI

public java.awt.Component getGUI()
Get the root graphical user interface component.


getContext

public Context getContext()
Gets the current view context.


getContext

public Context getContext(java.util.EventObject event)
Get the current view context for the given EventObject.

Parameters:
event - event associated with the context;

getContextMenu

public ContextMenu getContextMenu()
Get the ContextMenu object, if any, managed by this View.


activate

public void activate()
Respond to the fact that this View is now the active view (e.g. adding/removing toolbars etc.).


deactivate

public void deactivate()
Respond to the fact that this View is no longer the active view


getSelection

public Element[] getSelection()
Get the selection. Within a view multiple objects can be selected. This method returns an array of selected objects.


getId

public java.lang.String getId()
Unique id identifying this view. In general, the id is made up of the name of the view and the element name loaded in the view. For example, a navigator window may have the following id: NavigatorWindow.Project1 where Project1 is the name component of the project node.


updateTitle

public void updateTitle(java.lang.Object object)
Called when the view needs to update its title based on the specified object.


updateVisibleActions

public void updateVisibleActions(UpdateInfo updateInfo)
Called when the IDE or an extension requests that the View update 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 Views.

Parameters:
updateInfo - This parameter provides 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 updateInfo indicates that the source of the update is not relevant to the debugger.

getToolbar

public Toolbar getToolbar()
Get the toolbar associated with this view.


setToolbarVisible

public void setToolbarVisible(boolean visible)
Set the visibility of any toolbar associated with this view.

Parameters:
visible - true to display the Toolbar, false to hide the Toolbar

addViewListener

public void addViewListener(ViewListener l)
Add a ViewListener.

Parameters:
l - the ViewListener to add.

removeViewListener

public void removeViewListener(ViewListener l)
Remove a ViewListener.

Parameters:
l - the ViewListener to remove.

addViewSelectionListener

public void addViewSelectionListener(ViewSelectionListener l)
Add a ViewSelectionListener.

Parameters:
l - the ViewSelectionListener to add.

removeViewSelectionListener

public void removeViewSelectionListener(ViewSelectionListener l)
Remmove a ViewSelectionListener.

Parameters:
l - the ViewSelectionListener to remove.

Extension SDK

 

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