-
Notifications
You must be signed in to change notification settings - Fork 22
Dockable
Andrew Auclair edited this page Oct 31, 2022
·
2 revisions
The Dockable interface is the main interface that an application will use to interact with Modern Docking.
Panels in the application should implement the Dockable interface and provide implementations for all the methods. Modern Docking will then use all of these values to perform many of the actions in the framework.
Method | Description |
---|---|
persistentID | The unique ID of this panel. These should be static. The framework will throw an exception if a panel with the given ID has already been registered. |
type | Custom type field for application specific purposes. Modern Docking uses this to provide a better default docking location. Like typed panels will be preferred when performing default docking operations. |
tabText | The text that should be displayed on a tab if the panel is in a JTabbedPane. This text can be dynamic, but the Docking.updateTabText must be called with the persistentID in order to update the text on any active JTabbedPanes. |
tabIcon | Provides an icon to display on the unpinned toolbars. Only needs to be provided if you want an icon and allowPinning is true. |
floatingAllowed | Indicates that this panel is allowed to be undocked and floated on its own in a new frame. If this returns false Modern Docking will now allow floating. The panel will be returned to where it was if floating is performed. |
limitToRoot | Limit the panel to the root that it started in. Similar to floatingAllowed returning false, but also stops the panel from being moved to another frame. Could be used for a panel that is created once per frame and there is reasons to not allow multiple in a single frame. |
style | Provides the style of the panel. One of Vertical, Horizontal or Both. Vertical panels are only allowed to be docked into east or west locations. Horizontal panels are only allowed to be docked into north or south locations. |
allowClose | Provide a close button on the header of the panel. Pressing the close button performs an undock operation. |
allowPinning | Provide a pin option on the header of the panel. |
allowMinMax | Allow the panel to be maximized, which hides all other panels in the frame. |
hasMoreOptions | Indicates that there are custom options provided by the application that need to be displayed on the header. |
addMoreOptions (optional) | Add the custom options to the header menu bar. Only required if hasMoreOptions returns true. |
createHeaderUI (optional) | Create the header UI. This is provided by the framework. There is a basic default header UI in Modern Docking and a more advanced FlatLaf based header in the ModernDockingUI package. |
strategy | Work in Progress |