|
Extension SDK 10.1.3.36.73 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectoracle.ide.view.View
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.
oracle.ide.addin.Controller,
IdeMainWindow| Field Summary | |
static Element[] |
EMPTY_SELECTION
|
static java.lang.String |
PROJECT_PROP
|
static java.lang.String |
VISIBLE_PROP
|
static java.lang.String |
WORKSPACE_PROP
|
| Constructor Summary | |
protected |
View()
|
protected |
View(java.lang.String viewId)
|
| Method Summary | |
void |
activate()
Respond to the fact that this View is now the active view (e.g. adding/removing toolbars etc.). |
void |
addViewListener(ViewListener l)
Add a ViewListener. |
void |
addViewSelectionListener(ViewSelectionListener l)
Add a ViewSelectionListener. |
void |
close()
Close the view |
void |
deactivate()
This method is responsible for cleaning up after this view stops being the active view. |
protected void |
fireViewClosed()
|
protected void |
fireViewSelectionChanged(ViewSelectionEvent e)
|
Context |
getContext()
Gets the current view context. |
Context |
getContext(java.util.EventObject event)
Get the current view context for the given EventObject. |
ContextMenu |
getContextMenu()
Gets the ContextMenu object, if any, managed by this instance. |
Controller |
getController()
Gets the Controller associated with this view. |
abstract java.awt.Component |
getGUI()
Get the root graphical user interface component. |
HelpInfo |
getHelpInfo()
|
java.lang.String |
getId()
Unique id identifying this view. |
Element[] |
getSelection()
Gets the selection. |
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. |
boolean |
isVisible()
Determine whether the View is visible. |
static void |
loadManifestToolbar(java.lang.String toolbarId,
Toolbar toolbar)
Installs toolbar buttons for the specified Toolbar. |
static void |
loadManifestToolbar(java.lang.String toolbarId,
Toolbar toolbar,
View view)
Installs toolbar buttons for the specified Toolbar. |
protected java.lang.String |
newId()
Generates an unique view ID. |
View |
owner()
Get the owning View. |
void |
removeViewListener(ViewListener l)
Remove a ViewListener. |
void |
removeViewSelectionListener(ViewSelectionListener l)
Remmove a ViewSelectionListener. |
void |
scheduleUpdateSelection()
A variation of updateSelection() that delays the firing
of the ViewSelectionEvent using a timer delay. |
protected void |
setId(java.lang.String id)
|
protected void |
setOwner(View owner)
|
void |
setToolbarVisible(boolean visible)
Set the visibility of any toolbar associated with this view. |
void |
show()
Shows the view if hidden. |
void |
updateSelection()
Subclasses should call this method to update the selection returned from getSelection() and to fire the ViewSelectionEvent.
|
protected void |
updateSelectionImpl(boolean doNotifyOnInvokeLater)
|
void |
updateTitle(java.lang.Object object)
Called when the view needs to update its title based on the specified object. |
static void |
updateToolbarActions(Toolbar toolbar)
Utility method for updating the actions contained in a toolbar. |
void |
updateVisibleActions()
Method for updating the visible actions associated with this view. |
void |
updateVisibleActions(UpdateMessage updateMessage)
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String VISIBLE_PROP
public static final java.lang.String PROJECT_PROP
public static final java.lang.String WORKSPACE_PROP
public static final Element[] EMPTY_SELECTION
| Constructor Detail |
protected View()
protected View(java.lang.String viewId)
| Method Detail |
public Controller getController()
Controller associated with this view.
getController in interface ControllerProviderpublic HelpInfo getHelpInfo()
getHelpInfo in interface Helpablepublic final View owner()
IdeMainWindow as their owner, but should return a different
value if nested within another View.
public void close()
public void show()
public boolean isVisible()
public abstract java.awt.Component getGUI()
public final Context getContext()
public Context getContext(java.util.EventObject event)
event - event associated with the context;public ContextMenu getContextMenu()
public void activate()
public void deactivate()
public final Element[] getSelection()
public final java.lang.String getId()
public void updateTitle(java.lang.Object object)
public void updateVisibleActions(UpdateMessage updateMessage)
updateMessage - 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 updateMessage indicates that the
source of the update is not relevant to the debugger.public Toolbar getToolbar()
public void setToolbarVisible(boolean visible)
visible - true to display the Toolbar, false to hide the Toolbarpublic final void addViewListener(ViewListener l)
l - the ViewListener to add.public final void removeViewListener(ViewListener l)
l - the ViewListener to remove.public final void addViewSelectionListener(ViewSelectionListener l)
l - the ViewSelectionListener to add.public final void removeViewSelectionListener(ViewSelectionListener l)
l - the ViewSelectionListener to remove.public final void updateSelection()
getSelection() and to fire the ViewSelectionEvent.
The event is fired synchronously, so this method will block until
all listeners have been notified.
See scheduleUpdateSelection() for a variation that delays
selection change notification using a timer delay.
This method must be called on the Swing/AWT event dispatch thread.
public final void scheduleUpdateSelection()
updateSelection() that delays the firing
of the ViewSelectionEvent using a timer delay. This method is
useful when multiple selection changes could possibly occur in
rapid sucession. When using this method, notification is not sent
until a minimum interval (around 250ms) passes without another
call to scheduleUpdateSelection() ocurring.
Despite the notification delay, this method must still be called
on the Swing/AWT event dispatch thread. The View's current
selection is retrieved from the UI via getSelectionFromUI().
public final void updateVisibleActions()
public static final void updateToolbarActions(Toolbar toolbar)
toolbar - The toolbar whose actions should be updated.
public static final void loadManifestToolbar(java.lang.String toolbarId,
Toolbar toolbar,
View view)
Toolbar.
toolbarId - the id of the toolbar to loadtoolbar - the toolbar to install items intoview - the (optional) view to use. If specified, the toolbar
is owned by a view and all actions will only work with that
view's context.
public static final void loadManifestToolbar(java.lang.String toolbarId,
Toolbar toolbar)
Toolbar.
toolbarId - the id of the toolbar to loadtoolbar - the toolbar to install items intoprotected Element[] getSelectionFromUI()
protected final void updateSelectionImpl(boolean doNotifyOnInvokeLater)
protected final void setId(java.lang.String id)
protected java.lang.String newId()
protected void setOwner(View owner)
protected void fireViewSelectionChanged(ViewSelectionEvent e)
protected final void fireViewClosed()
|
Extension SDK 10.1.3.36.73 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Copyright © 1997, 2005, Oracle.All rights reserved.