|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.addin.AbstractView
AbstractView
provides a default implementation for most methods
defined in the View interface.
View
Field Summary | |
protected View |
owner
|
static java.lang.String |
SEPARATOR
|
protected java.util.Vector |
viewListeners
|
protected java.util.Vector |
viewSelectionListeners
|
Fields inherited from interface oracle.ide.addin.View |
PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP |
Constructor Summary | |
protected |
AbstractView()
|
protected |
AbstractView(java.lang.String viewId)
|
protected |
AbstractView(java.lang.String viewId,
View owner)
|
Method Summary | |
void |
activate()
This method is responsible for responding 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()
Closes the view |
void |
deactivate()
This method is responsible for cleaning up after this view stops being the active view. |
protected void |
fireViewActivated(ViewEvent e)
|
protected void |
fireViewClosed(ViewEvent e)
|
protected void |
fireViewDeactivated(ViewEvent e)
|
protected void |
fireViewSelectionChanged(ViewSelectionEvent e)
|
Context |
getContext()
Gets the current view context. |
ContextMenu |
getContextMenu()
Gets the ContextMenu object, if any, managed by this instance. |
Controller |
getController()
Gets the Controller associated with this view. |
HelpInfo |
getHelpInfo()
|
java.lang.String |
getId()
Unique id identifying this view. |
Element[] |
getSelection()
Gets the selection context. |
Toolbar |
getToolbar()
Returns the toolbar associated with this view. |
boolean |
isVisible()
Determine whether the View is visible. |
static void |
loadToolbar(PropertyAccess properties,
Toolbar toolbar,
java.lang.String tbCountProp,
java.lang.String tbItemProp,
View view)
Creates toolbar buttons for the specified toolbar . |
static void |
loadToolbar(Toolbar toolbar,
java.lang.String tbCountProp,
java.lang.String tbItemProp,
View view)
Creates toolbar buttons for the specified toolbar . |
protected java.lang.String |
newId()
Generates an unique view id. |
View |
owner()
Views can be nested. |
void |
removeViewListener(ViewListener l)
Remove a ViewListener. |
void |
removeViewSelectionListener(ViewSelectionListener l)
Remmove a ViewSelectionListener. |
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 |
updateTitle(java.lang.Object object)
Called when the view needs to update its title based on the specified object. |
static void |
updateToolbarActions(Toolbar toolbar)
|
void |
updateVisibleActions()
|
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface oracle.ide.addin.View |
getContext, getGUI |
Field Detail |
public static final java.lang.String SEPARATOR
protected View owner
protected transient java.util.Vector viewListeners
protected transient java.util.Vector viewSelectionListeners
Constructor Detail |
protected AbstractView(java.lang.String viewId, View owner)
protected AbstractView(java.lang.String viewId)
protected AbstractView()
Method Detail |
public View owner()
IdeMainWindow
as their owner.
owner
in interface View
public Controller getController()
Controller
associated with this view.
getController
in interface ControllerProvider
public void show()
show
in interface View
public boolean isVisible()
View
isVisible
in interface View
public void activate()
activate
in interface View
public void deactivate()
deactivate
in interface View
public final void updateVisibleActions()
public void updateVisibleActions(UpdateInfo updateInfo)
View
updateVisibleActions
in interface View
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.public static void updateToolbarActions(Toolbar toolbar)
public void close()
close
in interface View
public Context getContext()
getContext
in interface View
public Element[] getSelection()
getSelection
in interface View
public java.lang.String getId()
getId
in interface View
protected void setId(java.lang.String id)
protected java.lang.String newId()
public void updateTitle(java.lang.Object object)
updateTitle
in interface View
public Toolbar getToolbar()
getToolbar
in interface View
public void setToolbarVisible(boolean visible)
setToolbarVisible
in interface View
visible
- true to display the Toolbar, false to hide the Toolbarpublic void addViewListener(ViewListener l)
addViewListener
in interface View
l
- the ViewListener to add.public void removeViewListener(ViewListener l)
removeViewListener
in interface View
l
- the ViewListener to remove.public void addViewSelectionListener(ViewSelectionListener l)
addViewSelectionListener
in interface View
l
- the ViewSelectionListener to add.public void removeViewSelectionListener(ViewSelectionListener l)
removeViewSelectionListener
in interface View
l
- the ViewSelectionListener to remove.public ContextMenu getContextMenu()
getContextMenu
in interface View
public static void loadToolbar(PropertyAccess properties, Toolbar toolbar, java.lang.String tbCountProp, java.lang.String tbItemProp, View view)
toolbar
. The
properties
parameter specifies the properties file where
the toolbar is defined. The tbCountProp
specifies the
property name identifying the number of buttons in the toolbar.
The tbItemProp
specifies the property name listing the
command associated with a button. If the view
is specified,
this indicates that the toolbar is owned by that view and that all
actions created should only work with that view's context.
public static void loadToolbar(Toolbar toolbar, java.lang.String tbCountProp, java.lang.String tbItemProp, View view)
toolbar
. The
tbCountProp
specifies the property name identifying the
number of buttons in the toolbar. The tbItemProp
specifies
the property name listing the command associated with a button.
If the view is specified, this indicates that the
toolbar is owned by that view and that all actions created should
only work with that view's context.
public HelpInfo getHelpInfo()
getHelpInfo
in interface Helpable
protected void setOwner(View owner)
protected void fireViewSelectionChanged(ViewSelectionEvent e)
protected void fireViewActivated(ViewEvent e)
protected void fireViewDeactivated(ViewEvent e)
protected void fireViewClosed(ViewEvent e)
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.