public interface Dockable
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
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_FORGETTABLE
The dockable will not be remembered by the ide layout when restarting
|
static int |
TYPE_GLOBAL_VISIBLE
The visibility of Dockables with this type is determined globally.
|
static int |
TYPE_NO_BUTTONS
Deprecated.
No replacement -- option no longer supported. Buttons are
always present on dockable title bars.
|
static int |
TYPE_NORMAL
If a Dockable has a corresponding menu View+xxx.
|
static int |
TYPE_NOT_TABBED
Deprecated.
No replacement -- option has no effect.
|
static int |
TYPE_RECYCLABLE
Recyclable dockables are allowed to change the hosted component.
|
static int |
TYPE_TRUNCATE_TITLE
Deprecated.
No replacement -- option no longer supported. Dockable
titles are always truncated to fit the available space.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTitleChangeListener(TitleChangeListener l)
Adds a title change listener to a dockable.
|
void |
afterAutoExpanding()
Called after this dockable is displayed "auto-expanded."
|
void |
afterRestoringFromAutoExpansion(int orientation,
java.awt.Dimension autoExpandedWindowSize,
boolean userResized)
Called after this dockable is restored from being displayed "auto-expanded."
|
void |
beforeAutoExpanding()
Called before this dockable is going to be displayed "auto-expanded."
|
java.awt.Dimension |
getAutoExpansionPreferredSize(int orientation) |
java.awt.Dimension |
getAutoExpansionSize(int orientation,
javax.swing.JPanel dockedTitledPanel) |
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.
|
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()
Deprecated.
|
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.
|
boolean |
isAutoExpandable() |
boolean |
isAutoExpandableEnabled() |
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 |
setAutoExpandable(boolean autoExpandable)
Enables/disables "auto-expansion" in this dockable.
|
void |
setAutoExpandableEnabled(boolean autoExpandableEnabled)
Enables or disables the "auto-expand" feature in this dockable.
|
void |
setSite(Site site)
Sets the current site where this dockable is docked or floated.
|
static final int TYPE_NORMAL
static final int TYPE_DISCARDABLE
static final int TYPE_RECYCLABLE
static final int TYPE_NO_BUTTONS
static final int TYPE_NOT_TABBED
static final int TYPE_TRUNCATE_TITLE
static final int TYPE_GLOBAL_VISIBLE
static final int TYPE_FORGETTABLE
static final int DEFAULT_VISIBILITY_VISIBLE
static final int DEFAULT_VISIBILITY_MINIMIZED
static final int DEFAULT_VISIBILITY_RAISED
java.lang.String getTabName()
getTabIcon()@Deprecated javax.swing.Icon getTabIcon()
java.lang.String getTitleName()
getTabIcon()java.lang.String getUniqueName()
int getType()
Site getSite()
setSite(oracle.ide.docking.Site)void setSite(Site site)
site - the site to set.getSite()javax.swing.JComponent getHostedComponent()
void addTitleChangeListener(TitleChangeListener l)
l - a TitleChangeListener instance.void removeTitleChangeListener(TitleChangeListener l)
l - a TitleChangeListener instance.void saveLayout(PropertyAccess p)
p - the storage objectvoid loadLayout(PropertyAccess p)
p - the storage objectjava.awt.dnd.DropTargetListener getTabDropListener()
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.
java.lang.String getMenuTitle()
int getDefaultVisibility(Layout layout)
TYPE_GLOBAL_VISIBLE,
it will be asked if it wants to be shown in that layout.layout - boolean isAutoExpandable()
true if this dockable can be auto-expanded.
Auto-expansion is the ability to be automatically expanded when the user hovers over a hot spot (usually the
dockable's tab or the whole dockable if it is fully visible). This effect is similar to the expansion shown when
a dockable is minimized and a user hover over the minimized dockable.void setAutoExpandable(boolean autoExpandable)
autoExpandable - the new value for "auto-expansion".isAutoExpandable()boolean isAutoExpandableEnabled()
true if this dockable is "auto-expandable" and if the "auto-expand" feature is enabled.isAutoExpandable()void setAutoExpandableEnabled(boolean autoExpandableEnabled)
isAutoExpandable() is trueautoExpandableEnabled - the new value to enable/disable the "auto-expand" feature in this dockable.void beforeAutoExpanding()
void afterAutoExpanding()
void afterRestoringFromAutoExpansion(int orientation,
java.awt.Dimension autoExpandedWindowSize,
boolean userResized)
orientation - the orientation of this dockableIdeConstants.WEST,
IdeConstants.EAST,
IdeConstants.NORTH,
IdeConstants.SOUTHjava.awt.Dimension getAutoExpansionSize(int orientation,
javax.swing.JPanel dockedTitledPanel)
orientation - the orientation of this dockabledockedTitledPanel - the titled panel holding the dockable to be shown "auto-expanded"IdeConstants.WEST,
IdeConstants.EAST,
IdeConstants.NORTH,
IdeConstants.SOUTHjava.awt.Dimension getAutoExpansionPreferredSize(int orientation)
orientation - the orientation of this dockableIdeConstants.WEST,
IdeConstants.EAST,
IdeConstants.NORTH,
IdeConstants.SOUTH