diff --git a/Writerside/m.tree b/Writerside/m.tree index 55cfc043..b9e6533a 100644 --- a/Writerside/m.tree +++ b/Writerside/m.tree @@ -8,17 +8,18 @@ - + + + + + - - - \ No newline at end of file diff --git a/Writerside/topics/Dockable-Interface.md b/Writerside/topics/Dockable-Interface.md index 9404a6d6..5234572a 100644 --- a/Writerside/topics/Dockable-Interface.md +++ b/Writerside/topics/Dockable-Interface.md @@ -1,3 +1,84 @@ # Dockable Interface -Start typing here... \ No newline at end of file +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. + + +The return values for the `Dockable` interface methods should be constant after the creation of the dockable component. +Certain methods can be dynamic and the framework provides methods to update their values within the framework. Any method that doesn't specify such +a method can lead to unexpected behavior if changed after the dockable component is created. + +Generally, if you wish to modify the return values after creating the dockable component, do so while the dockable is not docked. This can be checked with Docking.isDocked. + + +## 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`. + +If the text displayed on the tab ever changes, the application must call Docking.updateTabText with the dockables persistentID to force the framework to update the text. This should be done anytime the text is changed, just in case the dockable is displaying 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 + +

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 + +### isClosable + +### isPinningAllowed + +### isMinMaxAllowed + +### isWrappableInScrollpane + +### getHasMoreOptions + +### getTabPosition + +### addMoreOptions + +### createHeaderUI + +### updateProperties + + \ No newline at end of file diff --git a/Writerside/topics/Dockable-Properties.md b/Writerside/topics/Dockable-Properties.md new file mode 100644 index 00000000..642f48e6 --- /dev/null +++ b/Writerside/topics/Dockable-Properties.md @@ -0,0 +1,3 @@ +# Dockable Properties + +Start typing here... \ No newline at end of file diff --git a/Writerside/topics/Persistence.md b/Writerside/topics/Persistence.md index 4e471330..1a767a35 100644 --- a/Writerside/topics/Persistence.md +++ b/Writerside/topics/Persistence.md @@ -1,3 +1,8 @@ # Persistence -Start typing here... \ No newline at end of file +defaults to off + +turn on with setPersist + +setPersistFile to customize what file the framework persists to + diff --git a/Writerside/topics/User-Facing-Features.md b/Writerside/topics/User-Facing-Features.md index bf2c5db7..ab3c5236 100644 --- a/Writerside/topics/User-Facing-Features.md +++ b/Writerside/topics/User-Facing-Features.md @@ -1,5 +1,12 @@ # User Facing Features +Users of your application will interact with several UI components provided by Modern Docking. +The framework is built around using Java Swing's `JTabbedPane` and `JSplitPane` to provide the docking layouts. +The positioning of the applications dockable components within these `JTabbedPane`s and `JSplitPane`s is done by dragging the dockables. +When the dockable is being dragged it will float about the window of the application and show Docking Handles and Docking Regions. +Docking Handles allow the user to place the dockable precisely where they want it and Docking Regions provide extra visual feedback of this action. +Docking Regions are also a quick way to "snap" dockables into place without needing to precisely drag to a Docking Handle. + ## Using Docking Handles to Dock When dragging a dockable hovering over another dockable will display docking handles in the center of the dockable. These handles provide easy access to dock to the North, South, East and West regions. diff --git a/Writerside/topics/starter-topic.md b/Writerside/topics/starter-topic.md index 890478b2..724d9bcc 100644 --- a/Writerside/topics/starter-topic.md +++ b/Writerside/topics/starter-topic.md @@ -1,8 +1,14 @@ -# About ModernDocking +# Welcome to Modern Docking + +Welcome! This documentation explains both the user facing features of Modern Docking and it's API. + +Modern Docking provides a rich set of features to enhance any Java Swing User Interface. + + \ No newline at end of file