Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.ide.view
Class AbstractPinnable

java.lang.Object
  extended by oracle.ide.view.View
      extended by oracle.ide.view.ViewDecorator
          extended by oracle.ide.docking.DockableView
              extended by oracle.ide.docking.DockableWindow
                  extended by oracle.ide.view.AbstractPinnable

All Implemented Interfaces:
java.util.EventListener, ControllerProvider, Dockable, Helpable, Observer, Pinnable, ViewSelectionListener
Direct Known Subclasses:
ExplorerWindow, InspectorWindow

public abstract class AbstractPinnable
extends DockableWindow
implements ViewSelectionListener, Pinnable, Observer

AbstractPinnable implements the Pinnable interface as it applies to a DockableWindow which is capable of responding to changes in selection in the active View as well as changes of the active View from one View to another.


Field Summary
protected  Node _node
           
protected  boolean forceUpdate
           
protected  boolean isToolbarVisible
           
protected  Toolbar toolbar
           
static java.lang.String TOOLBAR_ITEM
           
static java.lang.String TOOLBAR_ITEM_COUNT
           

 

Fields inherited from class oracle.ide.docking.DockableView
CLOSED, HIDDEN, SHOWN

 

Fields inherited from class oracle.ide.view.View
EMPTY_SELECTION, PROJECT_PROP, VISIBLE_PROP, WORKSPACE_PROP

 

Fields inherited from interface oracle.ide.view.Pinnable
PIN_NONE, PIN_OBJECT, PIN_VIEW

 

Fields inherited from interface oracle.ide.docking.Dockable
DEFAULT_VISIBILITY_MINIMIZED, DEFAULT_VISIBILITY_RAISED, DEFAULT_VISIBILITY_VISIBLE, TYPE_DISCARDABLE, TYPE_GLOBAL_VISIBLE, TYPE_NO_BUTTONS, TYPE_NORMAL, TYPE_NOT_TABBED, TYPE_RECYCLABLE, TYPE_TRUNCATE_TITLE

 

Constructor Summary
protected AbstractPinnable(IdeMainWindow mw, java.lang.String viewId)
          Don't use this constructor.
protected AbstractPinnable(java.lang.String viewId)
          Constructor.

 

Method Summary
protected  void activeViewChanged(ActiveViewEvent e)
          Respond to a change of active View filtered by the current pin state.
protected  void clear()
          Internal method allowing subclasses to perform cleaning duties when no View is available from which to fetch a selection for display.
protected  View getPinnedView()
          Get the View whose selection is currently the source displayed within this DockableWindow.
 int getPinState()
          Get the current pin state as one of PIN_NONE, PIN_VIEW, or PIN_OBJECT.
 Toolbar getToolbar()
          Get the Toolbar associated with this View.
protected  boolean isSingleton()
          Determine whether or not this AbstractPinnable represents a singleton View.
protected abstract  boolean isViewSupported(View view)
          Determine whether or not the given View is one that is considered interesting by this Pinnable.
protected  void objectClosed(java.lang.Object subject, UpdateMessage msg)
          Perform any cleanup required in response to an UpdateMessage.OBJECT_CLOSED message received by update.
protected  void objectRenamed(java.lang.Object subject, UpdateMessage msg)
          Perform any cleanup required in response to an UpdateMessage.OBJECT_RENAMED message received by update.
protected  void persistPinTarget()
          Persist the identity of any pinned object such that its representation may be restored at a later time.
protected  void restorePinTarget()
          Restore the representation of a previously persisted object reference.
 void setContext(Context context)
          Initialize the DockableView based upon the selection of the View contained in the incoming Context.
protected  void setPinnedView(View view)
          Set the View whose selection should be displayed within this DockableWindow.
 void setPinState(int newState)
          Set the current pin state as one of PIN_NONE, PIN_VIEW, or PIN_OBJECT.
 void setToolbarVisible(boolean visible)
          Set the visibility of the Toolbar, if any.
 void stateChange(int newState)
          Responds to changes in state.
 void update(java.lang.Object subject, UpdateMessage msg)
          Respond to Node events from which the current Explorer is rooted.
protected  void viewSelectionChanged(Context context)
          Internal method allowing subclasses to perform additional processing after the standard call to viewSelectionChanged(..) has filtered out cases where the selection changes should be ignored.
 void viewSelectionChanged(ViewSelectionEvent e)
          Respond to a change in selection in the pinned View based on the pin state.

 

Methods inherited from class oracle.ide.docking.DockableWindow
addTitleChangeListener, close, dockableHidden, dockableShown, fireTitleChangeListener, getCachedDockable, getDefaultVisibility, getHostedComponent, getMenuTitle, getSite, getTabDropListener, getTabIcon, getType, getUniqueName, isVisible, removeTitleChangeListener, setDockableVisible, setSite, setType, show, updateTitle

 

Methods inherited from class oracle.ide.docking.DockableView
afterAutoExpanding, afterRestoringFromAutoExpansion, beforeAutoExpanding, getAutoExpansionPreferredSize, getAutoExpansionSize, isAutoExpandable, isAutoExpandableEnabled, setAutoExpandable, setAutoExpandableEnabled

 

Methods inherited from class oracle.ide.view.ViewDecorator
activate, deactivate, getContext, getContextMenu, getController, getGUI, getHelpInfo, getSelectionFromUI, getViewWithoutDecoration, loadLayout, newId, saveLayout, setOwner, updateVisibleActions

 

Methods inherited from class oracle.ide.view.View
addViewListener, addViewSelectionListener, addViewStateListener, fireViewCollapsed, fireViewExpanded, fireViewSelectionChanged, getContext, getId, getSelection, getTabName, loadManifestToolbar, loadManifestToolbar, owner, removeViewListener, removeViewSelectionListener, removeViewStateListener, scheduleUpdateSelection, setId, toString, updateSelection, updateSelectionImpl, updateToolbarActions, updateVisibleActions

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.ide.docking.Dockable
getTabName, getTitleName, loadLayout, saveLayout

 

Field Detail

TOOLBAR_ITEM

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

TOOLBAR_ITEM_COUNT

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

toolbar

protected Toolbar toolbar

isToolbarVisible

protected boolean isToolbarVisible

_node

protected Node _node

forceUpdate

protected boolean forceUpdate

Constructor Detail

AbstractPinnable

protected AbstractPinnable(java.lang.String viewId)
Constructor.
See Also:
DockableWindow

AbstractPinnable

protected AbstractPinnable(IdeMainWindow mw,
                           java.lang.String viewId)
Don't use this constructor. Use AbstractPinnable(String) instead.

Method Detail

getToolbar

public Toolbar getToolbar()
Get the Toolbar associated with this View.
Overrides:
getToolbar in class ViewDecorator

setToolbarVisible

public void setToolbarVisible(boolean visible)
Set the visibility of the Toolbar, if any.
Overrides:
setToolbarVisible in class ViewDecorator

setContext

public void setContext(Context context)
Initialize the DockableView based upon the selection of the View contained in the incoming Context. Constructs an ActiveViewEvent instance from the context's View and internally calls activeViewChanged.
Parameters:
context - the Context from which to initialize.
See Also:
ActiveViewEvent, activeViewChanged(oracle.ide.view.ActiveViewEvent)

isSingleton

protected boolean isSingleton()
Determine whether or not this AbstractPinnable represents a singleton View. The internal state of singleton Views must be preserved even after a stateChange of DockabelWindow.CLOSED, whereas a non singleton implementation does not.
See Also:
stateChange(int)

stateChange

public void stateChange(int newState)
Responds to changes in state.
Overrides:
stateChange in class DockableWindow
Parameters:
newState - the new visibility state of this DockableWindow
See Also:
DockableWindow.stateChange

activeViewChanged

protected void activeViewChanged(ActiveViewEvent e)
Respond to a change of active View filtered by the current pin state. If this Pinnable supports the newly activated View type and if this Pinnable is in a pin state of PIN_NONE, then the pinned View will be set to the newly activated View and an internal viewSelectionChanged call will be fired using this updated pinned View as the View of interest.
Parameters:
e - the ActiveViewEvent describing the newly activated View
See Also:
ActiveViewEvent, isViewSupported(oracle.ide.view.View), getPinState(), setPinnedView(oracle.ide.view.View), getPinnedView()

viewSelectionChanged

public void viewSelectionChanged(ViewSelectionEvent e)
Respond to a change in selection in the pinned View based on the pin state. If the pin state is PIN_OBJECT the event is ignored. Otherwise the context is fetched from the View from which the event originated and is passed as argument to an internal call of viewSelectionChanged(Context)
Specified by:
viewSelectionChanged in interface ViewSelectionListener
Parameters:
e - event describing the change of selection in the View
See Also:
getPinState(), viewSelectionChanged(Context)

getPinState

public int getPinState()
Get the current pin state as one of PIN_NONE, PIN_VIEW, or PIN_OBJECT.
Specified by:
getPinState in interface Pinnable
Returns:
the current pin state.
See Also:
Pinnable.PIN_NONE, Pinnable.PIN_VIEW, Pinnable.PIN_OBJECT

setPinState

public void setPinState(int newState)
Set the current pin state as one of PIN_NONE, PIN_VIEW, or PIN_OBJECT. Setting the state to PIN_NONE will force an internal call to activeViewChanged using the last suitable active View as the newly activated View in order to allow this Pinnable to catch up to the current selection of that View. Setting the state to PIN_VIEW will force an update to the view's selection. so that this Pinnable can catch up. Setting the state to PIN_OBJECT will simply update the state without additional processing.
Specified by:
setPinState in interface Pinnable
Parameters:
newState - the new pin state to set.
See Also:
Pinnable.PIN_NONE, Pinnable.PIN_VIEW, Pinnable.PIN_OBJECT, getPinnedView(), activeViewChanged(oracle.ide.view.ActiveViewEvent)

isViewSupported

protected abstract boolean isViewSupported(View view)
Determine whether or not the given View is one that is considered interesting by this Pinnable. For example; a Property Inspector might not be interested in displaying properties of individual controls in a Control Palette and thus would return false from this method for views of that type.
Parameters:
view - the View under consideration

persistPinTarget

protected void persistPinTarget()
Persist the identity of any pinned object such that its representation may be restored at a later time. This would typically involve persisting the URL of a oracle.ide.model.Locatable object which is currently on display in the GUI.
See Also:
restorePinTarget()

restorePinTarget

protected void restorePinTarget()
Restore the representation of a previously persisted object reference. This would typically involve fetching a oracle.ide.model.Locatable object for display in the GUI.
See Also:
persistPinTarget

viewSelectionChanged

protected void viewSelectionChanged(Context context)
Internal method allowing subclasses to perform additional processing after the standard call to viewSelectionChanged(..) has filtered out cases where the selection changes should be ignored. This implementation simply detaches from the previous Context's Node and attaches to that of the new one.
Parameters:
context - the Context of the View from which a selection has changed.

update

public void update(java.lang.Object subject,
                   UpdateMessage msg)
Respond to Node events from which the current Explorer is rooted.
Specified by:
update in interface Observer
Parameters:
subject - the subject whose state has changed.
msg - what has changed.

objectClosed

protected void objectClosed(java.lang.Object subject,
                            UpdateMessage msg)
Perform any cleanup required in response to an UpdateMessage.OBJECT_CLOSED message received by update.
See Also:
update(java.lang.Object, oracle.ide.model.UpdateMessage)

objectRenamed

protected void objectRenamed(java.lang.Object subject,
                             UpdateMessage msg)
Perform any cleanup required in response to an UpdateMessage.OBJECT_RENAMED message received by update.
See Also:
update(java.lang.Object, oracle.ide.model.UpdateMessage)

clear

protected void clear()
Internal method allowing subclasses to perform cleaning duties when no View is available from which to fetch a selection for display.

getPinnedView

protected View getPinnedView()
Get the View whose selection is currently the source displayed within this DockableWindow.
See Also:
activeViewChanged(oracle.ide.view.ActiveViewEvent)

setPinnedView

protected void setPinnedView(View view)
Set the View whose selection should be displayed within this DockableWindow. The implementation removes this as listener from the previous pinned View and will add this as both a ViewListener and ViewSelectionListener to the new value such that those events may be responded to.
Parameters:
view - the new View to take interest in
See Also:
#viewActivated, #viewDeactivated, #viewClosed

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


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