Extension SDK 10.1.2

oracle.ide.docking
Interface Dockable

All Known Subinterfaces:
DockableView, ExplorerWindow, InspectorWindow, LogWindow, NavigatorWindow, PaletteWindow
All Known Implementing Classes:
DockableWindow

public interface Dockable

A Dockable interface.

The Dockable interface should be implemented by graphical user interfaces that want docking support. Addin developers will typically extend DockableWindow and should not implement Dockable directly.

See Also:
Docking Package Summary


Field Summary
static int DEFAULT_VISIBILITY_MINIMIZED
          Synonym of DEFAULT_VISIBILITY_MINIMIZED
static int DEFAULT_VISIBILITY_RAISED
          If the window is tabbed with others, makes this window the active one.
static int DEFAULT_VISIBILITY_VISIBLE
          Makes the window visible
static int TYPE_DISCARDABLE
          If a Dockable has no corresponding menu View+xxx, it is discardable.
static int TYPE_GLOBAL_VISIBLE
          The visibility of Dockables with this type is determined globally.
static int TYPE_NO_BUTTONS
          does not show buttons in the title bar
static int TYPE_NORMAL
          If a Dockable has a corresponding menu View+xxx.
static int TYPE_NOT_TABBED
          does not allow to be tabbed together with another dockable
static int TYPE_RECYCLABLE
          Recyclable dockables are allowed to change the hosted component.
static int TYPE_TRUNCATE_TITLE
          If set, partial titles can be shown in the title bar.
 
Method Summary
 void addTitleChangeListener(TitleChangeListener l)
          Adds a title change listener to a dockable.
 int getDefaultVisibility(Layout layout)
          The first time a Dockable is exposed to a layout, if the dockable is not of type TYPE_GLOBAL_VISIBLE, it will be asked if it wants to be shown in that layout.
 javax.swing.JComponent getHostedComponent()
          Gets the root component of the user interface to be docked or floated.
 int getMenuPreferredMnemonic()
          Gets mnemonic used in the menus of the docking for showing/hiding the dockable.
 java.lang.String getMenuTitle()
          Gets the text to display in the menus of the docking for showing/hiding the dockable.
 Site getSite()
          Gets the current site where this dockable is docked or floated.
 java.awt.dnd.DropTargetListener getTabDropListener()
          Gets the drop target listener for drop events on the tab.
 javax.swing.Icon getTabIcon()
          Gets the icon to display in a tab along side the name.
 java.lang.String getTabName()
          Gets the name to display in a tab.
 java.lang.String getTitleName()
          Gets title to display in a title bar.
 int getType()
          Gets the types of dockable accepted by a specific dockable implementation.
 java.lang.String getUniqueName()
          Gets a unique name identifying this dockable.
 void loadLayout(PropertyAccess p)
          reloads the layout information of this dockable.
 void removeTitleChangeListener(TitleChangeListener l)
          Removes the specified title change listener from the dockable.
 void saveLayout(PropertyAccess p)
          Saves the layout information of this dockable.
 void setSite(Site site)
          Sets the current site where this dockable is docked or floated.
 

Field Detail

TYPE_NORMAL

public static final int TYPE_NORMAL
If a Dockable has a corresponding menu View+xxx.

See Also:
Constant Field Values

TYPE_DISCARDABLE

public static final int TYPE_DISCARDABLE
If a Dockable has no corresponding menu View+xxx, it is discardable.

See Also:
Constant Field Values

TYPE_RECYCLABLE

public static final int TYPE_RECYCLABLE
Recyclable dockables are allowed to change the hosted component. When a dock panel is closed, the JComponent of recyclable dockable is removed from the panel. This allows to reuse dockables to re-use previously used dockables. Note that TYPE_DISCARDABLE and TYPE_RECYCLABLE should be exclusive since discardable means that the dockable itself will be removed including the JComponent.

See Also:
Constant Field Values

TYPE_NO_BUTTONS

public static final int TYPE_NO_BUTTONS
does not show buttons in the title bar

See Also:
Constant Field Values

TYPE_NOT_TABBED

public static final int TYPE_NOT_TABBED
does not allow to be tabbed together with another dockable

See Also:
Constant Field Values

TYPE_TRUNCATE_TITLE

public static final int TYPE_TRUNCATE_TITLE
If set, partial titles can be shown in the title bar. If not, the title is not shown at all if there is not enough space.

See Also:
Constant Field Values

TYPE_GLOBAL_VISIBLE

public static final int TYPE_GLOBAL_VISIBLE
The visibility of Dockables with this type is determined globally. If the user closes the window in one layout, the window will be hidden in every layout.

See Also:
Constant Field Values

DEFAULT_VISIBILITY_VISIBLE

public static final int DEFAULT_VISIBILITY_VISIBLE
Makes the window visible

See Also:
getDefaultVisibility(oracle.ide.layout.Layout), Constant Field Values

DEFAULT_VISIBILITY_MINIMIZED

public static final int DEFAULT_VISIBILITY_MINIMIZED
Synonym of DEFAULT_VISIBILITY_MINIMIZED

See Also:
getDefaultVisibility(oracle.ide.layout.Layout), Constant Field Values

DEFAULT_VISIBILITY_RAISED

public static final int DEFAULT_VISIBILITY_RAISED
If the window is tabbed with others, makes this window the active one. The operation is not garanteed if another window in the same tab also wants to be raised.

See Also:
getDefaultVisibility(oracle.ide.layout.Layout), Constant Field Values
Method Detail

getTabName

public java.lang.String getTabName()
Gets the name to display in a tab.

Returns:
the name to display in a tab.
See Also:
getTabIcon()

getTabIcon

public javax.swing.Icon getTabIcon()
Gets the icon to display in a tab along side the name.

Returns:
the the icon to display in a tab.
See Also:
getTabName()

getTitleName

public java.lang.String getTitleName()
Gets title to display in a title bar.

Returns:
the title to display in a title bar.
See Also:
getTabIcon()

getUniqueName

public java.lang.String getUniqueName()
Gets a unique name identifying this dockable. This name is used to register the dockable in the DockingRegistry. In general, the unique name should be generated by using the fully qualified name of the class implementing a dockable and adding an instance counter to that name.

Returns:
a unique name used for registration purposes.

getType

public int getType()
Gets the types of dockable accepted by a specific dockable implementation. The constants above define some standard types. These types can be OR(ed) together.

Returns:
the type accepted by this dockable implementation.

getSite

public Site getSite()
Gets the current site where this dockable is docked or floated. Implementors just need to provide a data member to hold the incoming site.

Returns:
the current site.
See Also:
setSite(oracle.ide.docking.Site)

setSite

public void setSite(Site site)
Sets the current site where this dockable is docked or floated. Implementors just need to provide a data member to hold the incoming site.

Parameters:
site - the site to set.
See Also:
getSite()

getHostedComponent

public javax.swing.JComponent getHostedComponent()
Gets the root component of the user interface to be docked or floated.

Returns:
the root component.

addTitleChangeListener

public void addTitleChangeListener(TitleChangeListener l)
Adds a title change listener to a dockable. TitleChangeEvents should be trigger by a dockable whenever their title information changes.

Parameters:
l - a TitleChangeListener instance.

removeTitleChangeListener

public void removeTitleChangeListener(TitleChangeListener l)
Removes the specified title change listener from the dockable.

Parameters:
l - a TitleChangeListener instance.

saveLayout

public void saveLayout(PropertyAccess p)
Saves the layout information of this dockable.

Parameters:
p - the storage object

loadLayout

public void loadLayout(PropertyAccess p)
reloads the layout information of this dockable.

Parameters:
p - the storage object

getTabDropListener

public java.awt.dnd.DropTargetListener getTabDropListener()
Gets the drop target listener for drop events on the tab. The TitledPanel will forward drop events to the appropriate listener for each tab.

If handling drop events on the tab is not necessary, the implementation of this method should return null.

Note that this method may called repeatedly during a drag and drop operation, so it should be fast.

Returns:
the drop target listener

getMenuTitle

public java.lang.String getMenuTitle()
Gets the text to display in the menus of the docking for showing/hiding the dockable.

Returns:
the string to display in the menu

getMenuPreferredMnemonic

public int getMenuPreferredMnemonic()
Gets mnemonic used in the menus of the docking for showing/hiding the dockable.

Returns:
the mnemonic

getDefaultVisibility

public int getDefaultVisibility(Layout layout)
The first time a Dockable is exposed to a layout, if the dockable is not of type TYPE_GLOBAL_VISIBLE, it will be asked if it wants to be shown in that layout.

Parameters:
layout -

Extension SDK

 

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