Extension SDK

oracle.ide.docking
Interface DockStation

All Superinterfaces:
Controller, DockLayoutConstants

public interface DockStation
extends DockLayoutConstants, Controller

The singleton for docking operations. To write a dockable window, you must create your own DockableWindows and a DockableFactory. See Docking Package Summary


Field Summary
static int STATUS_ACCESSIBLE
          The user has a direct access to the dockable.
static int STATUS_ACTIVE
          The Dockable is active (title bar is dark blue)
static int STATUS_MINIMIZED
          The Dockable unpinned and minimized
static int STATUS_PINNED
          The Dockable pinned
static int STATUS_PRESENT
          The Dockable is known by the docking system
static int STATUS_VISIBLE
          The Dockable is visible.
 
Fields inherited from interface oracle.ide.docking.DockLayoutConstants
AFTER, BEFORE, CENTER, EAST, HORZ, NORTH, SOUTH, VERT, WEST
 
Method Summary
 boolean activateAnyDockable()
          Sets the focus in the first available dockable window.
 boolean activateDockable(Dockable dockable)
          Sets the focus in the specified dockable.
 void addDockableListener(DockableListener l, Dockable d)
          Dockable listeners are manipulated by the DockStation to simplify the implementation of the Dockable interface.
 void close(Dockable dockable)
          Close the specified dockable.
 void dock(Dockable dockable, Dockable ref, int nOrientation, boolean bVisible)
          Dock the comp component next to the ref component
 void dock(Dockable dockable, Dockable ref, int nOrientation, int nExtents, boolean bVisible)
          Dock the comp component next to the ref component and covers nExtents You probably do not need that but I do for tests
 void dock(Dockable dockable, int nOrientation, boolean bVisible)
          Attach a dockable window on one of the four sides of the main application window.
 FloatingToolWindow dockFloat(Dockable dockable, java.awt.Point pt, boolean bVisible)
          Wrap the dockable in a TitledPanel, wraps the TitledPanel withing a floating window and shows the floating window at the specified position
 Dockable findDockable(ViewId viewId)
          searches/create a dockable based on a name.
 Dockable getDockable(ViewId viewId)
          searches a dockable based on a name.
 int getDockableStatus(Dockable dockable)
           
 void initialize()
          This method is called to give this class an opportunity to hook layout listeners to the ide.
 void install(javax.swing.JFrame frame, java.awt.Container topPanel, javax.swing.JComponent centerPanel)
          Initializes the docking system.
 boolean isDockableVisible(Dockable dockable)
           
 boolean isDockableVisible(java.lang.String viewId)
           
 void registerDockableFactory(java.lang.String viewTypeId, DockableFactory factory)
          Register a factory that can create dockables.
 void removeDockableListener(DockableListener l, Dockable d)
          Unregisters a dockable listener.
 void saveLayout(PropertyAccess pa)
          Saves all of the docking layout.
 void setDockableVisible(Dockable dockable, boolean bVisible)
           
 void setDockableVisible(java.lang.String strViewId, boolean bVisible)
          Show/hide a dockable.
 void undock(Dockable dockable)
          Remove the dockable.
 void unregisterDockableFactory(java.lang.String viewTypeId)
          Removes a factory from the registry
 
Methods inherited from interface oracle.ide.addin.Controller
checkCommands, handleEvent, supervisor, update
 

Field Detail

STATUS_PRESENT

public static final int STATUS_PRESENT
The Dockable is known by the docking system

See Also:
getDockableStatus(oracle.ide.docking.Dockable), Constant Field Values

STATUS_PINNED

public static final int STATUS_PINNED
The Dockable pinned

See Also:
getDockableStatus(oracle.ide.docking.Dockable), Constant Field Values

STATUS_MINIMIZED

public static final int STATUS_MINIMIZED
The Dockable unpinned and minimized

See Also:
getDockableStatus(oracle.ide.docking.Dockable), Constant Field Values

STATUS_ACCESSIBLE

public static final int STATUS_ACCESSIBLE
The user has a direct access to the dockable. If the dockable is tabbed with other dockables and is not the selected page, it is still considered as accessible. If the dockable is unpinned and minized, it is also considered as accessible.

See Also:
getDockableStatus(oracle.ide.docking.Dockable), Constant Field Values

STATUS_ACTIVE

public static final int STATUS_ACTIVE
The Dockable is active (title bar is dark blue)

See Also:
getDockableStatus(oracle.ide.docking.Dockable), Constant Field Values

STATUS_VISIBLE

public static final int STATUS_VISIBLE
The Dockable is visible. If multiple dockables are tabbed together, only the selected page is considered to be visible.

See Also:
getDockableStatus(oracle.ide.docking.Dockable), Constant Field Values
Method Detail

registerDockableFactory

public void registerDockableFactory(java.lang.String viewTypeId,
                                    DockableFactory factory)
Register a factory that can create dockables. Dockable layouts can be saved. When they are loaded, a factory is needed to create and initialize them.


unregisterDockableFactory

public void unregisterDockableFactory(java.lang.String viewTypeId)
Removes a factory from the registry


addDockableListener

public void addDockableListener(DockableListener l,
                                Dockable d)
Dockable listeners are manipulated by the DockStation to simplify the implementation of the Dockable interface.

Parameters:
l - the listener to add
d - the dockable to watch. If this value is null, the listener will be registered for every dockable.

removeDockableListener

public void removeDockableListener(DockableListener l,
                                   Dockable d)
Unregisters a dockable listener. Both the listener AND the dockable must match. If the listener was registered with a null dockable, a null dockable must be passed to the removeDockableListener.

Parameters:
l - the listener to remove
d - the dockable on which the listener was registered.

initialize

public void initialize()
This method is called to give this class an opportunity to hook layout listeners to the ide.


install

public void install(javax.swing.JFrame frame,
                    java.awt.Container topPanel,
                    javax.swing.JComponent centerPanel)
Initializes the docking system.

Parameters:
frame - The main application frame. It will be used to attach floating windows
topPanel - usually the contentFrame.
centerPanel - the place where MDI windows will circulate.

isDockableVisible

public boolean isDockableVisible(java.lang.String viewId)
Returns:
true if the view identified by the given viewId is visible.
See Also:
isDockableVisible( Dockable dockable )

isDockableVisible

public boolean isDockableVisible(Dockable dockable)
Returns:
true if the given dockable is visible.

getDockableStatus

public int getDockableStatus(Dockable dockable)
Returns:
a combination of STATUS_xxx bits
See Also:
STATUS_PRESENT, STATUS_PINNED, STATUS_MINIMIZED, STATUS_ACCESSIBLE, STATUS_ACTIVE, STATUS_VISIBLE

dock

public void dock(Dockable dockable,
                 int nOrientation,
                 boolean bVisible)
Attach a dockable window on one of the four sides of the main application window. If a dockable window is already present at this position, the new window will be added after the existing window.


dock

public void dock(Dockable dockable,
                 Dockable ref,
                 int nOrientation,
                 boolean bVisible)
Dock the comp component next to the ref component

Parameters:
dockable - the dockable to be docked
ref - the dockable used as reference for orientation (ex:left of...)
nOrientation - describes on which side of ref the component must be attached
bVisible - specifies if the dockable UI is initially visible

dock

public void dock(Dockable dockable,
                 Dockable ref,
                 int nOrientation,
                 int nExtents,
                 boolean bVisible)
Dock the comp component next to the ref component and covers nExtents You probably do not need that but I do for tests

Parameters:
dockable - the dockable to be docked
ref - the dockable used as reference for orientation (ex:left of...)
nOrientation - describes on which side of ref the component must be attached
nExtents - Number of contiguous components it covers (ex: right of 3 components starting at ref)
bVisible - specifies if the dockable UI is initially visible

dockFloat

public FloatingToolWindow dockFloat(Dockable dockable,
                                    java.awt.Point pt,
                                    boolean bVisible)
Wrap the dockable in a TitledPanel, wraps the TitledPanel withing a floating window and shows the floating window at the specified position

Parameters:
dockable - the dockable to wrap
pt - the place where to put the floating window in screen coordinates. If pt is null, the dockable is centered on the main application window.
bVisible - specifies if the dockable UI is initially visible
Returns:
the floating window

undock

public void undock(Dockable dockable)
Remove the dockable. If the component is realized, it is removed from its TitledPanel


setDockableVisible

public void setDockableVisible(java.lang.String strViewId,
                               boolean bVisible)
Show/hide a dockable. If bVisible is true and the dockable was not created yet, the dockable factories will be searched and the one that matches the name will be asked to create the dockable. If bVisible is true and the container of the dockable is hidden (floating windows) the container will be shown too.

Parameters:
strViewId - the identification of the dockable.
bVisible - true if the dockable must be shown.

setDockableVisible

public void setDockableVisible(Dockable dockable,
                               boolean bVisible)

close

public void close(Dockable dockable)
Close the specified dockable. Closing a dockable will generate a CLOSED state change notification. In addition, it will discard all discardable dockables.

Parameters:
dockable - the dockable.

saveLayout

public void saveLayout(PropertyAccess pa)
Saves all of the docking layout.

Parameters:
pa - the storage object

activateDockable

public boolean activateDockable(Dockable dockable)
Sets the focus in the specified dockable.


activateAnyDockable

public boolean activateAnyDockable()
Sets the focus in the first available dockable window. This method is called when the last editor is closed.


getDockable

public Dockable getDockable(ViewId viewId)
searches a dockable based on a name.

Returns:
null if the dockable was not found

findDockable

public Dockable findDockable(ViewId viewId)
searches/create a dockable based on a name.


Extension SDK

 

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