Extension SDK 10.1.2

oracle.ide.docking
Class DockStation

java.lang.Object
  extended byoracle.ide.docking.DockStation
All Implemented Interfaces:
Controller, IdeConstants, Module

public abstract class DockStation
extends java.lang.Object
implements IdeConstants, Controller, Module

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.IdeConstants
ACTIVATE_LEFT_BUTTON_CMD_ID, ACTIVATE_RIGHT_BUTTON_CMD_ID, ACTIVE_PROJECT_CHANGED, AFTER, APPLICATIONS_CMD, APPLICATIONS_CMD_ID, BEFORE, BROWSE_SYMBOL_CMD, BROWSE_SYMBOL_CMD_ID, CENTER, CLOSE_ALL_CMD, CLOSE_ALL_CMD_ID, CLOSE_EDITOR_CMD, CLOSE_EDITOR_CMD_ID, CLOSE_NODE_CMD, CLOSE_NODE_CMD_ID, COLLAPSE_ALL_CMD_ID, COLOR_IDE_LINES, CONNECTIONS_CMD, CONNECTIONS_CMD_ID, CONTEXT_MENU_CMD, CONTEXT_MENU_CMD_ID, COPY_CMD, COPY_CMD_ID, CUT_CMD, CUT_CMD_ID, DEFAULT_PROJECT_SETTINGS_CMD, DEFAULT_PROJECT_SETTINGS_CMD_ID, DELETE_CMD_ID, EAST, EXIT_CMD, EXIT_CMD_ID, EXPAND_ALL_CMD_ID, EXPLORER_CMD, EXPLORER_CMD_ID, FIND_CMD, FIND_CMD_ID, FLAT_LOOK, FREEZE_CMD_ID, GOTO_LINE_NUMBER_CMD, GOTO_LINE_NUMBER_CMD_ID, HORZ, IDE_PROPERTIES_FILE, IDE_SETTINGS_CMD, IDE_SETTINGS_CMD_ID, IDE_VERSION, INCREMENTAL_SEARCH_BACKWARD_CMD, INCREMENTAL_SEARCH_BACKWARD_CMD_ID, INCREMENTAL_SEARCH_FORWARD_CMD, INCREMENTAL_SEARCH_FORWARD_CMD_ID, INSPECTOR_CMD, INSPECTOR_CMD_ID, LAST_PREDEFINED_CMD, LOG_WINDOW_CMD, LOG_WINDOW_CMD_ID, MENU_ADDIN_SECTION_ID, MENU_SECTION_ID, MENU_WEIGHT, MENU_WEIGHT_SECTION_UNDEFINED, NAVIGATE_CMD, NAVIGATE_CMD_ID, NEW_CLASS_CMD, NEW_CLASS_CMD_ID, NEW_EMPTY_PROJECT_CMD, NEW_EMPTY_PROJECT_CMD_ID, NEW_EXPLORER_CMD, NEW_EXPLORER_CMD_ID, NEW_INSPECTOR_CMD, NEW_INSPECTOR_CMD_ID, NEW_NAVIGATOR_CMD, NEW_NAVIGATOR_CMD_ID, NEW_PROJECT_CMD, NEW_PROJECT_CMD_ID, NEW_VIEW_CMD_ID, NEW_WORKSPACE_CMD, NEW_WORKSPACE_CMD_ID, NEXT_EDITOR_CMD, NEXT_EDITOR_CMD_ID, NEXT_EDITORFRAME_CMD, NEXT_EDITORFRAME_CMD_ID, NEXTMSG_CMD, NEXTMSG_CMD_ID, NORTH, OPEN_CMD, OPEN_CMD_ID, PASTE_CMD, PASTE_CMD_ID, PREV_EDITOR_CMD, PREV_EDITOR_CMD_ID, PREV_EDITORFRAME_CMD, PREV_EDITORFRAME_CMD_ID, PREVMSG_CMD, PREVMSG_CMD_ID, PRINT_CMD, PRINT_CMD_ID, PRINTER_SETUP_CMD, PRINTER_SETUP_CMD_ID, PROJECT_SETTINGS_CMD, PROJECT_SETTINGS_CMD_ID, PROPERTIES_CMD_ID, PROPERTY_SET_CMD_ID, REDO_CMD, REDO_CMD_ID, REFRESH_CMD_ID, RELOAD_NODES_CMD, RELOAD_NODES_CMD_ID, REMOVE_FILE_CMD, REMOVE_FILE_CMD_ID, REMOVE_FROM_DISK_CMD, REMOVE_FROM_DISK_CMD_ID, RENAME_CMD, RENAME_CMD_ID, REOPEN_CMD, REOPEN_CMD_ID, REPLACE_CMD, REPLACE_CMD_ID, REVERT_CMD, REVERT_CMD_ID, SAVE_ALL_CMD, SAVE_ALL_CMD_ID, SAVE_AS_CMD, SAVE_AS_CMD_ID, SAVE_CMD, SAVE_CMD_ID, SEARCH_AGAIN_CMD, SEARCH_AGAIN_CMD_ID, SEARCH_BACKWARD_CMD, SEARCH_BACKWARD_CMD_ID, SEARCH_SOURCE_PATH_CMD, SEARCH_SOURCE_PATH_CMD_ID, SELECT_ALL_CMD, SELECT_ALL_CMD_ID, SOUTH, STATUS_BAR_CMD, STATUS_BAR_CMD_ID, STRUCTURE_CHANGE_CMD_ID, TOOLBAR_CMD, TOOLBAR_CMD_ID, UNDO_CMD, UNDO_CMD_ID, VERT, WEST, WINDOW_CASCADE_CMD_ID, WINDOW_TILE_HORZ_CMD_ID, WINDOW_TILE_VERT_CMD_ID, WINDOWS_DOT_DOT_DOT_CMD, WINDOWS_DOT_DOT_DOT_CMD_ID, WORKSPACES_CMD, WORKSPACES_CMD_ID
 
Constructor Summary
DockStation()
           
 
Method Summary
abstract  boolean activateAnyDockable()
          Sets the focus in the first available dockable window.
abstract  boolean activateDockable(Dockable dockable)
          Sets the focus in the specified dockable.
abstract  void addDockableListener(DockableListener l, Dockable d)
          Dockable listeners are manipulated by the DockStation to simplify the implementation of the Dockable interface.
abstract  void close(Dockable dockable)
          Close the specified dockable.
abstract  void dock(Dockable dockable, Dockable ref, int nOrientation, boolean bVisible)
          Deprecated. Dock the comp component next to the ref component
abstract  void dock(Dockable dockable, Dockable ref, int nOrientation, int nExtents, boolean bVisible)
          Deprecated.  
abstract  void dock(Dockable dockable, DockingParam dockingParam)
          Inserts the dockable into the docking system.
abstract  void dock(Dockable dockable, int nOrientation, boolean bVisible)
          Deprecated.  
abstract  FloatingToolWindow dockFloat(Dockable dockable, java.awt.Point pt, boolean bVisible)
          Deprecated.  
abstract  Dockable findDockable(ViewId viewId)
          searches/create a dockable based on a name.
abstract  Dockable getDockable(ViewId viewId)
          searches a dockable based on a name.
abstract  int getDockableStatus(Dockable dockable)
           
static DockStation getDockStation()
          Returns the DockStation instance that is active in the IDE.
abstract  void initialize()
          This method is called to give this class an opportunity to hook layout listeners to the ide.
abstract  void install(javax.swing.JFrame frame, java.awt.Container topPanel, javax.swing.JComponent centerPanel)
          Initializes the docking system.
abstract  boolean isDockableVisible(Dockable dockable)
           
abstract  boolean isDockableVisible(java.lang.String viewId)
           
abstract  void registerDockableFactory(java.lang.String viewTypeId, DockableFactory factory)
          Register a factory that can create dockables.
abstract  void removeDockableListener(DockableListener l, Dockable d)
          Unregisters a dockable listener.
abstract  void saveLayout(PropertyAccess pa)
          Saves all of the docking layout.
abstract  void setDockableVisible(Dockable dockable, boolean bVisible)
           
abstract  void setDockableVisible(java.lang.String strViewId, boolean bVisible)
          Show/hide a dockable.
static void setDockStation(DockStation dockStation)
          Publishes the specified DockStation as the active instance in the IDE.
abstract  void undock(Dockable dockable)
          Remove the dockable.
abstract  void unregisterDockableFactory(java.lang.String viewTypeId)
          Removes a factory from the registry
 
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.Controller
handleEvent, 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
Constructor Detail

DockStation

public DockStation()
Method Detail

getDockStation

public static DockStation getDockStation()
Returns the DockStation instance that is active in the IDE.


setDockStation

public static void setDockStation(DockStation dockStation)
Publishes the specified DockStation as the active instance in the IDE.


registerDockableFactory

public abstract 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 abstract void unregisterDockableFactory(java.lang.String viewTypeId)
Removes a factory from the registry


addDockableListener

public abstract 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 abstract 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 abstract void initialize()
This method is called to give this class an opportunity to hook layout listeners to the ide.

Specified by:
initialize in interface Module

install

public abstract 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 abstract 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 abstract boolean isDockableVisible(Dockable dockable)
Returns:
true if the given dockable is visible.

getDockableStatus

public abstract 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 abstract void dock(Dockable dockable,
                          int nOrientation,
                          boolean bVisible)
Deprecated.  

The usage of this method has been deprecated in favor of dock(Dockable, DockingParam).

Also, the visibility is now determined by the Dockable itself. Ex:

 DockingParam dockingParam = new DockingParam();
 dockingParam.setPosition(nOrientation);
 dockStation.dock(dockable, dockingParam);
 
Parameters:
dockable - the dockable to be docked
nOrientation - describes on which side of ref the component must be attached.
bVisible - true if the window must be shown

dock

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

The usage of this method has been deprecated in favor of dock(Dockable, DockingParam).

Also, the visibility is now determined by the Dockable itself. Ex:

 DockingParam dockingParam = new DockingParam();
 dockingParam.setPosition(ref, nOrientation);
 dockStation.dock(dockable, dockingParam);
 
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. Takes values from IdeConstants.NORTH, IdeConstants.SOUTH, IdeConstants.WEST, IdeConstants.EAST or IdeConstants.CENTER
bVisible - specifies if the dockable UI is initially visible

dock

public abstract void dock(Dockable dockable,
                          Dockable ref,
                          int nOrientation,
                          int nExtents,
                          boolean bVisible)
Deprecated.  

The usage of this method has been deprecated in favor of dock(Dockable, DockingParam).

Also, the visibility is now determined by the Dockable itself. Ex:

 DockingParam dockingParam = new DockingParam();
 dockingParam.setPosition(ref, nOrientation);
 dockStation.dock(dockable, dockingParam);
 
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. Takes values from IdeConstants.NORTH, IdeConstants.SOUTH, IdeConstants.WEST, IdeConstants.EAST or IdeConstants.CENTER
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 abstract FloatingToolWindow dockFloat(Dockable dockable,
                                             java.awt.Point pt,
                                             boolean bVisible)
Deprecated.  

The usage of this method has been deprecated in favor of dock(Dockable, DockingParam).

Use the following code instead:

 final DockingParam dockingParam = new DockingParam();
 dockingParam.setFloatingPosition(new Rectangle(100, 100, 200, 200));
 DockStation.dock(dockable, dockingParam);
 final FloatingToolWindow floatingToolWindow = dockingParam.getFloatingToolWindow();
 

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

dock

public abstract void dock(Dockable dockable,
                          DockingParam dockingParam)
Inserts the dockable into the docking system.

Parameters:
dockable - the dockable to insert
dockingParam - specifies where to place the dockable.

undock

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


setDockableVisible

public abstract 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 abstract void setDockableVisible(Dockable dockable,
                                        boolean bVisible)

close

public abstract 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 abstract void saveLayout(PropertyAccess pa)
Saves all of the docking layout.

Parameters:
pa - the storage object

activateDockable

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


activateAnyDockable

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


getDockable

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

Returns:
null if the dockable was not found

findDockable

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


Extension SDK

 

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