Dockable Interface
The Dockable
interface is required to be implemented by the application on any component it wishes to dock. Typically, this interface is implemented by a class that extends from JPanel
.
The Dockable
interface has a minimum subset of methods that must be implemented by the application and a set of methods that are optional. These optional methods provide extra customization points for the application per dockable.
Mandatory Methods
These two methods do not provide default implementations in the interface and must be implemented by the application.
getPersistentID
getPersistentID
provides a unique ID that the framework can use to refer to the dockable. This is the main piece of information that the application and the framework share in order to refer to specific dockables.
getTabText
getTabText
provides the text that should be displayed on a tab when this dockable is in a JTabbedPane
.
Optional Methods
All the following methods are provided to the application with a default. This means the application only needs to implement the methods if it wishes to change the default.
getType
getTabTooltip
getIcon
Used by the framework to get the icon for the dockable to use in a JTabbedPane
tab.
isFloatingAllowed
Allows the application to specify whether a dockable can be dragged out of its current window and floated on its own as a new window.
isLimitedToRoot
isLimitedToRoot
Before adding something, create it.
Do this.
Do that.
Default value is false
Allows the application to limit the dockable to the window it was initially docked in.
getStyle
getPinningStyle
to be renamed