JIDE 3.5.15

com.jidesoft.docking
Class DefaultDockingManager

java.lang.Object
  extended by com.jidesoft.swing.AbstractLayoutPersistence
      extended by com.jidesoft.docking.DefaultDockingManager
All Implemented Interfaces:
DeprecatedDockingManager, DockingManager, LayoutPersistence, RootPanePersistence, UndoableSupport

public class DefaultDockingManager
extends AbstractLayoutPersistence
implements DockingManager, LayoutPersistence, UndoableSupport

Default implementation of DockingManager. It is also the main interface that user needs to access to get the features of dockable frames.

Basically it maintains a list of DockableFrames and allows user to interactive with them.


Nested Class Summary
protected  class DefaultDockingManager.DefaultDockingManagerAnimationHandler
           
protected  class DefaultDockingManager.DockableFrameWorkspaceHandle
           
protected  class DefaultDockingManager.DockedHiddenSlidingContainer
           
protected  class DefaultDockingManager.InternalDockableFrameRouter
           
protected  class DefaultDockingManager.InternalEventManager
           
 class DefaultDockingManager.MainPanel
           
protected  class DefaultDockingManager.MenuChangeStateListener
           
 
Nested classes/interfaces inherited from interface com.jidesoft.docking.DockingManager
DockingManager.FloatingContainerCustomizer, DockingManager.FrameHandle, DockingManager.TabbedPaneCustomizer
 
Field Summary
 ComponentAdapter _componentListener
           
protected  PropertyChangeListener _focusPropertyChangeListener
           
 
Fields inherited from class com.jidesoft.swing.AbstractLayoutPersistence
_layoutDirectory, _loadingLayoutData, _profileKey, _useFrameBounds, _useFrameBoundsSet, _useFrameState, _useFrameStateSet, _usePref, _version, DEFAULT_PROFILE_NAME, LAYOUT_COUNT_STRING, LAYOUT_POSTFIX, MAX_PREF_BYTE_ARRAY_LENGTH, PROPERTY_PROFILE_KEY, PROPERTY_USE_PREF, PROPERTY_VERSION, V2004, V2005_09
 
Fields inherited from interface com.jidesoft.docking.DockingManager
ACTION_ID_HIDDEN_BY_PARENT, ACTION_NAME_HIDDEN_BY_PARENT, CONTEXT_MENU_CLOSE, CONTEXT_MENU_HIDE_AUTOHIDE, CONTEXT_MENU_TOGGLE_AUTOHIDE, CONTEXT_MENU_TOGGLE_DOCKABLE, CONTEXT_MENU_TOGGLE_FLOATING, CONTEXT_MENU_TOGGLE_MAXIMIZE, DOUBLE_CLICK_CUSTOM, DOUBLE_CLICK_NONE, DOUBLE_CLICK_TO_AUTOHIDE, DOUBLE_CLICK_TO_FLOAT, DOUBLE_CLICK_TO_MAXIMIZE, FLOATING_CONTAINER_TYPE_DIALOG, FLOATING_CONTAINER_TYPE_FRAME, FLOATING_CONTAINER_TYPE_WINDOW, FULL_OUTLINE_MODE, HW_OUTLINE_MODE, HW_TRANSPARENT_OUTLINE_MODE, MIX_OUTLINE_MODE, PARTIAL_OUTLINE_MODE, PROPERTY_ACTIVE, PROPERTY_ACTIVE_WORKSPACE, PROPERTY_ALLOWED_DOCK_SIDES, PROPERTY_AUTO_DOCKING, PROPERTY_AUTO_DOCKING_AS_DEFAULT, PROPERTY_AUTOHIDABLE, PROPERTY_AUTOHIDE_ALL_TABS, PROPERTY_AUTOHIDE_SHOWING_CONTENT_HIDDEN, PROPERTY_CONTINUOUS_LAYOUT, PROPERTY_CROSS_DRAGGING_ALLOWED, PROPERTY_CROSS_DROPPING_ALLOWED, PROPERTY_CUSTOM_INIT_SPLIT_PRIORITY, PROPERTY_DOCKED_FRAMES_RESIZABLE, PROPERTY_DOCKING_MANAGER_GROUP, PROPERTY_DOUBLE_CLICK_ACTION, PROPERTY_DRAG_ALL_TABS, PROPERTY_DRAG_GRIPPER_ONLY, PROPERTY_EASY_TAB_DOCK, PROPERTY_FLOAT_ALL_TABS, PROPERTY_FLOATABLE, PROPERTY_FLOATING_CONTAINER_TYPE, PROPERTY_FLOATING_FRAMES_RESIZABLE, PROPERTY_FRAMEHANDLE_ZORDER, PROPERTY_FRAMES_MANAGED, PROPERTY_FRAMES_VISIBLE, PROPERTY_GROUP_ALLOWED_ON_SIDE_PANE, PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED, PROPERTY_HIDABLE, PROPERTY_HIDE_ALL_TABS, PROPERTY_HIDE_FLOATINGFRAMES_ON_SWITCH_OUT_OF_APPLICATION, PROPERTY_HIDE_FLOATINGFRAMES_WHEN_DEACTIVATE, PROPERTY_INIT_BOUNDS, PROPERTY_INIT_CENTER_SPLIT, PROPERTY_INIT_DELAY, PROPERTY_INIT_EAST_SPLIT, PROPERTY_INIT_NORTH_SPLIT, PROPERTY_INIT_SOUTH_SPLIT, PROPERTY_INIT_SPLIT_PRIORITY, PROPERTY_INIT_STATE, PROPERTY_INIT_WEST_SPLIT, PROPERTY_MAXIMIZE_ALL_TABS, PROPERTY_NESTED_FLOATING_ALLOWED, PROPERTY_OUTLINE_MODE, PROPERTY_PRESERVE_STATE_ON_DRAGGING, PROPERTY_PROPORTIONAL_SPLITS, PROPERTY_REARRANGABLE, PROPERTY_RESIZABLE, PROPERTY_SHOW_DIVIDER_GRIPPER, PROPERTY_SHOW_GRIPPER, PROPERTY_SHOW_TITLE_ON_OUTLINE, PROPERTY_SHOW_TITLEBAR, PROPERTY_SHOW_WORKSPACE, PROPERTY_SIDE_DOCK_ALLOWED, PROPERTY_SIDEBAR_ROLLOVER, PROPERTY_STEP_DELAY, PROPERTY_STEPS, PROPERTY_TAB_DOCK_ALLOWED, PROPERTY_TAB_REORDER_ALLOWED, PROPERTY_UNDO_LIMIT, PROPERTY_USE_DECORATED_FLOATING_CONTAINER, PROPERTY_WITHIN_FRAMEBOUNDS_ONDRAGGING, PROPERTY_WITHIN_SCREENBOUNDS_ONDRAGGING, SPLIT_CUSTOM, SPLIT_EAST_SOUTH_WEST_NORTH, SPLIT_EAST_WEST_SOUTH_NORTH, SPLIT_SOUTH_NORTH_EAST_WEST, SPLIT_WEST_SOUTH_EAST_NORTH, TRANSPARENT_OUTLINE_MODE, UNKNOWN_FRAME_BEHAVIOR_HIDE, UNKNOWN_FRAME_BEHAVIOR_SHOW_INIT
 
Fields inherited from interface com.jidesoft.swing.LayoutPersistence
ATTRIBUTE_PERSISTENCE_NAME, NODE_LAYOUT_PERSISTENCE
 
Constructor Summary
DefaultDockingManager(RootPaneContainer rootPaneContainer, Container contentContainer)
          Creates a DefaultDockingManager.
 
Method Summary
 void activateFrame(String key)
          Activate the frame with the key.
 void activateWorkspace()
           
 void addDockableFrameDropListener(DockableFrameDropListener l)
          Adds the specified listener to receive dockable frame drop events from this dockable frame.
 void addDockableFrameListener(DockableFrameListener l)
          Allows you to add a single DockableFramelistener to all DockableFrames managed by the docking manager.
 void addFrame(DockableFrame frame)
          Adds a frame to this DockingManager.
 void addUndo(String name)
          Adds a new undo edit.
 void addUndoableEditListener(UndoableEditListener listener)
          Adds an UndoableEditListener.
protected  boolean allowActivate(Object source)
          Check if the source is allowed to be activated.
 void autohideAll()
          Auto-hide all frames.
 void autohideFrame(DockableFrame f, int side, int index)
          Deprecated. 
 void autohideFrame(String frameKey, int side, int index)
          Autohides a frame at particular side and particular index.
 void beginCompoundEdit(boolean isUndoRedo)
          Begins the edit of the model.
 void beginDraggingFrame(JComponent f, int mouseX, int mouseY, double relativeX, double relativeY, boolean single)
          This method is normally called when the user has indicated that they will begin dragging a component around.
 void beginLoadLayoutData()
          Starts a process to add/remove frame without showing on screen immediately.
 void beginResizingFrame(JComponent f, int direction)
          This methods is normally called when the user has indicated that they will begin resizing the frame.
 void cancelDragging()
          Cancel the dragging.
protected  void checkFrameKey(String key, String methodName)
           
 AutoHideContainer createAutoHideContainer(int side)
          Creates the AutoHideContainer which are the four panes on the side which contains the autohidden dockable frames.
 MouseListener createAutoHideMouseListener(DockableFrame frame, int side)
          Deprecated. 
 ContainerContainer createContainerContainer()
          Creates the container for the tabbed panes.
protected  DialogFloatingContainer createDialogFloatingContainer(DefaultDockingManager.InternalEventManager eventManager, Window window)
          Create DialogFloatingContainer instance.
 FloatingContainer createFloatingContainer(Window owner)
          Creates a FloatingContainer.
 FrameContainer createFrameContainer()
          Subclass can override it to create your own FrameContainer.
protected  FrameFloatingContainer createFrameFloatingContainer(DefaultDockingManager.InternalEventManager eventManager)
          Create FrameFloatingContainer instance.
protected  SimpleScrollPane createScrollPaneForAutoHideContainer(AutoHideContainer autoHideContainer)
           
protected  UndoManager createUndoManager()
          Creates UndoManager.
protected  WindowFloatingContainer createWindowFloatingContainer(DefaultDockingManager.InternalEventManager eventManager, Window window)
          Create WindowFloatingContainer instance.
 Workspace createWorkspace()
          Creates the workspace.
 FrameContainer customizeFrameContainer(FrameContainer frameContainer)
          Customize the FrameContainer created by DockingManager.createFrameContainer().
 void denotifyFrame(String key)
          De-notifies the frame using the key of that frame.
 void discardAllUndoEdits()
          Discard all undo edits
 void dispose()
          Removes all used resources.
protected  void disposeFloatingContainer(FloatingContainer floatingContainer)
           
 void dockFrame(DockableFrame f, int side, int index)
          Deprecated. 
 void dockFrame(String key, int side, int index)
          Docks the frame on the side and at the index.
 void doLayout()
          Deprecated. 
 void dragFrame(JComponent f, int newX, int newY, int mouseModifiers)
          The user has moved the frame.
 void endCompoundEdit()
          Ends the edit of the model.
 void endDraggingFrame(JComponent f)
          This method signals the end of the dragging session.
 void endResizingFrame(JComponent f)
          This method signals the end of the resize session.
 FloatingContainer findFloatingComponentAt(int x, int y)
           
 void finishShowingAutohideFrame(String frame)
          Notifies that the auto hide showing process has been finished.
 void floatFrame(DockableFrame f, Rectangle bounds, boolean isSingle)
          Deprecated. 
 void floatFrame(String key, Rectangle bounds, boolean isSingle)
          Float the frame with specified frameName.
 void floatingFrameActivated(WindowEvent windowEvent)
          Deprecated. 
 void floatingFrameDeactivated(WindowEvent windowEvent)
          Deprecated. 
 DockableFrame getActiveFrame()
          Deprecated. 
 String getActiveFrameKey()
          Gets currently selected frame.
 MouseInputListener getActiveMouseInputListener()
          This method should only be used by JIDE.
 Map<String,DockContext> getAllContexts()
          Gets the all DockContexts in cache.
static List<DockingManager> getAllDockingManagers()
          Get all docking managers currently.
 List<String> getAllFrameNames()
          Gets a list of the keys of all frames.
 Collection<String> getAllFrames()
          Gets a collection of all dockable frames' key.
 int getAllowedDockSides()
          Gets the allowed dock sides.
 String[] getAllVisibleFrameKeys()
          Gets an array of the keys of all visible frames.
 AutoHideContainer getAutoHideContainer(int side)
          Gets the autohide container by side.
 AutoHideContainer getAutoHideContaner(int side)
          Deprecated. 
 String getAutohideShowingFrame()
          Return they frame key that is autohideshowing.
 Container getContentContainer()
          Gets the content container.
 DockContext getContextOf(String frameKey)
          Gets dock context of a frame specified by frameKey.
 int[] getCustomInitSplitPriority()
          Gets custom init split priority.
 Component getDefaultFocusComponent()
          Deprecated. 
 DockableFrameDropListener[] getDockableFrameDropListeners()
          Returns an array of all the DockableFrameDropListeners added to this DockableFrame with addDockableFrameDropListener.
 DockableFrameFactory getDockableFrameFactory()
          Gets the dockable frame factory.
 DockableFrameListener[] getDockableFrameListeners()
          Returns an array of all the DockableFrameListeners added to this DockableFrame with addDockableFrameListener.
 DockedFrameContainer getDockedFrameContainer()
          Gets the main container.
 int getDoubleClickAction()
          Gets the action when user double clicks on the title bar of a dockable frame.
 Component getEscapeKeyTargetComponent()
          Gets the escape key target component.
protected  Component getEventSource(AWTEvent event, boolean includeFrameControls, boolean first)
          Get the source component of the event.
 DockableFrame getFirstFrame()
          Deprecated. 
 String getFirstFrameKey()
          Gets the first visible dockable frame.
 DockingManager.FloatingContainerCustomizer getFloatingContainerCustomizer()
          Gets the FloatingContainerCustomizer.
 int getFloatingContainerType()
          Gets the floating container type.
 List<FloatingContainer> getFloatingFrames()
          Get all floating frames in current layout.
 DockableFrame getFrame(String key)
          Gets the frame using key.
 DockingManagerGroup getGroup()
          Gets the DockingManagerGroup.
 Rectangle getInitBounds()
          Gets initial bounds of the main frame.
 int getInitCenterSplit()
          Gets the initial center split.
 int getInitDelay()
          Gets the initial delay.
 int getInitEastSplit()
          Gets the initial east split.
 int getInitNorthSplit()
          Gets the initial north split.
 int getInitSouthSplit()
          Gets the initial south split.
 int getInitSplitPriority()
          Gets the initial split priority.
 int getInitState()
          Gets initial state of the main frame.
 int getInitWestSplit()
          Gets the initial west split.
protected  DefaultDockingManager.InternalEventManager getInternalEventManager()
          Get internal event manager.
 DockableFrame getLastFrame()
          Deprecated. 
 String getLastFrameKey()
          Gets the last visible dockable frame.
 JComponent getMainContainer()
          Gets the main container.
 JFrame getMainFrame()
          Deprecated. 
 DockableFrame getMaximizedFrame()
          Deprecated. 
 String getMaximizedFrameKey()
          Gets the maximized frame if any.
 DockableFrame getNextFrame(DockableFrame f)
          Deprecated. 
 String getNextFrame(String frame)
          Gets the next visible dockable frame.
 Color getNotificationBackground()
          Gets the notification background.
 int getNotificationDelay()
          Gets the delay of ms between two flashes when notifyFrame is called.
 Color getNotificationForeground()
          Gets the notification foreground.
 int getNotificationSteps()
          Gets the number of flashes when notifyFrame is called.
 List<DockingManager.FrameHandle> getOrderedFrames()
           
 int getOutlineMode()
          Gets contour outline mode.
 int getOutsideSensitiveAreaSize()
          Gets the size of the area outside the DockableHolder where the dock action will happen.
 PopupMenuCustomizer getPopupMenuCustomizer()
          Gets the popup menu customizer.
 DockableFrame getPreviousFrame(DockableFrame f)
          Deprecated. 
 String getPreviousFrame(String frame)
          Gets the previous visible dockable frame.
 String getResourceString(String key)
          Gets the resource string used in DefaultDockingManager.
 RootPaneContainer getRootPaneContainer()
          Gets root pane container.
 int getSensitiveAreaSize()
          Gets the size of the area where the dock action will happen.
 int getSnapGridSize()
          Gets the snap grid size.
 int getStepDelay()
          Gets the delay in each step during animation.
 int getSteps()
          Gets how many steps in the animation.
 UndoableEditSupport getUndoableEditSupport()
          Gets the UndoableEditSupport instance to add UndoableListener.
 int getUndoLimit()
          Gets the undo limit.
 UndoManager getUndoManager()
          Gets the underlying UndoManager.
 int getUnknownFrameBehaviorOnLoading()
          Gets the unknown frame behavior on loading.
 Workspace getWorkspace()
          Gets workspace.
 void handleEscapeKey(AWTEvent event)
          Deprecated. 
 boolean handleEvent(AWTEvent event)
          Handles the AWTEvent.
protected  void handleNewlyAddedFrames(String[] newlyAddedFrames)
          A method for the customer to handle newly added frames while loading layout.
 void hideActiveAutohideFrame()
          Deprecated. 
 void hideFrame(String key)
          Sets the frame invisible using the key of that frame.
 void internalFloatingFrameActivated(WindowEvent windowEvent)
          Notification from one of our floatingFrame windows that it has been activated.
protected  void internalFloatingFrameDeactivated(WindowEvent event)
          Notification from one of our floatingFrame windows that it has been deactivated.
 void internalHandleEscapeKey(AWTEvent event)
          In response to an escape key event (or CTRL-tab), transfer focus to the registered escape key target.
protected  void internalSetShowWorkspace(boolean showWorkspace)
           
 boolean isActive()
          Checks if the DockingManager is considered as active docking manager.
 boolean isAllowRequestFocus()
          Deprecated. 
 boolean isAutoActivateFocusOwner()
          Deprecated. 
 boolean isAutoDocking()
          Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames.
 boolean isAutoDockingAsDefault()
          Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames.
 boolean isAutohidable()
          Returns true if auto-hide is allowed for dockable frames.
 boolean isAutohideAllTabs()
          When user presses autohide button, will it affect all tabs or just selected tab.
 boolean isAutohideShowingContentHidden()
          Checks if the content of dockable frame is hidden during sliding.
 boolean isAutohideShowingInProgress()
          Checks if autohide showing has started but not finished.
 boolean isContinuousLayout()
          Determines whether the JSplitPane is set to use a continuous layout.
 boolean isCrossDraggingAllowed()
          Whether allows a dockable frame in this DockingManager to be dragged into other DockingManagers.
 boolean isCrossDroppingAllowed()
          Whether allows a dockable frame in other DockingManagers to be dragged into this DockingManager.
 boolean isDockedFramesResizable()
          If the dockable frame can be resized.
protected  boolean isDockingManagerFocused()
          Check if the this docking manager is currently focused.
 boolean isDragAllTabs()
          Checks if dragging the title bar will drag all the dockable frames in that tabbed pane.
 boolean isDragging()
          Check if there is a dragging going on.
 boolean isDragGripperOnly()
          When the gripper is visible, if the drag only happens when dragging on the gripper.
 boolean isDropAllowed(DockableFrame source, Component target, int side)
          Fires an dockable frame drop event.
 boolean isEasyTabDock()
          Usually dragging a dockable frame and pointing to the title bar of another dockable frame will make it tab dock.
static boolean isExclusive()
          Exclusive is an attribute that controls the visibility of floating frames among different docking managers.
 boolean isFloatable()
          Return true if floating is allowed for dockable frames.
 boolean isFloatAllTabs()
          When user presses toggle floating button, will it affect all tabs or just selected tab.
 boolean isFloatingFramesResizable()
          If the floating dockable frame can be resized.
 boolean isFocusDuringLoadLayout()
          Deprecated. 
 boolean isGroupAllowedOnSidePane()
          Returns true if group is allowed in side bar.
 boolean isHeavyweightComponentEnabled()
           
 boolean isHidable()
          Return true if hidden is allowed for dockable frames.
 boolean isHideAllTabs()
          When user presses close button, will it affect all tabs or just selected tab.
 boolean isHideFloatingFramesOnSwitchOutOfApplication()
          We can hide floating frames when we switch to a different DockingManager.
 boolean isHideFloatingFramesWhenDeactivate()
          Checks if the floating frames should be hidden automatically when the main frame is deactivated.
 boolean isHideNewlyAddedFrames()
          Checks if newly added frames should be hidden when the old layout is loaded.
 boolean isLoadDataSuccessful()
          Did the loadLayoutFrom(InputStream in) method load successfully from the input stream (false indicates that it called resetToDefault to load the layout.) This method can be called immediately after the loadLayoutFrom(InputStream in) call to determine if a specific LayoutPersistence was forced to call resetToDefault.
 boolean isMaximizeAllTabs()
          When user maximizes a dockable frame, will it maximize all tabs or just selected tab.
protected  boolean isModalDialog(Window window)
          Is the specified window is a modal dialog.
 boolean isNestedFloatingAllowed()
          Checks if nest floating frames are allowed.
protected  boolean isOwnedFloatingFrame(Window window)
          Is the specified window one of our floatingFrames?
protected  boolean isOwnedWindow(Window window)
          Is the specified window's ancestor is root pane container?
 boolean isPreserveAvailableProperty()
          Checks if the unavailable dockable frame will remain unavailable after saveLayout method is called.
 boolean isPreserveStateOnDragging()
          Preserving state on dragging means dragging will not cause the frame's state to change.
 boolean isProportionalSplits()
          Tells whether this docking manager will create proportional split panes when it creates split panes to hold docked frames.
 boolean isRearrangable()
          If the dockable frame can be rearranged.
 boolean isResizable()
          Deprecated. replaced by isFloatingFramesResizable() and isDockedFramesResizable()
 boolean isShowContextMenu()
          Checks if the context menu should be shown.
 boolean isShowDividerGripper()
          If the gripper is visible.
 boolean isShowGripper()
          If the gripper is visible.
 boolean isShowInitial()
          A client may specify that the docking layout is to be initialized without showing the window.
 boolean isShowTitleBar()
          If the gripper is visible.
 boolean isShowTitleOnOutline()
          Checks if the title of the dragging dockable frame is displayed on the outline while dragging.
 boolean isShowWorkspace()
          Checks if workspace area is visible.
 boolean isSidebarRollover()
          Checks if the rollover effect is on for tabs on side bar.
 boolean isSideDockAllowed()
           
 boolean isTabDockAllowed()
           
 boolean isTabReorderAllowed()
           
 boolean isUseDecoratedFloatingContainer()
          Checks if it always use decorated dialog or frame as the floating dockable frames' container.
 boolean isUseGlassPaneEnabled()
          Checks if we will use glass pane to change cursor.
 boolean isWithinFrameBoundsOnDragging()
          Checks the flag of withinFrameBoundsOnDragging.
 boolean isWithinScreenBoundsOnDragging()
          Checks the flag of withinScreenBoundsOnDragging.
 boolean isWorkspaceActive()
          Returns a flag to indicate if the workspace is active.
 boolean isXmlFormat()
          Gets the flag indicating if the layout should be saved to XML format by default.
protected  void loadDataErrorHandler()
          Handle the situation that data is loaded incorrectly, either the parameter is not correct or an exception was caught.
 void loadInitialLayout(Document layoutDocument)
          Load initial layout from an initial layout file designed by Visual Designer.
 boolean loadLayoutFrom(Document document)
          Load layout data from an Node that specified as node parameter.
 boolean loadLayoutFrom(InputStream in)
          Load layout data from an InputStream that specified as in parameter.
 void maximizeFrame(String key)
          Maximizes the frame.
 void moveFrame(String frameKey, String destFrameKey)
          Move the frame to the destFrame and put them into one tabbed pane.
 void moveFrame(String frameKey, String destFrameKey, int side)
          Move the frame to the destFrame's side.
 void notifyFrame(String key)
          Notifies the frame using the key of that frame.
 void pauseDragFrame()
          Pause the dragging session of a frame.
protected  void preDispatchDockableFrameEvent()
           
 void redo()
          Redo the last undone operation.
 void removeAllFrames()
          Removes all frames from this DockingManager.
 void removeContext(String key)
          Removes dock context from the Map.
 void removeDockableFrameDropListener(DockableFrameDropListener l)
          Removes the specified dockable frame listener so that it no longer receives dockable frame drop events from this dockable frame.
 void removeDockableFrameListener(DockableFrameListener l)
          Removes the specified dockable frame listener so that it no longer receives dockable frame events from this dockable frame.
 void removeExtraContexts()
          Removes extra DockContexts that is saved in the cache but the corresponding dockable frames are not in DockingManager anymore.
 void removeFrame(String key)
          Removes a frame from this DockingManager.
 void removeFrame(String key, boolean keepPreviousState)
          Removes a frame from this DockingManager.
 void removeFromHiddenFrames(String key)
          Remove it from hidden frame list.
 void removeUndoableEditListener(UndoableEditListener listener)
          Removes UndoableEditListener added before.
 void requestFocusInDockingManager()
           
 void resetLayout()
          This method is called for every rearragement of the dockable frames.
 void resetToDefault()
          Resets layout of frames to initial values.
 void resizingFrame(JComponent f, int newX, int newY, int newWidth, int newHeight)
          The user has resized the component.
 void restoreFrame()
          Restores the frame from maximized state.
 void saveLayoutTo(Document document)
          Save layout data to a Document that specified as document parameter.
 void saveLayoutTo(OutputStream out)
          Save layout data to an OutputStream that specified as out parameter.
 void setActive(boolean active)
          Makes the docking manager active.
 void setActiveMouseInputListener(MouseInputListener listener)
          This method should only be used by JIDE.
 void setAllowedDockSides(int allowedDockSides)
          Sets allowed dock sides.
 void setAutoActivateFocusOwner(boolean autoActivateFocusOwner)
          Deprecated. 
 void setAutoDocking(boolean autoDocking)
          Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames.
 void setAutoDockingAsDefault(boolean autoDockingAsDefault)
          Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames.
 void setAutohidable(boolean autohidable)
          Enable or disable floating of dockable frames.
 void setAutohideAllTabs(boolean autohideAllTabs)
          When user presses autohide button, will it affect all tabs or just selected tab.
 void setAutohideShowingContentHidden(boolean hide)
          Pass in true if you want the content of dockable frame hidden during sliding.
 void setAutohideShowingFrame(DockableFrame f)
          Deprecated. 
 void setContinuousLayout(boolean continuousLayout)
          Turn continuous layout on/off.
 void setCrossDraggingAllowed(boolean crossDraggingAllowed)
           
 void setCrossDroppingAllowed(boolean crossDroppingAllowed)
           
 void setCustomInitSplitPriority(int[] customInitSplitPriority)
          Sets custom init split priority.
 void setDefaultFocusComponent(Component defaultFocusComponent)
          Deprecated. 
 void setDockableFrameFactory(DockableFrameFactory dockableFrameFactory)
          Sets the dockable frame factory.
 void setDockedFramesResizable(boolean resizable)
          Enable or disable the resize of dockable frames.
 void setDoubleClickAction(int doubleClickAction)
          Sets the action when user double clicks on the title bar of a dockable frame.
 void setDragAllTabs(boolean dragAllTabs)
          Sets if dragging title bar will drag all dockable frames in the tabbed pane.
 void setDragGripperOnly(boolean dragGripperOnly)
          Sets the value to allow user to drag on the gripper as well as on the title bar.
 void setEasyTabDock(boolean easyTabDock)
          Sets the attribute if dragging and pointing to dockable frame will make it tab dock
 void setEscapeKeyTargetComponent(Component escapeKeyTargetComponent)
          Sets the escape key target component.
static void setExclusive(boolean exclusive)
          Sets the exclusive attribute.
 void setFloatable(boolean floatable)
          Enable or disable floating of dockable frames.
 void setFloatAllTabs(boolean floatAllTabs)
          Sets the option of floatAllTabs.
 void setFloatingContainerCustomizer(DockingManager.FloatingContainerCustomizer customizer)
          Sets the FloatingContainerCustomizer.
 void setFloatingContainerType(int floatingContainerType)
          Sets the floating container type.
 void setFloatingFramesResizable(boolean resizable)
          Enable or disable the resize of floating dockable frames.
 void setFloatingFramesVisible(boolean show)
          Sets all floating frame visible or invisible.
 void setFocusDuringLayout(boolean doFocus)
          Deprecated. 
 void setFrameAvailable(String key)
          Makes the frame available.
 void setFrameUnavailable(String key)
          Makes the frame unavailable.
 void setGroup(DockingManagerGroup group)
          Sets the DockingManagerGroup.
 void setGroupAllowedOnSidePane(boolean groupAllowedOnSidePane)
          If true, group is allowed in side bar.
 void setHeavyweightComponentEnabled(boolean heavyweightComponentEnabled)
          Enables heavyweight component.
 void setHidable(boolean hidable)
          Enable or disable dockable frames from being hidden.
 void setHideAllTabs(boolean hideAllTabs)
          Sets the option of closeAllTabs.
 void setHideFloatingFramesOnSwitchOutOfApplication(boolean newValue)
          Turn hiding floating frames when we switch to a different application on and off.
 void setHideFloatingFramesWhenDeactivate(boolean hideFloatingFramesWhenDeactivate)
          Sets if the floating frames should be hidden automatically when the main frame is deactivated.
 void setHideNewlyAddedFrames(boolean hideNewlyAddedFrames)
          Sets the flag to hide newly added frames when the old layout is loaded.
 void setInitBounds(Rectangle initBounds)
          Sets the initial bounds of the main frame.
 void setInitCenterSplit(int initCenterSplit)
          Sets the initial center split.
 void setInitDelay(int initDelay)
          Sets the initial delay of autohide dockable frame when it displays.
 void setInitEastSplit(int initEastSplit)
          Sets the initial east split.
 void setInitNorthSplit(int initNorthSplit)
          Sets the initial north split.
 void setInitSouthSplit(int initSouthSplit)
          Sets the initial south split.
 void setInitSplitPriority(int initSplitPriority)
          Sets the initial split priority.
 void setInitState(int initState)
          Sets the initial state of the main frame.
 void setInitWestSplit(int initWestSplit)
          Sets the initial west split.
 void setMaximizeAllTabs(boolean maximizeAllTabs)
          Sets the option of maximizeAllTabs.
 void setNestedFloatingAllowed(boolean nestedFloatingAllowed)
          Sets if allows nested floating frames.
 void setNotificationBackground(Color notificationBackground)
          Sets the notification background.
 void setNotificationDelay(int notificationDelay)
          Sets the delay between two flashes when notifyFrame is called.
 void setNotificationForeground(Color notificationForeground)
          Sets the notification foreground.
 void setNotificationSteps(int notificationSteps)
          Sets the number of flashes when notifyFrame is called.
 void setOutlineMode(int outlineMode)
          Sets contour outline mode PARTIAL_OUTLINE_MODE: Always uses light-weighted outline.
 void setOutsideSensitiveAreaSize(int sensitiveAreaSize)
          Sets the size of the area outside the DockableHolder where the dock action will happen.
 void setPopupMenuCustomizer(PopupMenuCustomizer customizer)
          Sets the popup customizer.
 void setPreserveAvailableProperty(boolean preserveAvailableProperty)
          Sets the flag if the unavailable dockable frame will remain unavailable after saveLayout method is called.
 void setPreserveStateOnDragging(boolean preserveStateOnDragging)
          Sets preserveStateOnDragging flag.
 void setProportionalSplits(boolean b)
          Sets whether this docking manager will create proportional split panes when it creates split panes to hold docked frames.
 void setRearrangable(boolean rearrangable)
          Enable or disable the rearrangement of dockable frames.
 void setResizable(boolean resizable)
          Deprecated. replaced by setFloatingFramesResizable(boolean) and setDockedFramesResizable(boolean)
 void setSensitiveAreaSize(int sensitiveAreaSize)
          Sets the size of the area where the dock action will happen.
 void setShowContextMenu(boolean showContextMenu)
          Sets the flag to show context menu or not.
 void setShowDividerGripper(boolean showDividerGripper)
          Sets the visibility of gripper.
 void setShowGripper(boolean showGripper)
          Sets the visibility of the gripper.
 void setShowInitial(boolean value)
          A client may specify that the docking layout is to be initialized without showing the window.
 void setShowTitleBar(boolean showTitleBar)
          Sets the visibility of the title bar.
 void setShowTitleOnOutline(boolean showTitleOnOutline)
          Sets the flag if the title will be displayed on the ontline while dragging.
 void setShowWorkspace(boolean showWorkspace)
          Shows or hides workspace area.
 void setSidebarRollover(boolean sidebarRollover)
          Sets to true if you want the tabs on side bar has rollover effect.
 void setSideDockAllowed(boolean sideDockAllowed)
          Sets the attribute if side docking is allowed.
 void setSnapGridSize(int snapGridSize)
          Sets the snap grid size.
 void setStepDelay(int stepDelay)
          Sets the delay in each step during animation, in ms.
 void setSteps(int steps)
          Sets how many steps in the animation, default is 1 step.
 void setTabbedPaneCustomizer(DockingManager.TabbedPaneCustomizer customizer)
          Set a customizer to customize the tabbed pane where dockable frames are.
 void setTabDockAllowed(boolean tabDockAllowed)
          Sets the attribute if tab docking is allowed.
 void setTabReorderAllowed(boolean tabReorderAllowed)
          Sets the attribute if tab reordering is allowed.
 void setUndoLimit(int undoLimit)
          Sets the undo limit.
 void setUnknownFrameBehaviorOnLoading(int unknownFrameBehaviorOnLoading)
          Sets the unknown frame behavior on loading.
 void setUseDecoratedFloatingContainer(boolean useDecoratedFloatingContainer)
          Sets to true so that it always use decorated dialog as the floating dockable frames' container.
 void setUseGlassPaneEnabled(boolean useGlassPaneEnabled)
          Enables us to use glass pane to for cursor change purpose.
 void setWithinFrameBoundsOnDragging(boolean withinFrameBoundsOnDragging)
          Sets the flag if dragging a dockable frame is limited to the main JFrame's bounds.
 void setWithinScreenBoundsOnDragging(boolean withinScreenBoundsOnDragging)
          Sets the flag if dragging a dockable frame is limited to the screen's bounds.
 void setXmlFormat(boolean xmlFormat)
          Sets the flag indicating if the layout should be saved to XML format by default.
protected  boolean shouldSetFloatingContainerVisible()
          Checks if the floating container should be set to visible.
protected  boolean shouldSwitchFocus(AWTEvent event)
          Check if Docking should switch focus because of the AWTEvent.
protected  boolean shouldSwitchFocus(Object component)
          Check if Docking should switch focus if mouse clicking on the component.
 boolean shouldVetoRemovingAllFrames()
          If any of the dockable frame's shouldVetoHiding() return true, this method will return true.
 void showContextMenu(Component source, Point point, DockableFrame dockableFrame, boolean onTab)
          Show context menu of dockable frames.
 void showFrame(String key)
          Sets the frame visible using the key of that frame and activate the frame.
 void showFrame(String key, boolean active)
          Sets the frame visible using the key of that frame and optionally activate the frame.
 void showInitial()
          A client may specify that the docking layout is to be initialized without showing the window.
 void startShowingAutohideFrame(DockableFrame f, int side, int delay)
          Deprecated. 
 void startShowingAutohideFrame(DockableFrame f, int side, int delay, boolean forceFocus)
          Deprecated. 
 void startShowingAutohideFrame(String frameKey, int side, int delay)
          Make the frame attached to the side bar so that it can be slided.
 void startShowingAutohideFrameImmediately(String frame, int side)
          Stops the autohidden frame from show immediately.
 void stopShowingAutohideFrame(int initDelay, boolean forceComplete)
          Stops showing the autohide frame.
 void stopShowingAutohideFrameImmediately()
          Stops the autohidden frame from show immediately.
 void switchRootPaneContainer(RootPaneContainer rootContainer)
          Change the root pane container.
 void toggleAutohideState(DockableFrame frame)
          Deprecated. 
 void toggleAutohideState(String key)
          Toggle auto-hide of the frame with the specified key.
 void toggleDockable(DockableFrame frame)
          Deprecated. 
 void toggleDockable(String key)
          Toggle dockable attribute of the frame with the specified key.
 void toggleMaximizeState(DockableFrame f)
          Deprecated. 
 void toggleMaximizeState(String key)
          Toggle between maximized and restored state.
 void toggleState(DockableFrame frame, boolean single)
          Deprecated. 
 void toggleState(String key, boolean single)
          Toggle the frame's state.
 void undo()
          Undo the last operation done to docking framework.
 void updateComponentTreeUI()
          Since there are several top level container in DockingManager, this method will call updateComponentTreeUI to all of them to make sure everything changes after reset look and feel.
protected  FloatingContainer updateUndecorated(FloatingContainer floatingContainer)
          Updates the undecorated of the floating container to make sure there is native title bar if there are more than one tabbed panes inside the floating container and no title bar if there is only one tabbed pane.
 
Methods inherited from class com.jidesoft.swing.AbstractLayoutPersistence
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getAvailableLayouts, getLayoutDirectory, getLayoutPersistenceName, getLayoutRawData, getLoadCallback, getProfileKey, getPropertyChangeListeners, getPropertyChangeListeners, getSaveCallback, getVersion, getXmlEncoding, isLast, isLayoutAvailable, isLayoutDataVersionValid, isLoadingLayoutData, isNeedFormatCheck, isUsePref, isVersionCompatible, loadInitialLayout, loadInitialLayout, loadLayoutData, loadLayoutDataFrom, loadLayoutDataFromFile, removeLayout, removePropertyChangeListener, removePropertyChangeListener, saveLayoutData, saveLayoutDataAs, saveLayoutDataToFile, setLast, setLayoutDirectory, setLayoutPersistenceName, setLayoutRawData, setLoadCallback, setLoadingLayoutData, setNeedFormatCheck, setProfileKey, setSaveCallback, setUseFrameBounds, setUseFrameState, setUsePref, setVersion, setXmlEncoding, shouldUseFrameBounds, shouldUseFrameState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.jidesoft.docking.DockingManager
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
 
Methods inherited from interface com.jidesoft.swing.LayoutPersistence
getAvailableLayouts, getLayoutDirectory, getLayoutPersistenceName, getLayoutRawData, getLoadCallback, getSaveCallback, getVersion, getXmlEncoding, isLast, isLayoutAvailable, isLayoutDataVersionValid, isNeedFormatCheck, loadInitialLayout, loadInitialLayout, loadLayoutData, loadLayoutDataFrom, loadLayoutDataFromFile, removeLayout, saveLayoutData, saveLayoutDataAs, saveLayoutDataToFile, setLast, setLayoutDirectory, setLayoutPersistenceName, setLayoutRawData, setLoadCallback, setNeedFormatCheck, setProfileKey, setSaveCallback, setUseFrameBounds, setUseFrameState, setUsePref, setVersion, setXmlEncoding
 

Field Detail

_focusPropertyChangeListener

protected PropertyChangeListener _focusPropertyChangeListener

_componentListener

public ComponentAdapter _componentListener
Constructor Detail

DefaultDockingManager

public DefaultDockingManager(RootPaneContainer rootPaneContainer,
                             Container contentContainer)
Creates a DefaultDockingManager. DockingManager must work with a RootPaneContainer and a container for the content for Docking Framework. Once RootPaneContainer is initialized, user can call getWorkspace() to get the workspace area, then add a JDesktopPane (for MDI) or a DocumentPane (for TDI, part of JIDE Components) to it.,

Parameters:
rootPaneContainer - the top level container which is usually a JFrame, JWindow, JDialog or JApplet. Please note, if you don't have a rootPaneContainer when creating the DefaultDockingManager, you can pass in null. We will find out the rootPaneContainer on fly when the contentContainer is added to a rootPaneContainer.
contentContainer - an area inside the root pane container. It should be an empty container. It should also be added to the component hierarchy tree when this constructor is called.
Method Detail

switchRootPaneContainer

public void switchRootPaneContainer(RootPaneContainer rootContainer)
Description copied from interface: DockingManager
Change the root pane container. The root pane container is set as a parameter in constructor of DockingManager. However if the content container is moved to another root pane container, you need to call this method to let DockingManager know the change.

We suggest you call saveLayout to a known location before calling this method, then call loadLayout to load the saved layout back after calling to switchRootPaneContainer to make sure dockable frames are laid out correctly in the new root pane container.

Specified by:
switchRootPaneContainer in interface DockingManager

setFloatingFramesVisible

public void setFloatingFramesVisible(boolean show)
Description copied from interface: DockingManager
Sets all floating frame visible or invisible.

Specified by:
setFloatingFramesVisible in interface DockingManager
Parameters:
show - the flag

isModalDialog

protected boolean isModalDialog(Window window)
Is the specified window is a modal dialog.

Parameters:
window - the window to check
Returns:
true if the window is a modal dialog.

isOwnedFloatingFrame

protected boolean isOwnedFloatingFrame(Window window)
Is the specified window one of our floatingFrames?

Parameters:
window - the specified window to check
Returns:
Is it?

isOwnedWindow

protected boolean isOwnedWindow(Window window)
Is the specified window's ancestor is root pane container?

Parameters:
window - the specified window to check
Returns:
Is it?

internalFloatingFrameDeactivated

protected void internalFloatingFrameDeactivated(WindowEvent event)
Notification from one of our floatingFrame windows that it has been deactivated. If the opposite window is not this or owned by this, then hide all floating windows.

Parameters:
event - the window event

internalFloatingFrameActivated

public void internalFloatingFrameActivated(WindowEvent windowEvent)
Notification from one of our floatingFrame windows that it has been activated. If it is offscreen, move it back on.

HACK!

There is a bug that prevents setVisible() from working properly in a specific situation. If there is a floatingContainer, a menu is open, and a menu is then selected in a different, window, a race condition occurs where the two windows repeatedly activate and deactivate opposite each other.

Until that bug can be resolved, a floatingContainer is hidden by moving it far offscreen.

Parameters:
windowEvent - the window event

findFloatingComponentAt

public FloatingContainer findFloatingComponentAt(int x,
                                                 int y)
Specified by:
findFloatingComponentAt in interface DockingManager

isAutoActivateFocusOwner

@Deprecated
public boolean isAutoActivateFocusOwner()
Deprecated. 

Description copied from interface: DockingManager
Check if the frame is automatically activated when its child component receives the keyboard focus.

Specified by:
isAutoActivateFocusOwner in interface DockingManager
Returns:
true or false.

setAutoActivateFocusOwner

@Deprecated
public void setAutoActivateFocusOwner(boolean autoActivateFocusOwner)
Deprecated. 

Description copied from interface: DockingManager
Sets the flag to autoActivateFocusOwner. If it's true, the dockable frame will automatically be activated when its child component receives keyboard focus. On the other hand, when a component in workspace area receives focus, the active dockable frame (if there is one) will be deactivated.

Please note, it'd better if you keep this flag false unless you programmatically request focus on a certain component. For example, here is the right way to use this method. We have to use a FocusListener because requestFocus is processed asynchronously.

 dockingManager.setAutoActivateFocusOwner(true);
 component.addFocusListener(new FocusAdapter() {
     public void focusGained(FocusEvent e) {
         dockingManager.setAutoActivateFocusOwner(false);
         component.removeFocusListener(this);
     }
 });
 component.requestFocus();
 

Default is true.

Specified by:
setAutoActivateFocusOwner in interface DockingManager
Parameters:
autoActivateFocusOwner - true or false.

handleEvent

public boolean handleEvent(AWTEvent event)
Description copied from interface: DockingManager
Handles the AWTEvent.

Specified by:
handleEvent in interface DockingManager
Parameters:
event - the event received
Returns:
true if the event should be consumed

shouldSwitchFocus

protected boolean shouldSwitchFocus(AWTEvent event)
Check if Docking should switch focus because of the AWTEvent.

By default, it will return true only if the event is a left click mouse event and shouldSwitchFocus(Object) returns true.

Parameters:
event - the AWT event
Returns:
true if the focus of DockableFrame should be changed. Otherwise false.
Since:
3.4.1

shouldSwitchFocus

protected boolean shouldSwitchFocus(Object component)
Check if Docking should switch focus if mouse clicking on the component.

By default, it will return true if the component is not a close button. However, if you want the switch not being changed in some cases, you could override this method. For example, if you want the focus not being changed if a non-focusable component is clicked. You could try the following code.

 return super.shouldSwitchFocus(component) && (!(component instanceof JComponent) || ((JComponent)
 component).isRequestFocusEnabled());
 

Parameters:
component - the component inside the DockableFrame
Returns:
true if the focus of DockableFrame should be changed. Otherwise false.

getEventSource

protected Component getEventSource(AWTEvent event,
                                   boolean includeFrameControls,
                                   boolean first)
Get the source component of the event.

By default, it will calculate the source component. However, if you want to customize some focus behavior, you may want to override this method to return a different component.

Please be noted that, it's kind of risky to override this method.

Parameters:
event - the event DockingManager currently gets
includeFrameControls - the flag indicating if frame controls should be considered
first - if it's the first event
Returns:
the source component to take action.

isDockingManagerFocused

protected boolean isDockingManagerFocused()
Check if the this docking manager is currently focused.

Returns:
true if the docking manager has focus. Otherwise false.
Since:
3.5.2

internalHandleEscapeKey

public void internalHandleEscapeKey(AWTEvent event)
In response to an escape key event (or CTRL-tab), transfer focus to the registered escape key target.

Parameters:
event - the event

getResourceString

public String getResourceString(String key)
Gets the resource string used in DefaultDockingManager. Subclass can override it to provide their own strings.

Specified by:
getResourceString in interface DockingManager
Parameters:
key - the resource key
Returns:
the localized string.
Since:
3.5.0

loadDataErrorHandler

protected void loadDataErrorHandler()
Handle the situation that data is loaded incorrectly, either the parameter is not correct or an exception was caught.

By default, it will invoke resetToDefault() to reset the layout to default. You could override this method to run your own session.


resetToDefault

public void resetToDefault()
Resets layout of frames to initial values.
This method is Swing thread-safe.

Specified by:
resetToDefault in interface LayoutPersistence

createScrollPaneForAutoHideContainer

protected SimpleScrollPane createScrollPaneForAutoHideContainer(AutoHideContainer autoHideContainer)

createAutoHideContainer

public AutoHideContainer createAutoHideContainer(int side)
Creates the AutoHideContainer which are the four panes on the side which contains the autohidden dockable frames.

Specified by:
createAutoHideContainer in interface DockingManager
Parameters:
side - the side
Returns:
the auto hide container instance.

getInitSplitPriority

public int getInitSplitPriority()
Gets the initial split priority. Possible values are SPLIT_EAST_WEST_SOUTH_NORTH, SPLIT_SOUTH_NORTH_EAST_WEST. The direction in front has a high priority than those after it. For example, if you initially has two frames, the initial side of one is south and the other one is east. If you use SPLIT_EAST_WEST_SOUTH_NORTH, the east one will cover the whole east side and the south one will cover whatever left. However if you use SPLIT_SOUTH_NORTH_EAST_WEST, the south one will cover the whole south side and the east one will cover whatever left.

Specified by:
getInitSplitPriority in interface DockingManager
Returns:
split priority.

setInitSplitPriority

public void setInitSplitPriority(int initSplitPriority)
Sets the initial split priority. Valid values are SPLIT_EAST_WEST_SOUTH_NORTH, SPLIT_SOUTH_NORTH_EAST_WEST, SPLIT_EAST_SOUTH_WEST_NORTH and SPLIT_WEST_SOUTH_EAST_NORTH. All defined in DockingManager. The direction in front has a high priority than those after it. For example, if you initially has two frames, the initial side of one is south and the other one is east. If you use SPLIT_EAST_WEST_SOUTH_NORTH, the east one will cover the whole east side and the south one will cover whatever left. However if you use SPLIT_SOUTH_NORTH_EAST_WEST, the south one will cover the whole south side and the east one will cover whatever left.

Specified by:
setInitSplitPriority in interface DockingManager
Parameters:
initSplitPriority - split priority.

getCustomInitSplitPriority

public int[] getCustomInitSplitPriority()
Gets custom init split priority. This is only used when setInitPriority is set to SPLIT_CUSTOM.

Specified by:
getCustomInitSplitPriority in interface DockingManager
Returns:
the custom init split priority.

setCustomInitSplitPriority

public void setCustomInitSplitPriority(int[] customInitSplitPriority)
Sets custom init split priority. This is only used when setInitPriority is set to SPLIT_CUSTOM. The customInitSplitPriority is an int array of four integers. The int is defined in DockContext such as DOCK_SIDE_NORTH, DOCK_SIDE_SOUTH, DOCK_SIDE_EAST and DOCK_SIDE_WEST. Each int means it splits on that side first. For example, setInitSplitPriority to SPLIT_EAST_WEST_SOUTH_NORTH is the same as setCustomInitSplitPriority to {DOCK_SIDE_EAST, DOCK_SIDE_WEST, DOCK_SIDE_SOUTH, DOCK_SIDE_NORTH}. The reason we keep both ways so that for normal users, setInitSplitPriority is good enough. But if you need a very special split priority, you can use setCustomInitSplitPriority to fully customize it.

Specified by:
setCustomInitSplitPriority in interface DockingManager
Parameters:
customInitSplitPriority - new init split priority

getInitCenterSplit

public int getInitCenterSplit()
Gets the initial center split. During initial layout, assuming there are several dockable frames' initSide are DOCK_SIDE_CENTER. Among them, the ones with the same index will be put into the same tabbed pane. If they have different index, they will be put into a multiple split pane. This flag will control the orientation of the split pane.

Specified by:
getInitCenterSplit in interface DockingManager
Returns:
the orientation of initial split pane in the center. Default is JideSplitPane.HORIZONTAL_SPLIT.

setInitCenterSplit

public void setInitCenterSplit(int initCenterSplit)
Sets the initial center split.

Specified by:
setInitCenterSplit in interface DockingManager
Parameters:
initCenterSplit - the initial center split
See Also:
getInitCenterSplit()

getInitEastSplit

public int getInitEastSplit()
Gets the initial east split. During initial layout, assuming there are several dockable frames' initSide are DOCK_SIDE_EAST. Among them, the ones with the same index will be put into the same tabbed pane. If they have different index, they will be put into a multiple split pane. This flag will control the orientation of the split pane.

Specified by:
getInitEastSplit in interface DockingManager
Returns:
the orientation of initial split pane in the east. Default is JideSplitPane.VERTICAL_SPLIT.

setInitEastSplit

public void setInitEastSplit(int initEastSplit)
Sets the initial east split. Valid values are JideSplitPane.HORIZONTAL_SPLIT and JideSplitPane.VERTICAL_SPLIT. It is JideSplitPane.VERTICAL_SPLIT by default.

Specified by:
setInitEastSplit in interface DockingManager
Parameters:
initEastSplit - the initial east split
See Also:
getInitEastSplit()

getInitWestSplit

public int getInitWestSplit()
Gets the initial west split. During initial layout, assuming there are several dockable frames' initSide are DOCK_SIDE_WEST. Among them, the ones with the same index will be put into the same tabbed pane. If they have different index, they will be put into a multiple split pane. This flag will control the orientation of the split pane.

Specified by:
getInitWestSplit in interface DockingManager
Returns:
the orientation of initial split pane in the west. Default is JideSplitPane.VERTICAL_SPLIT.

setInitWestSplit

public void setInitWestSplit(int initWestSplit)
Sets the initial west split. Valid values are JideSplitPane.HORIZONTAL_SPLIT and JideSplitPane.VERTICAL_SPLIT. It is JideSplitPane.VERTICAL_SPLIT by default.

Specified by:
setInitWestSplit in interface DockingManager
Parameters:
initWestSplit - initial west split
See Also:
getInitWestSplit()

getInitNorthSplit

public int getInitNorthSplit()
Gets the initial north split. During initial layout, assuming there are several dockable frames' initSide are DOCK_SIDE_NORTH. Among them, the ones with the same index will be put into the same tabbed pane. If they have different index, they will be put into a multiple split pane. This flag will control the orientation of the split pane.

Specified by:
getInitNorthSplit in interface DockingManager
Returns:
the orientation of initial split pane in the north. Default is JideSplitPane.HORIZONTAL_SPLIT.

setInitNorthSplit

public void setInitNorthSplit(int initNorthSplit)
Sets the initial north split. Valid values are JideSplitPane.HORIZONTAL_SPLIT and JideSplitPane.VERTICAL_SPLIT. It is JideSplitPane.HORIZONTAL_SPLIT by default.

Specified by:
setInitNorthSplit in interface DockingManager
Parameters:
initNorthSplit - the initial north split
See Also:
getInitNorthSplit()

getInitSouthSplit

public int getInitSouthSplit()
Gets the initial south split. During initial layout, assuming there are several dockable frames' initSide are DOCK_SIDE_SOUTH. Among them, the ones with the same index will be put into the same tabbed pane. If they have different index, they will be put into a multiple split pane. This flag will control the orientation of the split pane.

Specified by:
getInitSouthSplit in interface DockingManager
Returns:
the orientation of initial split pane in the south. Default is JideSplitPane.HORIZONTAL_SPLIT.

setInitSouthSplit

public void setInitSouthSplit(int initSouthSplit)
Sets the initial south split. Valid values are JideSplitPane.HORIZONTAL_SPLIT and JideSplitPane.VERTICAL_SPLIT. It is JideSplitPane.HORIZONTAL_SPLIT by default.

Specified by:
setInitSouthSplit in interface DockingManager
Parameters:
initSouthSplit - the flag
See Also:
getInitSouthSplit()

isLoadDataSuccessful

public boolean isLoadDataSuccessful()
Did the loadLayoutFrom(InputStream in) method load successfully from the input stream (false indicates that it called resetToDefault to load the layout.) This method can be called immediately after the loadLayoutFrom(InputStream in) call to determine if a specific LayoutPersistence was forced to call resetToDefault.

Specified by:
isLoadDataSuccessful in interface LayoutPersistence
Returns:
boolean did it load successfully from the input stream (false indicates that it called resetToDefault to load the layout.)

getFrame

public DockableFrame getFrame(String key)
Gets the frame using key.

Specified by:
getFrame in interface DockingManager
Parameters:
key - the frame key
Returns:
frame which has the key

addFrame

public void addFrame(DockableFrame frame)
Adds a frame to this DockingManager.
This method is Swing thread-safe.

Specified by:
addFrame in interface DockingManager
Parameters:
frame - frame to be added

removeAllFrames

public void removeAllFrames()
Removes all frames from this DockingManager.
This method is Swing thread-safe.

Specified by:
removeAllFrames in interface DockingManager

removeFrame

public void removeFrame(String key)
Removes a frame from this DockingManager.
This method is Swing thread-safe.

Specified by:
removeFrame in interface DockingManager
Parameters:
key - key of frame to be removed

removeFrame

public void removeFrame(String key,
                        boolean keepPreviousState)
Removes a frame from this DockingManager. This method has an option to keep previous state. In most cases, you don't want to keep the previous states when removing frame. That's what removeFrame(String) does. However if you just remove the frame and will add it back later, you can keep the state so that when the frame is added back, it has the exact same state as before.

This method is Swing thread-safe.

Specified by:
removeFrame in interface DockingManager
Parameters:
key - key of frame to be removed
keepPreviousState - the flag indicating if previous state should be kept

showFrame

public void showFrame(String key)
Sets the frame visible using the key of that frame and activate the frame. If you don't want to activate the frame, you can call showFrame(key, false).
This method is Swing thread-safe.

Specified by:
showFrame in interface DockingManager
Parameters:
key - the key of frame to be shown

showFrame

public void showFrame(String key,
                      boolean active)
Sets the frame visible using the key of that frame and optionally activate the frame.
This method is Swing thread-safe.

Specified by:
showFrame in interface DockingManager
Parameters:
key - the key of frame to be shown
active - true to activate the frame after showing. False will only show the frame.

notifyFrame

public void notifyFrame(String key)
Notifies the frame using the key of that frame.

There are many cases you want to call notifyFrame rather than showFrame. A typical use case is some important information was displayed in a dockable frame. However since user may be working on something else, you don't want to automatically transfer the focus to that dockable frame. Instead, you just make the tab of that dockable frame flashing to tell user that there is something in this frame.

If a dockable frame is in docked mode and hidden behind other dockable frame in a tabbed pane. This method will make the title of the tab flashing between red and normal color for 5 seconds, then stay red. If you click on the tab when flashing, the flashing will stop (de-notified). If a frame is in autohide mode, the title of the tab on the side pane will flash for 5 seconds as well. If user shows the autohide frame, the flash will go away.

The method will not change the state of the dockable frame or change the focus from other places to the dockable frame. So if the frame is in hidden, nothing will happen. If you wan to show a hidden frame, you need to call showFrame explicitly before calling notifyFrame.

This method is Swing thread-safe.

Specified by:
notifyFrame in interface DockingManager
Parameters:
key - the key of frame to be notified

denotifyFrame

public void denotifyFrame(String key)
De-notifies the frame using the key of that frame.
This method is Swing thread-safe.

Specified by:
denotifyFrame in interface DockingManager
Parameters:
key - the key of frame to be de-notified

hideFrame

public void hideFrame(String key)
Sets the frame invisible using the key of that frame.
This method is Swing thread-safe.

Specified by:
hideFrame in interface DockingManager
Parameters:
key - the frame key

dockFrame

public void dockFrame(String key,
                      int side,
                      int index)
Docks the frame on the side and at the index.
This method is Swing thread-safe.

Specified by:
dockFrame in interface DockingManager
Parameters:
key - the frame to be docked
side - four possible sides
index - 0 or 1
Throws:
IllegalArgumentException - if side is not a valid value.

floatFrame

public void floatFrame(String key,
                       Rectangle bounds,
                       boolean isSingle)
Float the frame with specified frameName.
This method is Swing thread-safe.

Specified by:
floatFrame in interface DockingManager
Parameters:
key - frame to be floated
bounds - the bounds of float frame
isSingle - true if just make current frame floated, false to make all frames in the same tabbed pane floated

shouldSetFloatingContainerVisible

protected boolean shouldSetFloatingContainerVisible()
Checks if the floating container should be set to visible.

The default implementation is return getRootPaneContainerAsComponent() != null && getRootPaneContainerAsComponent().isVisible();

Returns:
true if the root pane container is visible. Otherwise false.
Since:
3.4.7

createFloatingContainer

public FloatingContainer createFloatingContainer(Window owner)
Creates a FloatingContainer. By default it will create a different implementation of FloatingContainer depends on system property "docking.floatingContainerType" or the value returned from getFloatingContainerType().

Specified by:
createFloatingContainer in interface DockingManager
Parameters:
owner - the owner window
Returns:
a FloatingContainer.

createFrameFloatingContainer

protected FrameFloatingContainer createFrameFloatingContainer(DefaultDockingManager.InternalEventManager eventManager)
Create FrameFloatingContainer instance.

Parameters:
eventManager - the internal event manager
Returns:
a FrameFloatingContainer instance.

createWindowFloatingContainer

protected WindowFloatingContainer createWindowFloatingContainer(DefaultDockingManager.InternalEventManager eventManager,
                                                                Window window)
Create WindowFloatingContainer instance.

Parameters:
eventManager - the internal event manager
window - the owner window
Returns:
a WindowFloatingContainer instance.

createDialogFloatingContainer

protected DialogFloatingContainer createDialogFloatingContainer(DefaultDockingManager.InternalEventManager eventManager,
                                                                Window window)
Create DialogFloatingContainer instance.

Parameters:
eventManager - the internal event manager
window - the owner window
Returns:
a DialogFloatingContainer instance.

startShowingAutohideFrameImmediately

public void startShowingAutohideFrameImmediately(String frame,
                                                 int side)
Stops the autohidden frame from show immediately.
This method is Swing thread-safe.

Specified by:
startShowingAutohideFrameImmediately in interface DockingManager
Parameters:
frame - the frame that is showing
side - the side

startShowingAutohideFrame

public void startShowingAutohideFrame(String frameKey,
                                      int side,
                                      int delay)
Make the frame attached to the side bar so that it can be slided.

Specified by:
startShowingAutohideFrame in interface DockingManager
Parameters:
frameKey - the key of the frame
side - the side of the frame to show
delay - the delay in milliseconds

stopShowingAutohideFrame

public void stopShowingAutohideFrame(int initDelay,
                                     boolean forceComplete)
Description copied from interface: DockingManager
Stops showing the autohide frame. This will start the close animation after the initial delay.

Specified by:
stopShowingAutohideFrame in interface DockingManager
Parameters:
initDelay - initial delay time
forceComplete - the flag indicating if a mouse over can interrupt and cause the frame to stay open

finishShowingAutohideFrame

public void finishShowingAutohideFrame(String frame)
Description copied from interface: DockingManager
Notifies that the auto hide showing process has been finished.

Specified by:
finishShowingAutohideFrame in interface DockingManager
Parameters:
frame - the frame that is showing

stopShowingAutohideFrameImmediately

public void stopShowingAutohideFrameImmediately()
Stops the autohidden frame from show immediately.
This method is Swing thread-safe.

Specified by:
stopShowingAutohideFrameImmediately in interface DockingManager

getInternalEventManager

protected DefaultDockingManager.InternalEventManager getInternalEventManager()
Get internal event manager. This method is just for you to easy override createAutoHideContainer(int), createDialogFloatingContainer(com.jidesoft.docking.DefaultDockingManager.InternalEventManager, java.awt.Window), createFrameFloatingContainer(com.jidesoft.docking.DefaultDockingManager.InternalEventManager), createWindowFloatingContainer(com.jidesoft.docking.DefaultDockingManager.InternalEventManager, java.awt.Window).

Returns:
the internal used event manager.

getUnknownFrameBehaviorOnLoading

public int getUnknownFrameBehaviorOnLoading()
Description copied from interface: DockingManager
Gets the unknown frame behavior on loading.

Specified by:
getUnknownFrameBehaviorOnLoading in interface DockingManager
Returns:
the unknown frame behavior
See Also:
DockingManager.setUnknownFrameBehaviorOnLoading(int)

setUnknownFrameBehaviorOnLoading

public void setUnknownFrameBehaviorOnLoading(int unknownFrameBehaviorOnLoading)
Description copied from interface: DockingManager
Sets the unknown frame behavior on loading.

The unknown frame means that, it's an existing frame before loading layout. However, this frame does not exist in the layout file to be loaded.

So far, the value could be DockingManager.UNKNOWN_FRAME_BEHAVIOR_SHOW_INIT or DockingManager.UNKNOWN_FRAME_BEHAVIOR_HIDE. The first option is the traditional behavior that shows the frame respecting its initial mode, side and index. The hide option is a new behavior that hides the frame.

Specified by:
setUnknownFrameBehaviorOnLoading in interface DockingManager
Parameters:
unknownFrameBehaviorOnLoading - the unknown frame behavior

isXmlFormat

public boolean isXmlFormat()
Description copied from class: AbstractLayoutPersistence
Gets the flag indicating if the layout should be saved to XML format by default.

Specified by:
isXmlFormat in interface LayoutPersistence
Overrides:
isXmlFormat in class AbstractLayoutPersistence
Returns:
true if the layout should be saved to XML format. Otherwise false.
See Also:
AbstractLayoutPersistence.setXmlFormat(boolean)

setXmlFormat

public void setXmlFormat(boolean xmlFormat)
Description copied from class: AbstractLayoutPersistence
Sets the flag indicating if the layout should be saved to XML format by default.

If the flag is set to true, the layout format would be XML format. Otherwise, it will be traditional binary format to save space.

By default, the flag is false to keep original behavior. No matter how this flag is set, the DockingManager should be able to read either XML format or binary format layout file.

Specified by:
setXmlFormat in interface LayoutPersistence
Overrides:
setXmlFormat in class AbstractLayoutPersistence
Parameters:
xmlFormat - the flag

getSnapGridSize

public int getSnapGridSize()
Description copied from interface: DockingManager
Gets the snap grid size.

Specified by:
getSnapGridSize in interface DockingManager
Returns:
the snap grid size.
See Also:
DockingManager.setSnapGridSize(int)

setSnapGridSize

public void setSnapGridSize(int snapGridSize)
Description copied from interface: DockingManager
Sets the snap grid size.

Snap grid size is used to make dragging a DockableFrame to resize or reposition easier.

By default, the size is 1 pixel.

Specified by:
setSnapGridSize in interface DockingManager
Parameters:
snapGridSize - the snap grid size

activateFrame

public void activateFrame(String key)
Activate the frame with the key.
This method is Swing thread-safe.

Specified by:
activateFrame in interface DockingManager
Parameters:
key - key of frame to be activated

beginDraggingFrame

public void beginDraggingFrame(JComponent f,
                               int mouseX,
                               int mouseY,
                               double relativeX,
                               double relativeY,
                               boolean single)
This method is normally called when the user has indicated that they will begin dragging a component around. This method should be called prior to any dragFrame() calls to allow the DockingManager to prepare any necessary state. Normally f will be a DockableFrame.

Specified by:
beginDraggingFrame in interface DockingManager
Parameters:
f - the DockableFrame to be dragged
mouseX - the mouse X where the frame is dragged to
mouseY - the mouse Y where the frame is dragged to
relativeX - the relative X where the frame is dragged to
relativeY - the relative Y where the frame is dragged to
single - the flag indicating only the frame itself of the entire FrameContainer will be dragged

pauseDragFrame

public void pauseDragFrame()
Description copied from interface: DockingManager
Pause the dragging session of a frame. It simply hide any indication of it's being dragging. dragFrame will automatically resume the dragging session.

Specified by:
pauseDragFrame in interface DockingManager

isDragging

public boolean isDragging()
Check if there is a dragging going on.

Specified by:
isDragging in interface DockingManager
Returns:
true if dragging.

cancelDragging

public void cancelDragging()
Cancel the dragging.
This method is Swing thread-safe.

Specified by:
cancelDragging in interface DockingManager

dragFrame

public void dragFrame(JComponent f,
                      int newX,
                      int newY,
                      int mouseModifiers)
The user has moved the frame. Calls to this method will be preceded by calls to beginDraggingFrame(). Normally f will be a DockableFrame.

Specified by:
dragFrame in interface DockingManager
Parameters:
f - the dockable frame to drag
newX - the new X where the frame is being dragged to
newY - the new Y where the frame is being dragged to
mouseModifiers - the mouse modifiers if any

endDraggingFrame

public void endDraggingFrame(JComponent f)
This method signals the end of the dragging session. Any state maintained by the DockingManager can be removed here. Normally f will be a DockableFrame.

Specified by:
endDraggingFrame in interface DockingManager
Parameters:
f - the component to be dragged

createContainerContainer

public ContainerContainer createContainerContainer()
Description copied from interface: DockingManager
Creates the container for the tabbed panes. It is an actually JideSplitPane which we subclass it and called it ContainerContainer because it contains FrameContainer.

Specified by:
createContainerContainer in interface DockingManager
Returns:
container for the tabbed panes.

moveFrame

public void moveFrame(String frameKey,
                      String destFrameKey)
Move the frame to the destFrame and put them into one tabbed pane. If the frameKey or destFrameKey doesn't exist, IllegalArgumentException will be thrown. if the destFrameKey is in STATE_AUTOHIDE or STATE_AUTOHIDE_SHOWING state, this method will do nothing but return immediately.

Specified by:
moveFrame in interface DockingManager
Parameters:
frameKey - the key of the dockable frame to be moved
destFrameKey - the key of the destination dockable frame

moveFrame

public void moveFrame(String frameKey,
                      String destFrameKey,
                      int side)
Move the frame to the destFrame's side. If the frameKey or destFrameKey doesn't exist, IllegalArgumentException will be thrown. if the destFrameKey is in STATE_AUTOHIDE or STATE_AUTOHIDE_SHOWING state, this method will do nothing but return immediately.

Specified by:
moveFrame in interface DockingManager
Parameters:
frameKey - the key of the dockable frame to be moved
destFrameKey - the key of the destination dockable frame
side - dock side. Valid values are DockContext.DOCK_SIDE_EAST, DockContext.DOCK_SIDE_WEST,DockContext.DOCK_SIDE_NORTH, DockContext.DOCK_SIDE_SOUTH or DockContext.DOCK_SIDE_CENTER. If side is DockContext.DOCK_SIDE_CENTER, it will have the same result as moveFrame(String, String).

beginResizingFrame

public void beginResizingFrame(JComponent f,
                               int direction)
This methods is normally called when the user has indicated that they will begin resizing the frame. This method should be called prior to any resizeFrame() calls to allow the DockingManager to prepare any necessary state. Normally f will be a DockableFrame.

Specified by:
beginResizingFrame in interface DockingManager
Parameters:
f - the component
direction - the direction

resizingFrame

public void resizingFrame(JComponent f,
                          int newX,
                          int newY,
                          int newWidth,
                          int newHeight)
The user has resized the component. Calls to this method will be preceded by calls to beginResizingFrame(). Normally f will be a DockableFrame.

Specified by:
resizingFrame in interface DockingManager
Parameters:
f - the component
newX - new X
newY - new Y
newWidth - new width
newHeight - new height

endResizingFrame

public void endResizingFrame(JComponent f)
This method signals the end of the resize session. Any state maintained by the DockingManager can be removed here. Normally f will be a DockableFrame.

Specified by:
endResizingFrame in interface DockingManager
Parameters:
f - the component

toggleDockable

public void toggleDockable(String key)
Toggle dockable attribute of the frame with the specified key.

Specified by:
toggleDockable in interface DockingManager
Parameters:
key - frame key

toggleAutohideState

public void toggleAutohideState(String key)
Toggle auto-hide of the frame with the specified key.

Specified by:
toggleAutohideState in interface DockingManager
Parameters:
key - frame key

autohideFrame

public void autohideFrame(String frameKey,
                          int side,
                          int index)
Autohides a frame at particular side and particular index. Index is the index of group.

Specified by:
autohideFrame in interface DockingManager
Parameters:
frameKey - the key of the frame to be autohidden.
side - which side. It can be one of the four valid sides DockContext.DOCK_SIDE_WEST, DockContext.DOCK_SIDE_WEST,DockContext.DOCK_SIDE_NORTH and DockContext.DOCK_SIDE_SOUTH.
index - a positive integer that indicate the position of the frame
Throws:
IllegalArgumentException - if frameKey doesn't exist or side is not a valid side or index is less than 0.

getAutoHideContainer

public AutoHideContainer getAutoHideContainer(int side)
Gets the autohide container by side.

Specified by:
getAutoHideContainer in interface DockingManager
Parameters:
side - the dock side of the auto hide container
Returns:
autohide container

getOrderedFrames

public List<DockingManager.FrameHandle> getOrderedFrames()
Specified by:
getOrderedFrames in interface DockingManager

allowActivate

protected boolean allowActivate(Object source)
Check if the source is allowed to be activated.

The default implementation is just to return true. However, if you popped up a modal dialog and you don't want new dockable frames to flash the dialog, you could override this method to return false so that DockingManager will not try to activate the frame indeed.

Parameters:
source - the component to be activated
Returns:
true if the source is allowed to be activated. Otherwise false.

getRootPaneContainer

public RootPaneContainer getRootPaneContainer()
Description copied from interface: DockingManager
Gets root pane container. Root pane container is the JFrame, JWindow, JDialog or JApplet where this manager is installed to.

Specified by:
getRootPaneContainer in interface DockingManager
Specified by:
getRootPaneContainer in interface RootPanePersistence
Returns:
root pane container

getDockedFrameContainer

public DockedFrameContainer getDockedFrameContainer()
Gets the main container. Main container is the container that contains all docked window within the main frame. It doesn't include side bars, doesn't include toolbar or menu bar.

Specified by:
getDockedFrameContainer in interface DockingManager
Returns:
main container

createWorkspace

public Workspace createWorkspace()
Creates the workspace.

Specified by:
createWorkspace in interface DockingManager
Returns:
the workspace.

getWorkspace

public Workspace getWorkspace()
Description copied from interface: DockingManager
Gets workspace. Workspace is the area in the middle of the main frame that can used as the main workspace for documents for example.

Specified by:
getWorkspace in interface DockingManager
Returns:
workspace

setShowWorkspace

public void setShowWorkspace(boolean showWorkspace)
Shows or hides workspace area.

Specified by:
setShowWorkspace in interface DockingManager
Parameters:
showWorkspace - true to show workspace and false to hide.

isShowWorkspace

public boolean isShowWorkspace()
Checks if workspace area is visible.

Specified by:
isShowWorkspace in interface DockingManager
Returns:
if the workspace is visible.

internalSetShowWorkspace

protected void internalSetShowWorkspace(boolean showWorkspace)

activateWorkspace

public void activateWorkspace()
Specified by:
activateWorkspace in interface DockingManager

isWorkspaceActive

public boolean isWorkspaceActive()
Description copied from interface: DockingManager
Returns a flag to indicate if the workspace is active.

Specified by:
isWorkspaceActive in interface DockingManager
Returns:
if the workspace is active.

beginLoadLayoutData

public void beginLoadLayoutData()
Starts a process to add/remove frame without showing on screen immediately. Any call to loadLayoutDataXxx methods or resetToDefault() will mark the process.

Specified by:
beginLoadLayoutData in interface LayoutPersistence

loadLayoutFrom

public boolean loadLayoutFrom(Document document)
Description copied from interface: LayoutPersistence
Load layout data from an Node that specified as node parameter. If any exception happens during the read, it will call resetLayout() to use default layout.

Specified by:
loadLayoutFrom in interface LayoutPersistence
Parameters:
document - the Document where the layout data will be read from
Returns:
boolean true if load successfully. Otherwise false.

loadLayoutFrom

public boolean loadLayoutFrom(InputStream in)
Load layout data from an InputStream that specified as in parameter. If any exception happens during the read, it will call resetLayout() to use default layout.

Specified by:
loadLayoutFrom in interface LayoutPersistence
Parameters:
in - the InputStream where the layout data will be read from.
Returns:
boolean did it load successfully from the input stream (false indicates that it called resetToDefault to load the layout.)

handleNewlyAddedFrames

protected void handleNewlyAddedFrames(String[] newlyAddedFrames)
A method for the customer to handle newly added frames while loading layout.

Parameters:
newlyAddedFrames - the newly added frame names in array.
Since:
3.5.3

setShowInitial

public void setShowInitial(boolean value)
Description copied from interface: DockingManager
A client may specify that the docking layout is to be initialized without showing the window. In this case, the client is responsible for calling showInitial() every time the window is to be shown after loading layout.

Default is true, show the window at the end of initial layout.

Specified by:
setShowInitial in interface DockingManager
Parameters:
value - true or false.

isShowInitial

public boolean isShowInitial()
Description copied from interface: DockingManager
A client may specify that the docking layout is to be initialized without showing the window. In this case, the client is responsible for calling showInitial() every time the window is to be shown after loading layout.

Specified by:
isShowInitial in interface DockingManager
Returns:
true or false.

showInitial

public void showInitial()
Description copied from interface: DockingManager
A client may specify that the docking layout is to be initialized without showing the window. In this case, the client is responsible for calling showInitial() every time the window is to be shown after loading layout.

Specified by:
showInitial in interface DockingManager

requestFocusInDockingManager

public void requestFocusInDockingManager()
Specified by:
requestFocusInDockingManager in interface DockingManager

saveLayoutTo

public void saveLayoutTo(Document document)
Description copied from interface: LayoutPersistence
Save layout data to a Document that specified as document parameter.

Specified by:
saveLayoutTo in interface LayoutPersistence
Parameters:
document - the Document where the layout data will be written to

saveLayoutTo

public void saveLayoutTo(OutputStream out)
                  throws IOException
Save layout data to an OutputStream that specified as out parameter.

Specified by:
saveLayoutTo in interface LayoutPersistence
Parameters:
out - the OutputStream where the layout data will be written to.
Throws:
IOException

getContentContainer

public Container getContentContainer()
Description copied from interface: DockingManager
Gets the content container. The content container is the container passed as the second parameter of DefaultDockingManager(javax.swing.RootPaneContainer, java.awt.Container).

Specified by:
getContentContainer in interface DockingManager
Returns:
the content container.

getMainContainer

public JComponent getMainContainer()
Description copied from interface: DockingManager
Gets the main container. This is the primary container that holds all components that the docking manager works with.

Specified by:
getMainContainer in interface DockingManager
Returns:
main container

resetLayout

public void resetLayout()
This method is called for every rearragement of the dockable frames. By default, it will reset all ContainerContainers, validate ContentContainer, DockedFrameConatiner and Workspace.

Specified by:
resetLayout in interface DockingManager

getActiveFrameKey

public String getActiveFrameKey()
Description copied from interface: DockingManager
Gets currently selected frame.

Specified by:
getActiveFrameKey in interface DockingManager
Returns:
currently selected frame

disposeFloatingContainer

protected void disposeFloatingContainer(FloatingContainer floatingContainer)

updateUndecorated

protected FloatingContainer updateUndecorated(FloatingContainer floatingContainer)
Updates the undecorated of the floating container to make sure there is native title bar if there are more than one tabbed panes inside the floating container and no title bar if there is only one tabbed pane.

Parameters:
floatingContainer - the floating container.
Returns:
the floating container that has title or or not depending on the number of tabbed panes inside it.

autohideAll

public void autohideAll()
Auto-hide all frames.
This method is Swing thread safe.

Specified by:
autohideAll in interface DockingManager

toggleMaximizeState

public void toggleMaximizeState(String key)
Description copied from interface: DockingManager
Toggle between maximized and restored state.

Specified by:
toggleMaximizeState in interface DockingManager
Parameters:
key - the key of the DockableFrame

toggleState

public void toggleState(String key,
                        boolean single)
Description copied from interface: DockingManager
Toggle the frame's state. If it's docked, change to floating mode; if floating, change to docked mode.

Specified by:
toggleState in interface DockingManager
Parameters:
key - the key of the frame to change mode
single - change mode for all frames in the same tabbed pane or just the frame itself.

removeFromHiddenFrames

public void removeFromHiddenFrames(String key)
Remove it from hidden frame list.

Specified by:
removeFromHiddenFrames in interface DockingManager
Parameters:
key - the frame key

isAutohideAllTabs

public boolean isAutohideAllTabs()
When user presses autohide button, will it affect all tabs or just selected tab.

Specified by:
isAutohideAllTabs in interface DockingManager
Returns:
true if it will autohide all tabs.

setAutohideAllTabs

public void setAutohideAllTabs(boolean autohideAllTabs)
When user presses autohide button, will it affect all tabs or just selected tab.

Specified by:
setAutohideAllTabs in interface DockingManager
Parameters:
autohideAllTabs - true or false.

isHideAllTabs

public boolean isHideAllTabs()
When user presses close button, will it affect all tabs or just selected tab.

Specified by:
isHideAllTabs in interface DockingManager
Returns:
true if it will close all tabs.

setHideAllTabs

public void setHideAllTabs(boolean hideAllTabs)
Sets the option of closeAllTabs. If it's true, when user presses close it will close all tabs.

Specified by:
setHideAllTabs in interface DockingManager
Parameters:
hideAllTabs - true or false.

isFloatAllTabs

public boolean isFloatAllTabs()
When user presses toggle floating button, will it affect all tabs or just selected tab.

Specified by:
isFloatAllTabs in interface DockingManager
Returns:
true if it will close all tabs.

setFloatAllTabs

public void setFloatAllTabs(boolean floatAllTabs)
Sets the option of floatAllTabs. If it's true, when user presses toggle floating button it will float all tabs.

Specified by:
setFloatAllTabs in interface DockingManager
Parameters:
floatAllTabs - true or false.

isMaximizeAllTabs

public boolean isMaximizeAllTabs()
When user maximizes a dockable frame, will it maximize all tabs or just selected tab.

Specified by:
isMaximizeAllTabs in interface DockingManager
Returns:
true if it will close all tabs.

setMaximizeAllTabs

public void setMaximizeAllTabs(boolean maximizeAllTabs)
Sets the option of maximizeAllTabs.

Specified by:
setMaximizeAllTabs in interface DockingManager
Parameters:
maximizeAllTabs - true or false.

isFloatable

public boolean isFloatable()
Return true if floating is allowed for dockable frames.

Specified by:
isFloatable in interface DockingManager
Returns:
true if floating is allowed

setFloatable

public void setFloatable(boolean floatable)
Enable or disable floating of dockable frames.

Specified by:
setFloatable in interface DockingManager
Parameters:
floatable - the flag

isAutohidable

public boolean isAutohidable()
Returns true if auto-hide is allowed for dockable frames.

Specified by:
isAutohidable in interface DockingManager
Returns:
true if auto-hide is allowed

setAutohidable

public void setAutohidable(boolean autohidable)
Enable or disable floating of dockable frames.

Specified by:
setAutohidable in interface DockingManager
Parameters:
autohidable - the flag

isHidable

public boolean isHidable()
Return true if hidden is allowed for dockable frames.

Specified by:
isHidable in interface DockingManager
Returns:
true if hidden is allowed

setHidable

public void setHidable(boolean hidable)
Enable or disable dockable frames from being hidden.

Specified by:
setHidable in interface DockingManager
Parameters:
hidable - the flag

isRearrangable

public boolean isRearrangable()
If the dockable frame can be rearranged.

Specified by:
isRearrangable in interface DockingManager
Returns:
Return true if the dockable frames can be rearranged by user.

setRearrangable

public void setRearrangable(boolean rearrangable)
Enable or disable the rearrangement of dockable frames.

Specified by:
setRearrangable in interface DockingManager
Parameters:
rearrangable - true if the dockable frames can be rearranged by user.

isFloatingFramesResizable

public boolean isFloatingFramesResizable()
Description copied from interface: DockingManager
If the floating dockable frame can be resized.

Specified by:
isFloatingFramesResizable in interface DockingManager
Returns:
Return true if the floating dockable frames can be resized by user.

setFloatingFramesResizable

public void setFloatingFramesResizable(boolean resizable)
Description copied from interface: DockingManager
Enable or disable the resize of floating dockable frames.

Specified by:
setFloatingFramesResizable in interface DockingManager
Parameters:
resizable - true if the floating dockable frames can be resized by user.

isDockedFramesResizable

public boolean isDockedFramesResizable()
Description copied from interface: DockingManager
If the dockable frame can be resized.

Specified by:
isDockedFramesResizable in interface DockingManager
Returns:
Return true if the docked dockable frames can be resized by user.

setDockedFramesResizable

public void setDockedFramesResizable(boolean resizable)
Description copied from interface: DockingManager
Enable or disable the resize of dockable frames.

Specified by:
setDockedFramesResizable in interface DockingManager
Parameters:
resizable - true if the docked dockable frames can be resized by user.

isResizable

@Deprecated
public boolean isResizable()
Deprecated. replaced by isFloatingFramesResizable() and isDockedFramesResizable()

If the dockable frame can be resized.

Specified by:
isResizable in interface DockingManager
Returns:
Return true if the dockable frames can be resized by user.

setResizable

@Deprecated
public void setResizable(boolean resizable)
Deprecated. replaced by setFloatingFramesResizable(boolean) and setDockedFramesResizable(boolean)

Enable or disable resizable property of dockable frames.

Specified by:
setResizable in interface DockingManager
Parameters:
resizable - true if the dockable frames can be resize by user.

isGroupAllowedOnSidePane

public boolean isGroupAllowedOnSidePane()
Returns true if group is allowed in side bar.

Specified by:
isGroupAllowedOnSidePane in interface DockingManager
Returns:
true or false

setGroupAllowedOnSidePane

public void setGroupAllowedOnSidePane(boolean groupAllowedOnSidePane)
If true, group is allowed in side bar.

Specified by:
setGroupAllowedOnSidePane in interface DockingManager
Parameters:
groupAllowedOnSidePane - the flag

updateComponentTreeUI

public void updateComponentTreeUI()
Since there are several top level container in DockingManager, this method will call updateComponentTreeUI to all of them to make sure everything changes after reset look and feel.

Specified by:
updateComponentTreeUI in interface DockingManager

getAllFrames

public Collection<String> getAllFrames()
Gets a collection of all dockable frames' key. You can call getDockableFrame(key) to get the actual dockable frame.

It is the same usage as getAllFrameNames(). However the order of frame keys from this method is random. getAllFrameNames() returns the list in the order of when frame is added.

Specified by:
getAllFrames in interface DockingManager
Returns:
the collection of all dockable frames' key.

getAllFrameNames

public List<String> getAllFrameNames()
Gets a list of the keys of all frames. It's clone of the list maintained by the DockingManager.

Specified by:
getAllFrameNames in interface DockingManager
Returns:
the list of all frames The order in the list is the order of when frame is added.

getAllVisibleFrameKeys

public String[] getAllVisibleFrameKeys()
Description copied from interface: DockingManager
Gets an array of the keys of all visible frames. Please note, different from DockingManager.getAllFrameNames(), the order of keys are according to the layout on the screen. The order are docked frames first, the autohide frames, then floating frames. Then among frames of the same mode, it's from left to right and from top to bottom.

Specified by:
getAllVisibleFrameKeys in interface DockingManager
Returns:
an array of visible frames' key.

getFirstFrameKey

public String getFirstFrameKey()
Gets the first visible dockable frame. We used getAllVisibleFrameKeys() to figure out which is the first one. It is the first one in the array that is returned from getAllVisibleFrameKeys method.

Specified by:
getFirstFrameKey in interface DockingManager
Returns:
the first visible dockable frame.

getLastFrameKey

public String getLastFrameKey()
Gets the last visible dockable frame. We used getAllVisibleFrameKeys() to figure out which is the last one. It is the last one in the array that is returned from getAllVisibleFrameKeys method.

Specified by:
getLastFrameKey in interface DockingManager
Returns:
the last visible dockable frame.

getNextFrame

public String getNextFrame(String frame)
Gets the next visible dockable frame. We used getAllVisibleFrameKeys() to figure out which is the next one. It is the next one in the array that is returned from getAllVisibleFrameKeys method. If the frame is the last one, the first frame will be returned. Or if the frame is hidden, this method will return the first frame too. So unless you have no dockable frame at all, this method will never return null.

Specified by:
getNextFrame in interface DockingManager
Parameters:
frame - the current frame.
Returns:
the first visible dockable frame.

getPreviousFrame

public String getPreviousFrame(String frame)
Gets the previous visible dockable frame. We used getAllVisibleFrameKeys() to figure out which is the previous one. It is the next one in the array that is returned from getAllVisibleFrameKeys method. If the frame is the first one, the last frame will be returned. Or if the frame is hidden, this method will return the last frame too. So unless you have no dockable frame at all, this method will never return null.

Specified by:
getPreviousFrame in interface DockingManager
Parameters:
frame - the current frame.
Returns:
the last visible dockable frame.

isContinuousLayout

public boolean isContinuousLayout()
Determines whether the JSplitPane is set to use a continuous layout.

Specified by:
isContinuousLayout in interface DockingManager
Returns:
true or false.

setContinuousLayout

public void setContinuousLayout(boolean continuousLayout)
Turn continuous layout on/off.

Specified by:
setContinuousLayout in interface DockingManager
Parameters:
continuousLayout - true to turn on continuous layout.

createFrameContainer

public FrameContainer createFrameContainer()
Subclass can override it to create your own FrameContainer. Please make sure you call customizeFrameContainer(FrameContainer) before you return the FrameContainer you created.

Specified by:
createFrameContainer in interface DockingManager
Returns:
the FrameContainer.

customizeFrameContainer

public FrameContainer customizeFrameContainer(FrameContainer frameContainer)
Description copied from interface: DockingManager
Customize the FrameContainer created by DockingManager.createFrameContainer().

Specified by:
customizeFrameContainer in interface DockingManager
Parameters:
frameContainer - the frame container to be customized
Returns:
the frameContainer.

setTabbedPaneCustomizer

public void setTabbedPaneCustomizer(DockingManager.TabbedPaneCustomizer customizer)
Set a customizer to customize the tabbed pane where dockable frames are.

Here is a code example.

 dockingManager.setTabbedPaneCustomizer(new DockingManager.TabbedPaneCustomizer() {
     public void customize(JideTabbedPane tabbedPane) {
         tabbedPane.setTabPlacement(JideTabbedPane.TOP);
         tabbedPane.setHideOneTab(false);
     }
 });

Specified by:
setTabbedPaneCustomizer in interface DockingManager
Parameters:
customizer - new tabbed pane customizer

getInitBounds

public Rectangle getInitBounds()
Gets initial bounds of the main frame. If init bounds is never set before, it will return the smaller one screen size and {0, 0, 1024, 768)

Specified by:
getInitBounds in interface DockingManager
Returns:
initial bounds

setInitBounds

public void setInitBounds(Rectangle initBounds)
Sets the initial bounds of the main frame.

Specified by:
setInitBounds in interface DockingManager
Parameters:
initBounds - the initial bounds

removeContext

public void removeContext(String key)
Removes dock context from the Map.

Specified by:
removeContext in interface DockingManager
Parameters:
key - key of dockable frame

getInitState

public int getInitState()
Gets initial state of the main frame. State could be the states that are specified in Frame.getExtendedState(). If user never sets init state before, it will return Frame.NORMAL if the init bounds is less than screen size. If init bounds is larger than screen size, it will return Frame.MAXIMIZED_BOTH (under JDK 1.4 and above only) .

Specified by:
getInitState in interface DockingManager
Returns:
the initial state

setInitState

public void setInitState(int initState)
Sets the initial state of the main frame. State can be the states that are specified in Frame.getExtendedState().

Specified by:
setInitState in interface DockingManager
Parameters:
initState - the initial state
See Also:
Frame.setExtendedState(int), Frame.getExtendedState()

getSensitiveAreaSize

public int getSensitiveAreaSize()
Description copied from interface: DockingManager
Gets the size of the area where the dock action will happen.

Specified by:
getSensitiveAreaSize in interface DockingManager
Returns:
the sensitive size

setSensitiveAreaSize

public void setSensitiveAreaSize(int sensitiveAreaSize)
Description copied from interface: DockingManager
Sets the size of the area where the dock action will happen.

Specified by:
setSensitiveAreaSize in interface DockingManager
Parameters:
sensitiveAreaSize - the sensitive size

getOutsideSensitiveAreaSize

public int getOutsideSensitiveAreaSize()
Description copied from interface: DockingManager
Gets the size of the area outside the DockableHolder where the dock action will happen.

Specified by:
getOutsideSensitiveAreaSize in interface DockingManager
Returns:
the sensitive area size

setOutsideSensitiveAreaSize

public void setOutsideSensitiveAreaSize(int sensitiveAreaSize)
Description copied from interface: DockingManager
Sets the size of the area outside the DockableHolder where the dock action will happen.

Specified by:
setOutsideSensitiveAreaSize in interface DockingManager
Parameters:
sensitiveAreaSize - the sensitive size

getOutlineMode

public int getOutlineMode()
Gets contour outline mode. It is HW_OUTLINE_MODE by default. However we will return an appropriate outline mode based on the return values from SecurityUtils.isTranslucentWindowFeatureDisabled() and isHeavyweightComponentEnabled().

If the isTranslucentWindowFeatureDisabled is true and isHeavyweightComponentEnabled is true, we will return FULL_OUTLINE_MODE because that's the only outline satisfied both conditions. If only isTranslucentWindowFeatureDisabled is true, we will use TRANSPARENT_OUTLINE_MODE to replace HW_TRANSPARENT_OUTLINE_MODE and FULL_OUTLINE_MODE to replace HW_OUTLINE_MODE and keep other modes. If isTranslucentWindowFeatureDisabled is false but isHeavyweightComponentEnabled is true, we will use HW_OUTLINE_MODE to replace PARTIAL_OUTLINE_MODE or MIX_OUTLINE_MODE and HW_TRANSPARENT_OUTLINE_MODE to replace TRANSPARENT_OUTLINE_MODE. Otherwise, we will use whatever outline mode user sets.

Specified by:
getOutlineMode in interface DockingManager
Returns:
the outline mode.

setOutlineMode

public void setOutlineMode(int outlineMode)
Sets contour outline mode Please note, the last two outline mode is only available on JDK6u10 and later.

Specified by:
setOutlineMode in interface DockingManager
Parameters:
outlineMode - the new outline mode

getContextOf

public DockContext getContextOf(String frameKey)
Gets dock context of a frame specified by frameKey. If it has dock context, return the context; or else, return null.

Specified by:
getContextOf in interface DockingManager
Parameters:
frameKey - the frame key
Returns:
If it has dock context, return the context; or else, return null

getPopupMenuCustomizer

public PopupMenuCustomizer getPopupMenuCustomizer()
Gets the popup menu customizer.

Specified by:
getPopupMenuCustomizer in interface DockingManager
Returns:
popup menu customizer

setPopupMenuCustomizer

public void setPopupMenuCustomizer(PopupMenuCustomizer customizer)
Sets the popup customizer.

The menu passed in the the customizePopupMenu already have some menu items. You can remove all of them to add your own, or you can remove some of them. All existing menu items have a unique names. Here are the names - "DockableFrameTitlePane.close", "DockableFrameTitlePane.close", "DockableFrameTitlePane.toggleFloating", "DockableFrameTitlePane.toggleAutohide", "DockableFrameTitlePane.toggleMaximize", "DockableFrameTitlePane.toggleDockable", and "DockableFrameTitlePane.hideAutohide". The names should be very obvious to what the menu item do. There are also constants beginning with CONTEXT_MENU_xxx defined on DockingManager. So instead of using absolute menu item index, it'd better to use the name to look up a particular menu item.

Specified by:
setPopupMenuCustomizer in interface DockingManager
Parameters:
customizer - the menu customizer

showContextMenu

public void showContextMenu(Component source,
                            Point point,
                            DockableFrame dockableFrame,
                            boolean onTab)
Description copied from interface: DockingManager
Show context menu of dockable frames.

Specified by:
showContextMenu in interface DockingManager
Parameters:
source - source of the event
point - mouse point of the event
dockableFrame - dockable frame
onTab - true if mouse is clicked on tab; or else false.

getEscapeKeyTargetComponent

public Component getEscapeKeyTargetComponent()
Gets the escape key target component. If setEscapeKeyTargetComponent is never called, workspace will be the escape key target component. When the ESC key is pressed in a dockable frame, this component will get focus.

Specified by:
getEscapeKeyTargetComponent in interface DockingManager
Returns:
the escape key target component.

setEscapeKeyTargetComponent

public void setEscapeKeyTargetComponent(Component escapeKeyTargetComponent)
Sets the escape key target component.

Specified by:
setEscapeKeyTargetComponent in interface DockingManager
Parameters:
escapeKeyTargetComponent - the component

dispose

public void dispose()
Removes all used resources.

Specified by:
dispose in interface DockingManager

getInitDelay

public int getInitDelay()
Gets the initial delay.

Specified by:
getInitDelay in interface DockingManager
Returns:
the initial delay

setInitDelay

public void setInitDelay(int initDelay)
Sets the initial delay of autohide dockable frame when it displays.

Specified by:
setInitDelay in interface DockingManager
Parameters:
initDelay - the initial delay, in ms.

getStepDelay

public int getStepDelay()
Gets the delay in each step during animation.

Specified by:
getStepDelay in interface DockingManager
Returns:
the delay in each step

setStepDelay

public void setStepDelay(int stepDelay)
Sets the delay in each step during animation, in ms. Default is 5ms.

Specified by:
setStepDelay in interface DockingManager
Parameters:
stepDelay - the delay in each step

getSteps

public int getSteps()
Gets how many steps in the animation.

Specified by:
getSteps in interface DockingManager
Returns:
number of the steps

setSteps

public void setSteps(int steps)
Sets how many steps in the animation, default is 1 step. It must be greater than 0, or IllegalArgumentException will be thrown.

Specified by:
setSteps in interface DockingManager
Parameters:
steps - number of the steps

isEasyTabDock

public boolean isEasyTabDock()
Usually dragging a dockable frame and pointing to the title bar of another dockable frame will make it tab dock. However if easyTabDock is true, pointing to any area inside the dockable frame (as long as not too close to border) will make it tab dock.

Specified by:
isEasyTabDock in interface DockingManager
Returns:
true if dragging and pointing to dockable frame will make it tab dock

setEasyTabDock

public void setEasyTabDock(boolean easyTabDock)
Sets the attribute if dragging and pointing to dockable frame will make it tab dock

Specified by:
setEasyTabDock in interface DockingManager
Parameters:
easyTabDock - the attribute

isTabDockAllowed

public boolean isTabDockAllowed()
Specified by:
isTabDockAllowed in interface DockingManager

setTabDockAllowed

public void setTabDockAllowed(boolean tabDockAllowed)
Description copied from interface: DockingManager
Sets the attribute if tab docking is allowed. If the flag is false, user will not be able to tab dock to dockable frame together. However this flag wouldn't affect initial state. If you don't want any tab dock during initialization, you need to make sure dockable frames on the same init side to have different init index.

Specified by:
setTabDockAllowed in interface DockingManager
Parameters:
tabDockAllowed - the flag

isTabReorderAllowed

public boolean isTabReorderAllowed()
Specified by:
isTabReorderAllowed in interface DockingManager

setTabReorderAllowed

public void setTabReorderAllowed(boolean tabReorderAllowed)
Description copied from interface: DockingManager
Sets the attribute if tab reordering is allowed. If the flag is false, user will not be able to drag the tab and reorder the tabs. By default this is true.

Specified by:
setTabReorderAllowed in interface DockingManager
Parameters:
tabReorderAllowed - the flag

isNestedFloatingAllowed

public boolean isNestedFloatingAllowed()
Description copied from interface: DockingManager
Checks if nest floating frames are allowed. If this flag is false, when you drag something over a floating frame, nothing will happen just like the floating frame doesn't exist. If this flag is true, you can drag a frame over a floating frame and the outline will change shape to indicate where it will be dropped just like other frames in the main JFrame.

Specified by:
isNestedFloatingAllowed in interface DockingManager
Returns:
true if it's allowed. Otherwise, false

setNestedFloatingAllowed

public void setNestedFloatingAllowed(boolean nestedFloatingAllowed)
Description copied from interface: DockingManager
Sets if allows nested floating frames.

Specified by:
setNestedFloatingAllowed in interface DockingManager
Parameters:
nestedFloatingAllowed - the flag
See Also:
DockingManager.isNestedFloatingAllowed()

isDragAllTabs

public boolean isDragAllTabs()
Description copied from interface: DockingManager
Checks if dragging the title bar will drag all the dockable frames in that tabbed pane. By default dragging the title bar of a dockable frame will drag all dockable frames in the tabbed pane. Dragging the tab will only drag one dockable frame. If this flag is false, dragging title bar will just drag one dockable frame.

Specified by:
isDragAllTabs in interface DockingManager
Returns:
true if all dockable frames in the tabbed pane will be dragged when dragging the title bar.

setDragAllTabs

public void setDragAllTabs(boolean dragAllTabs)
Description copied from interface: DockingManager
Sets if dragging title bar will drag all dockable frames in the tabbed pane.

Specified by:
setDragAllTabs in interface DockingManager
Parameters:
dragAllTabs - the flag
See Also:
DockingManager.isDragAllTabs()

isShowGripper

public boolean isShowGripper()
If the gripper is visible.

Specified by:
isShowGripper in interface DockingManager
Returns:
true if grip is visible

setShowGripper

public void setShowGripper(boolean showGripper)
Sets the visibility of the gripper. This call will call all dockable frames' setShowGripper method so that they all have the same value.

Specified by:
setShowGripper in interface DockingManager
Parameters:
showGripper - true to show grip

isShowDividerGripper

public boolean isShowDividerGripper()
If the gripper is visible.

Specified by:
isShowDividerGripper in interface DockingManager
Returns:
true if grip is visible

setShowDividerGripper

public void setShowDividerGripper(boolean showDividerGripper)
Sets the visibility of gripper.

Specified by:
setShowDividerGripper in interface DockingManager
Parameters:
showDividerGripper - true to show grip

isDragGripperOnly

public boolean isDragGripperOnly()
When the gripper is visible, if the drag only happens when dragging on the gripper. Default is false which means you can drag title bar even the gripper is shown.

Specified by:
isDragGripperOnly in interface DockingManager
Returns:
true if grip is visible

setDragGripperOnly

public void setDragGripperOnly(boolean dragGripperOnly)
Sets the value to allow user to drag on the gripper as well as on the title bar. This flag only has effect when gripper is visible. If it's true, drag only happens when dragging on gripper. Otherwise, dragging on title bar will start the drag too.

Specified by:
setDragGripperOnly in interface DockingManager
Parameters:
dragGripperOnly - true to show grip

isShowTitleBar

public boolean isShowTitleBar()
If the gripper is visible.

Specified by:
isShowTitleBar in interface DockingManager
Returns:
true if grip is visible

setShowTitleBar

public void setShowTitleBar(boolean showTitleBar)
Sets the visibility of the title bar. This call will call all dockable frames' setShowTitleBar method so that they all have the same value.

Specified by:
setShowTitleBar in interface DockingManager
Parameters:
showTitleBar - true to show grip

setAutohideShowingContentHidden

public void setAutohideShowingContentHidden(boolean hide)
Description copied from interface: DockingManager
Pass in true if you want the content of dockable frame hidden during sliding. If all your dockable frames are very efficient when repaint, you can leave this option as false. It will look better if the option is false. Default is true.

Specified by:
setAutohideShowingContentHidden in interface DockingManager

isAutohideShowingContentHidden

public boolean isAutohideShowingContentHidden()
Description copied from interface: DockingManager
Checks if the content of dockable frame is hidden during sliding.

Specified by:
isAutohideShowingContentHidden in interface DockingManager
Returns:
true if the content of dockable frame is hidden during sliding

isSidebarRollover

public boolean isSidebarRollover()
Description copied from interface: DockingManager
Checks if the rollover effect is on for tabs on side bar.

Specified by:
isSidebarRollover in interface DockingManager
Returns:
true if rollover effect is on.

setSidebarRollover

public void setSidebarRollover(boolean sidebarRollover)
Description copied from interface: DockingManager
Sets to true if you want the tabs on side bar has rollover effect.

Specified by:
setSidebarRollover in interface DockingManager
Parameters:
sidebarRollover - the flag

setFrameAvailable

public void setFrameAvailable(String key)
Makes the frame available.

Usually all dockable frames are added to DockingManager when application is started. However some frames may only be available under certain context. For example, palette window should only be available when editing a GUI form. In this case, you can set the palette to available when GUI form is active. Or else, set it to unavailable.

Set the frame available will restore the last state of the frame when it is set to unavailable.

This method is Swing thread-safe.

Specified by:
setFrameAvailable in interface DockingManager
Parameters:
key - the key of frame to be shown

setFrameUnavailable

public void setFrameUnavailable(String key)
Makes the frame unavailable.

Usually all dockable frames are added to DockingManager when application is started. However some frames may only be available under certain context. For example, palette window should only be available when editing a GUI form. In this case, you can set the palette to available when GUI form is active. Or else, set it to unavailable.

Set the frame unavailable will hide the frame no matter what state it is. However the state will be remembered so that when later it was set to available, that state will be restored. When frame is unavailable, operations to that frame such as showFrame, hideFrame, etc, will have no effect.

This method is Swing thread-safe.

Specified by:
setFrameUnavailable in interface DockingManager
Parameters:
key - key of dockable frame

setUndoLimit

public void setUndoLimit(int undoLimit)
Sets the undo limit. If you want to turn off undo function, just set it to 0. The default is 0 to be backward compatible.

Specified by:
setUndoLimit in interface DockingManager
Parameters:
undoLimit - the flag

getUndoLimit

public int getUndoLimit()
Gets the undo limit.

Returns:
undoLimit

discardAllUndoEdits

public void discardAllUndoEdits()
Description copied from interface: DockingManager
Discard all undo edits

Specified by:
discardAllUndoEdits in interface DockingManager

undo

public void undo()
Description copied from interface: DockingManager
Undo the last operation done to docking framework.

Specified by:
undo in interface DockingManager

redo

public void redo()
Description copied from interface: DockingManager
Redo the last undone operation.

Specified by:
redo in interface DockingManager

getUndoManager

public UndoManager getUndoManager()
Description copied from interface: DockingManager
Gets the underlying UndoManager.

Specified by:
getUndoManager in interface DockingManager
Specified by:
getUndoManager in interface UndoableSupport
Returns:
the underlying UndoManager.

createUndoManager

protected UndoManager createUndoManager()
Creates UndoManager.

Returns:
the UndoManager instance.
Since:
3.4.1

beginCompoundEdit

public void beginCompoundEdit(boolean isUndoRedo)
Description copied from interface: UndoableSupport
Begins the edit of the model.

Specified by:
beginCompoundEdit in interface UndoableSupport
Parameters:
isUndoRedo - the flag to indicate if this operation is triggered by undo/redo

endCompoundEdit

public void endCompoundEdit()
Description copied from interface: UndoableSupport
Ends the edit of the model.

Specified by:
endCompoundEdit in interface UndoableSupport

isPreserveAvailableProperty

public boolean isPreserveAvailableProperty()
Description copied from interface: DockingManager
Checks if the unavailable dockable frame will remain unavailable after saveLayout method is called.

Specified by:
isPreserveAvailableProperty in interface DockingManager
Returns:
true or false. If true, all unavailable frames will still be unavailable. If false, all unavailable frames will become available.

setPreserveAvailableProperty

public void setPreserveAvailableProperty(boolean preserveAvailableProperty)
Description copied from interface: DockingManager
Sets the flag if the unavailable dockable frame will remain unavailable after saveLayout method is called.

Specified by:
setPreserveAvailableProperty in interface DockingManager
Parameters:
preserveAvailableProperty - true or false. True to preserve the unavailable flag.

addUndoableEditListener

public void addUndoableEditListener(UndoableEditListener listener)
Description copied from interface: DockingManager
Adds an UndoableEditListener. UndoableEditEvent will be fired when a undo edit is added.

Specified by:
addUndoableEditListener in interface DockingManager
Parameters:
listener - the listener

removeUndoableEditListener

public void removeUndoableEditListener(UndoableEditListener listener)
Description copied from interface: DockingManager
Removes UndoableEditListener added before.

Specified by:
removeUndoableEditListener in interface DockingManager
Parameters:
listener - the listener

addUndo

public void addUndo(String name)
Description copied from interface: DockingManager
Adds a new undo edit.

Specified by:
addUndo in interface DockingManager
Parameters:
name - the name of the new undo edit

getUndoableEditSupport

public UndoableEditSupport getUndoableEditSupport()
Description copied from interface: UndoableSupport
Gets the UndoableEditSupport instance to add UndoableListener.

Specified by:
getUndoableEditSupport in interface UndoableSupport
Returns:
the UndoableEditSupport instance.

maximizeFrame

public void maximizeFrame(String key)
Maximizes the frame.
This method is Swing thread-safe.

Specified by:
maximizeFrame in interface DockingManager
Parameters:
key - the key of frame to be maximized

getMaximizedFrameKey

public String getMaximizedFrameKey()
Description copied from interface: DockingManager
Gets the maximized frame if any.

Specified by:
getMaximizedFrameKey in interface DockingManager
Returns:
the maximized frame. If no frame is maximized, return null.

restoreFrame

public void restoreFrame()
Restores the frame from maximized state.

Specified by:
restoreFrame in interface DockingManager

getDoubleClickAction

public int getDoubleClickAction()
Gets the action when user double clicks on the title bar of a dockable frame. It could be either DOUBLE_CLICK_TO_FLOAT (default) or DOUBLE_CLICK_TO_MAXIMIZE or DOUBLE_CLICK_NONE if you don't want to have any action associated with double click.

Specified by:
getDoubleClickAction in interface DockingManager
Returns:
the action of double click on title bar.

setDoubleClickAction

public void setDoubleClickAction(int doubleClickAction)
Sets the action when user double clicks on the title bar of a dockable frame.

Specified by:
setDoubleClickAction in interface DockingManager
Parameters:
doubleClickAction - Either DOUBLE_CLICK_TO_FLOAT or DOUBLE_CLICK_TO_MAXIMIZE or DOUBLE_CLICK_NONE.

isAutoDocking

public boolean isAutoDocking()
Description copied from interface: DockingManager
Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames. By default, this flag is true. If this flag is false, it will not try to dock thus every time you drag a docked dockable frame, it will became floating state. The only way to dock back is to click on toggle floating button.

Specified by:
isAutoDocking in interface DockingManager
Returns:
if auto docking is enabled.

setAutoDocking

public void setAutoDocking(boolean autoDocking)
Description copied from interface: DockingManager
Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames. By default, this flag is true. If this flag is false, it will not try to dock thus every time you drag a docked dockable frame, it will became floating state. The only way to dock back is to click on toggle floating button.

Specified by:
setAutoDocking in interface DockingManager
Parameters:
autoDocking - if auto docking is enabled. Default is true.

isAutoDockingAsDefault

public boolean isAutoDockingAsDefault()
Description copied from interface: DockingManager
Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames. However if user holds control key while dragging, it will not attempt to dock. By default, this flag is true. If it is set to false, it will be the opposite - it will attempt to dock only when holding the control key.

Specified by:
isAutoDockingAsDefault in interface DockingManager
Returns:
if auto docking is the default.

setAutoDockingAsDefault

public void setAutoDockingAsDefault(boolean autoDockingAsDefault)
Description copied from interface: DockingManager
Auto docking means when a dockable frame is dragged, it will automatically attempt to dock to other docked frames. However if user holds control key while dragging, it will not attempt to dock. By default, this flag is true. If it is set to false, it will be the opposite - it will attempt to dock only when holding the control key.

Specified by:
setAutoDockingAsDefault in interface DockingManager
Parameters:
autoDockingAsDefault - the flag

isPreserveStateOnDragging

public boolean isPreserveStateOnDragging()
Description copied from interface: DockingManager
Preserving state on dragging means dragging will not cause the frame's state to change. By default, this is flag is false. So when you drag a docked frame to make it floating. Or you can drag a floating frame to make it docked. If this is flag is true, you can't do either of them. The only way to toggle between states is to via the title bar buttons on the dockable frame.

Specified by:
isPreserveStateOnDragging in interface DockingManager
Returns:
the preserveStateOnDragging flag.

setPreserveStateOnDragging

public void setPreserveStateOnDragging(boolean preserveStateOnDragging)
Description copied from interface: DockingManager
Sets preserveStateOnDragging flag.

Specified by:
setPreserveStateOnDragging in interface DockingManager
Parameters:
preserveStateOnDragging - the flag
See Also:
DockingManager.isPreserveStateOnDragging()

removeExtraContexts

public void removeExtraContexts()
Description copied from interface: DockingManager
Removes extra DockContexts that is saved in the cache but the corresponding dockable frames are not in DockingManager anymore.

Specified by:
removeExtraContexts in interface DockingManager

getAllContexts

public Map<String,DockContext> getAllContexts()
Description copied from interface: DockingManager
Gets the all DockContexts in cache.

Specified by:
getAllContexts in interface DockingManager
Returns:
a Map of all DockContexts.

isHideFloatingFramesWhenDeactivate

public boolean isHideFloatingFramesWhenDeactivate()
Description copied from interface: DockingManager
Checks if the floating frames should be hidden automatically when the main frame is deactivated.

Specified by:
isHideFloatingFramesWhenDeactivate in interface DockingManager
Returns:
true if the floating frames are hidden automatically when the main frame is deactivated.

setHideFloatingFramesWhenDeactivate

public void setHideFloatingFramesWhenDeactivate(boolean hideFloatingFramesWhenDeactivate)
Description copied from interface: DockingManager
Sets if the floating frames should be hidden automatically when the main frame is deactivated.

Specified by:
setHideFloatingFramesWhenDeactivate in interface DockingManager

isHideFloatingFramesOnSwitchOutOfApplication

public boolean isHideFloatingFramesOnSwitchOutOfApplication()
We can hide floating frames when we switch to a different DockingManager. Do we do the same when we switch to a different application?

Specified by:
isHideFloatingFramesOnSwitchOutOfApplication in interface DockingManager

setHideFloatingFramesOnSwitchOutOfApplication

public void setHideFloatingFramesOnSwitchOutOfApplication(boolean newValue)
Turn hiding floating frames when we switch to a different application on and off.

Specified by:
setHideFloatingFramesOnSwitchOutOfApplication in interface DockingManager

getAllowedDockSides

public int getAllowedDockSides()
Gets the allowed dock sides. The side values are defined in DockContext. The actual value returned is a OR of all possible dock sides. The possible dock sides are DockContext.DOCK_SIDE_NORTH, DockContext.DOCK_SIDE_SOUTH, DockContext.DOCK_SIDE_WEST, and DockContext.DOCK_SIDE_EAST. Or you can use combine values such as DockContext.DOCK_SIDE_HORIZONTAL, DockContext.DOCK_SIDE_VERTICAL or DockContext.DOCK_SIDE_ALL. Please note, DockContext.DOCK_SIDE_CENTER is not a valid value# By default, dragging a dockable frame to workspace is not allowed anyway# If you want to control it, you should use Workspace.setAcceptDockableFrame(boolean).

This setting will only affect user dragging. For example, if you set the allowed dock sides to not allow north side, user won't be able to drag a dockable frame and put it to the north side of the main window or the north side of workspace area. However if a dockable frame's initial side is set to north, it will be put to north. So you as developer need to consciously avoid initial dock sides which you don't allow using this setting.

Specified by:
getAllowedDockSides in interface DockingManager
Returns:
allowed dock sides.

setAllowedDockSides

public void setAllowedDockSides(int allowedDockSides)
Sets allowed dock sides.

Specified by:
setAllowedDockSides in interface DockingManager
Parameters:
allowedDockSides - allowed dock sides
See Also:
getAllowedDockSides()

shouldVetoRemovingAllFrames

public boolean shouldVetoRemovingAllFrames()
If any of the dockable frame's shouldVetoHiding() return true, this method will return true.

Specified by:
shouldVetoRemovingAllFrames in interface DockingManager
Returns:
true or false.

isExclusive

public static boolean isExclusive()
Exclusive is an attribute that controls the visibility of floating frames among different docking managers. You could have multiple docking managers in the same applications. In some cases, you want the docking managers to be exclusive, meaning when one docking manager is activated, the other docking managers' floating frame will be hidden automatically. A typical use case is you have several JFrames in your application. Each JFrame is managed by a docking manager. When one JFrame is activated, you want the floating frames of other JFrames to be hidden.

However in other cases, you don't want to be exclusive. For example, you have a nested docking manager inside another docking manager.

To consider both valid use cases, you can use this attribute to determine the correct behavior depending on your application. The default value is false.

Returns:
true or false.

setExclusive

public static void setExclusive(boolean exclusive)
Sets the exclusive attribute.

Parameters:
exclusive - the attribute
See Also:
isExclusive()

isShowContextMenu

public boolean isShowContextMenu()
Checks if the context menu should be shown.

Specified by:
isShowContextMenu in interface DockingManager
Returns:
true if context menu will be shown. Otherwise false.

setShowContextMenu

public void setShowContextMenu(boolean showContextMenu)
Sets the flag to show context menu or not.

Specified by:
setShowContextMenu in interface DockingManager
Parameters:
showContextMenu - the flag

isAutohideShowingInProgress

public boolean isAutohideShowingInProgress()
Description copied from interface: DockingManager
Checks if autohide showing has started but not finished.

Specified by:
isAutohideShowingInProgress in interface DockingManager
Returns:
true if autohide showing has started but not finished

getAutohideShowingFrame

public String getAutohideShowingFrame()
Description copied from interface: DockingManager
Return they frame key that is autohideshowing. This frame may be open/opening/closing.

Specified by:
getAutohideShowingFrame in interface DockingManager
Returns:
return they key for a frame that is either showing or opening/closing

getDockableFrameFactory

public DockableFrameFactory getDockableFrameFactory()
Description copied from interface: DockingManager
Gets the dockable frame factory. The factory is used in loadInitialLayout()/loadLayout() method. If the dockable frame exists in the layout to be loaded but not added to DockingManager, the factory will be used to create the dockable frame.

Specified by:
getDockableFrameFactory in interface DockingManager
Returns:
the dockable frame factory.

setDockableFrameFactory

public void setDockableFrameFactory(DockableFrameFactory dockableFrameFactory)
Description copied from interface: DockingManager
Sets the dockable frame factory.

Specified by:
setDockableFrameFactory in interface DockingManager
Parameters:
dockableFrameFactory - the dockable frame factory

loadInitialLayout

public void loadInitialLayout(Document layoutDocument)
Description copied from interface: LayoutPersistence
Load initial layout from an initial layout file designed by Visual Designer. To use this method, you need to load the initial layout into Document which represents XML document.

Specified by:
loadInitialLayout in interface LayoutPersistence
Parameters:
layoutDocument - the Document contains an initial layout.

isUseDecoratedFloatingContainer

public boolean isUseDecoratedFloatingContainer()
Checks if it always use decorated dialog or frame as the floating dockable frames' container.

Specified by:
isUseDecoratedFloatingContainer in interface DockingManager
Returns:
if it use decorate dialog as floating dockable frames' container.

setUseDecoratedFloatingContainer

public void setUseDecoratedFloatingContainer(boolean useDecoratedFloatingContainer)
Sets to true so that it always use decorated dialog as the floating dockable frames' container. If

Specified by:
setUseDecoratedFloatingContainer in interface DockingManager
Parameters:
useDecoratedFloatingContainer - the flag

isProportionalSplits

public boolean isProportionalSplits()
Description copied from interface: DockingManager
Tells whether this docking manager will create proportional split panes when it creates split panes to hold docked frames.

Specified by:
isProportionalSplits in interface DockingManager
Returns:
true if this docking manager will create proportional split panes. Otherwise false.

setProportionalSplits

public void setProportionalSplits(boolean b)
Description copied from interface: DockingManager
Sets whether this docking manager will create proportional split panes when it creates split panes to hold docked frames.

Specified by:
setProportionalSplits in interface DockingManager
Parameters:
b - the flag

preDispatchDockableFrameEvent

protected void preDispatchDockableFrameEvent()

isHeavyweightComponentEnabled

public boolean isHeavyweightComponentEnabled()
Specified by:
isHeavyweightComponentEnabled in interface DockingManager
Returns:
true if the heavyweight component is enabled.

setHeavyweightComponentEnabled

public void setHeavyweightComponentEnabled(boolean heavyweightComponentEnabled)
Enables heavyweight component. This method, if set to true, will make

Specified by:
setHeavyweightComponentEnabled in interface DockingManager
Parameters:
heavyweightComponentEnabled - the flag

isUseGlassPaneEnabled

public boolean isUseGlassPaneEnabled()
Checks if we will use glass pane to change cursor.

Specified by:
isUseGlassPaneEnabled in interface DockingManager
Returns:
true or false.

setUseGlassPaneEnabled

public void setUseGlassPaneEnabled(boolean useGlassPaneEnabled)
Enables us to use glass pane to for cursor change purpose.

Specified by:
setUseGlassPaneEnabled in interface DockingManager
Parameters:
useGlassPaneEnabled - the flag

isSideDockAllowed

public boolean isSideDockAllowed()
Specified by:
isSideDockAllowed in interface DockingManager

setSideDockAllowed

public void setSideDockAllowed(boolean sideDockAllowed)
Description copied from interface: DockingManager
Sets the attribute if side docking is allowed. If the flag is false, user will not be able to dock a dockable frame to the side of another dockable frame or workspace to create a new tabbed pane.

Specified by:
setSideDockAllowed in interface DockingManager
Parameters:
sideDockAllowed - the flag

isWithinFrameBoundsOnDragging

public boolean isWithinFrameBoundsOnDragging()
Description copied from interface: DockingManager
Checks the flag of withinFrameBoundsOnDragging. If true, when user drags the dockable frame, the position is limited by the main JFrame's bounds. If false, user will be able to drag dockable frame to float outside the main JFrame.

Specified by:
isWithinFrameBoundsOnDragging in interface DockingManager
Returns:
true or false.

setWithinFrameBoundsOnDragging

public void setWithinFrameBoundsOnDragging(boolean withinFrameBoundsOnDragging)
Description copied from interface: DockingManager
Sets the flag if dragging a dockable frame is limited to the main JFrame's bounds. If your application is always maximized to cover the whole user screen, you should set this flag to true.

Specified by:
setWithinFrameBoundsOnDragging in interface DockingManager
Parameters:
withinFrameBoundsOnDragging - the flag

isWithinScreenBoundsOnDragging

public boolean isWithinScreenBoundsOnDragging()
Description copied from interface: DockingManager
Checks the flag of withinScreenBoundsOnDragging. If true, when user drags the dockable frame, the position is limited by the screen's bounds. If false, user will be able to drag dockable frame to float outside the screen.

Specified by:
isWithinScreenBoundsOnDragging in interface DockingManager
Returns:
true or false.

setWithinScreenBoundsOnDragging

public void setWithinScreenBoundsOnDragging(boolean withinScreenBoundsOnDragging)
Description copied from interface: DockingManager
Sets the flag if dragging a dockable frame is limited to the screen's bounds. If your application is always maximized to cover the whole user screen, you should set this flag to true.

Specified by:
setWithinScreenBoundsOnDragging in interface DockingManager
Parameters:
withinScreenBoundsOnDragging - the flag

isCrossDraggingAllowed

public boolean isCrossDraggingAllowed()
Description copied from interface: DockingManager
Whether allows a dockable frame in this DockingManager to be dragged into other DockingManagers.

Specified by:
isCrossDraggingAllowed in interface DockingManager
Returns:
true or false.

setCrossDraggingAllowed

public void setCrossDraggingAllowed(boolean crossDraggingAllowed)
Specified by:
setCrossDraggingAllowed in interface DockingManager

isCrossDroppingAllowed

public boolean isCrossDroppingAllowed()
Description copied from interface: DockingManager
Whether allows a dockable frame in other DockingManagers to be dragged into this DockingManager.

Specified by:
isCrossDroppingAllowed in interface DockingManager
Returns:
true or false.

setCrossDroppingAllowed

public void setCrossDroppingAllowed(boolean crossDroppingAllowed)
Specified by:
setCrossDroppingAllowed in interface DockingManager

getAllDockingManagers

public static List<DockingManager> getAllDockingManagers()
Get all docking managers currently.

To be thread safe, we cloned a list from the original list. Please make sure that your application will release the memory after getting the instance. Otherwise, you will encounter memory leaking issue.

Returns:
docking managers list.

addDockableFrameDropListener

public void addDockableFrameDropListener(DockableFrameDropListener l)
Adds the specified listener to receive dockable frame drop events from this dockable frame.

Specified by:
addDockableFrameDropListener in interface DockingManager
Parameters:
l - the dockable frame listener

removeDockableFrameDropListener

public void removeDockableFrameDropListener(DockableFrameDropListener l)
Removes the specified dockable frame listener so that it no longer receives dockable frame drop events from this dockable frame.

Specified by:
removeDockableFrameDropListener in interface DockingManager
Parameters:
l - the dockable frame drop listener

getDockableFrameDropListeners

public DockableFrameDropListener[] getDockableFrameDropListeners()
Returns an array of all the DockableFrameDropListeners added to this DockableFrame with addDockableFrameDropListener.

Specified by:
getDockableFrameDropListeners in interface DockingManager
Returns:
all of the DockableFrameDropListeners added or an empty array if no listeners have been added
See Also:
addDockableFrameDropListener(com.jidesoft.docking.event.DockableFrameDropListener)

isDropAllowed

public boolean isDropAllowed(DockableFrame source,
                             Component target,
                             int side)
Fires an dockable frame drop event.

Specified by:
isDropAllowed in interface DockingManager
Parameters:
source - the frame to be dropped
target - the target that the frame to be dropped in
side - the side
Returns:
true if drop is allowed. Otherwise false.

addDockableFrameListener

public void addDockableFrameListener(DockableFrameListener l)
Description copied from interface: DockingManager
Allows you to add a single DockableFramelistener to all DockableFrames managed by the docking manager. If you just want to listen to the event from a particular DockableFrame, you can use DockableFrame.addDockableFrameListener(com.jidesoft.docking.event.DockableFrameListener) method.

Specified by:
addDockableFrameListener in interface DockingManager
Parameters:
l - the dockable frame listener

removeDockableFrameListener

public void removeDockableFrameListener(DockableFrameListener l)
Removes the specified dockable frame listener so that it no longer receives dockable frame events from this dockable frame.

Specified by:
removeDockableFrameListener in interface DockingManager
Parameters:
l - the dockable frame listener

getDockableFrameListeners

public DockableFrameListener[] getDockableFrameListeners()
Returns an array of all the DockableFrameListeners added to this DockableFrame with addDockableFrameListener.

Specified by:
getDockableFrameListeners in interface DockingManager
Returns:
all of the DockableFrameListeners added or an empty array if no listeners have been added
See Also:
addDockableFrameListener(com.jidesoft.docking.event.DockableFrameListener)

isHideNewlyAddedFrames

public boolean isHideNewlyAddedFrames()
Checks if newly added frames should be hidden when the old layout is loaded. It's false by default.

Specified by:
isHideNewlyAddedFrames in interface DockingManager
Returns:
true if newly added frame is hidden. Otherwise, false.

setHideNewlyAddedFrames

public void setHideNewlyAddedFrames(boolean hideNewlyAddedFrames)
Sets the flag to hide newly added frames when the old layout is loaded. For example, you had frame A, B and C and saved as a layout. Now you added frame D and load the saved layout. If this flag is true, the frame D will be hidden regardless what it's initial state is. If the flag is false, the D could be made visible if the frame's initial state is docked or floating or autohidden.

Specified by:
setHideNewlyAddedFrames in interface DockingManager
Parameters:
hideNewlyAddedFrames - the flag

getNotificationBackground

public Color getNotificationBackground()
Gets the notification background.

Specified by:
getNotificationBackground in interface DockingManager
Returns:
the notification background.

setNotificationBackground

public void setNotificationBackground(Color notificationBackground)
Sets the notification background. The color is used to flash the tab background when notifyFrame is called.

Specified by:
setNotificationBackground in interface DockingManager
Parameters:
notificationBackground - the notification background.

getNotificationForeground

public Color getNotificationForeground()
Gets the notification foreground.

Specified by:
getNotificationForeground in interface DockingManager
Returns:
the notification foreground.

setNotificationForeground

public void setNotificationForeground(Color notificationForeground)
Sets the notification foreground. The color is used to flash the tab foreground when notifyFrame is called.

Specified by:
setNotificationForeground in interface DockingManager
Parameters:
notificationForeground - the notification foreground.

getNotificationDelay

public int getNotificationDelay()
Gets the delay of ms between two flashes when notifyFrame is called.

Specified by:
getNotificationDelay in interface DockingManager
Returns:
the delay between two flashes.

setNotificationDelay

public void setNotificationDelay(int notificationDelay)
Sets the delay between two flashes when notifyFrame is called.

Specified by:
setNotificationDelay in interface DockingManager
Parameters:
notificationDelay - the delay.

getNotificationSteps

public int getNotificationSteps()
Gets the number of flashes when notifyFrame is called.

Specified by:
getNotificationSteps in interface DockingManager
Returns:
the number of flashes when notifyFrame is called.

setNotificationSteps

public void setNotificationSteps(int notificationSteps)
Sets the number of flashes when notifyFrame is called.

Specified by:
setNotificationSteps in interface DockingManager
Parameters:
notificationSteps - the number of flashes when notifyFrame is called. -1 means it will never stop until user responses to the notification.

isShowTitleOnOutline

public boolean isShowTitleOnOutline()
Description copied from interface: DockingManager
Checks if the title of the dragging dockable frame is displayed on the outline while dragging.

Specified by:
isShowTitleOnOutline in interface DockingManager
Returns:
true or false.

setShowTitleOnOutline

public void setShowTitleOnOutline(boolean showTitleOnOutline)
Description copied from interface: DockingManager
Sets the flag if the title will be displayed on the ontline while dragging. Please note, this flag works only when the outline mode is DockingManager.PARTIAL_OUTLINE_MODE and DockingManager.TRANSPARENT_OUTLINE_MODE.

Specified by:
setShowTitleOnOutline in interface DockingManager

dockFrame

@Deprecated
public void dockFrame(DockableFrame f,
                                 int side,
                                 int index)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Docks the frame at the specified side and index. Index is the index in the split pane.

Specified by:
dockFrame in interface DeprecatedDockingManager

getFirstFrame

@Deprecated
public DockableFrame getFirstFrame()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the first visible dockable frame. We used #getAllVisibleFrameKeys() to figure out which is the first one. It is the first one in the array that is returned from getAllVisibleFrameKeys method.

Specified by:
getFirstFrame in interface DeprecatedDockingManager
Returns:
the first visible dockable frame.

getLastFrame

@Deprecated
public DockableFrame getLastFrame()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the last visible dockable frame. We used #getAllVisibleFrameKeys() to figure out which is the last one. It is the last one in the array that is returned from getAllVisibleFrameKeys method.

Specified by:
getLastFrame in interface DeprecatedDockingManager
Returns:
the last visible dockable frame.

getNextFrame

@Deprecated
public DockableFrame getNextFrame(DockableFrame f)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the next visible dockable frame. We used #getAllVisibleFrameKeys() to figure out which is the next one. It is the next one in the array that is returned from getAllVisibleFrameKeys method. If the frame is the last one, the first frame will be returned. Or if the frame is hidden, this method will return the first frame too. So unless you have no dockable frame at all, this method will never return null.

Specified by:
getNextFrame in interface DeprecatedDockingManager
Parameters:
f - the current frame.
Returns:
the next visible dockable frame.

getPreviousFrame

@Deprecated
public DockableFrame getPreviousFrame(DockableFrame f)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the previous visible dockable frame. We used #getAllVisibleFrameKeys() to figure out which is the previous one. It is the next one in the array that is returned from getAllVisibleFrameKeys method. If the frame is the first one, the last frame will be returned. Or if the frame is hidden, this method will return the last frame too. So unless you have no dockable frame at all, this method will never return null.

Specified by:
getPreviousFrame in interface DeprecatedDockingManager
Parameters:
f - the current frame.
Returns:
the previous visible dockable frame.

toggleMaximizeState

@Deprecated
public void toggleMaximizeState(DockableFrame f)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Toggle between maximized and restored state.

Specified by:
toggleMaximizeState in interface DeprecatedDockingManager

setAutohideShowingFrame

@Deprecated
public void setAutohideShowingFrame(DockableFrame f)
Deprecated. 

Specified by:
setAutohideShowingFrame in interface DeprecatedDockingManager

hideActiveAutohideFrame

@Deprecated
public void hideActiveAutohideFrame()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Hide active autohide frame immediately.

Specified by:
hideActiveAutohideFrame in interface DeprecatedDockingManager

startShowingAutohideFrame

@Deprecated
public void startShowingAutohideFrame(DockableFrame f,
                                                 int side,
                                                 int delay,
                                                 boolean forceFocus)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Starts to show the autohide frame.

Specified by:
startShowingAutohideFrame in interface DeprecatedDockingManager
forceFocus - if delay == 0

startShowingAutohideFrame

@Deprecated
public void startShowingAutohideFrame(DockableFrame f,
                                                 int side,
                                                 int delay)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Starts to show the autohide frame.

Specified by:
startShowingAutohideFrame in interface DeprecatedDockingManager

getMainFrame

@Deprecated
public JFrame getMainFrame()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the main JFrame.

Specified by:
getMainFrame in interface DeprecatedDockingManager
Returns:
main JFrame

getAutoHideContaner

@Deprecated
public AutoHideContainer getAutoHideContaner(int side)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the autohide container by side. Valid side is defined in DockContext such as DockContext.DOCK_SIDE_NORTH, DockContext.DOCK_SIDE_SOUTH, DockContext.DOCK_SIDE_EAST and DockContext.DOCK_SIDE_WEST.

Specified by:
getAutoHideContaner in interface DeprecatedDockingManager
Returns:
autohide container

floatFrame

@Deprecated
public void floatFrame(DockableFrame f,
                                  Rectangle bounds,
                                  boolean isSingle)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Sets the frame to floating state

Specified by:
floatFrame in interface DeprecatedDockingManager

autohideFrame

@Deprecated
public void autohideFrame(DockableFrame f,
                                     int side,
                                     int index)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Autohides a frame at the specified side and index. Index is the index of group.

Specified by:
autohideFrame in interface DeprecatedDockingManager

getActiveFrame

@Deprecated
public DockableFrame getActiveFrame()
Deprecated. 

Specified by:
getActiveFrame in interface DeprecatedDockingManager
Returns:
currently selected frame

getMaximizedFrame

@Deprecated
public DockableFrame getMaximizedFrame()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the maximized frame if any.

Specified by:
getMaximizedFrame in interface DeprecatedDockingManager
Returns:
the maximized frame. If no frame is maximized, return null.

toggleAutohideState

@Deprecated
public void toggleAutohideState(DockableFrame frame)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Toggle the frame between auto-hide mode and docked mode.

Specified by:
toggleAutohideState in interface DeprecatedDockingManager
Parameters:
frame - the frame to be toggled.

toggleDockable

@Deprecated
public void toggleDockable(DockableFrame frame)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Toggle dockable attribute sof the frame with the specified key.

Specified by:
toggleDockable in interface DeprecatedDockingManager

toggleState

@Deprecated
public void toggleState(DockableFrame frame,
                                   boolean single)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Toggle the frame's state. If it's docked, change to floating mode; if floating, change to docked mode.

Specified by:
toggleState in interface DeprecatedDockingManager
Parameters:
frame - the frame to change mode
single - change mode for all frames in the same tabbed pane or just the frame itself.

doLayout

@Deprecated
public void doLayout()
Deprecated. 

Specified by:
doLayout in interface DeprecatedDockingManager

handleEscapeKey

@Deprecated
public void handleEscapeKey(AWTEvent event)
Deprecated. 

Specified by:
handleEscapeKey in interface DeprecatedDockingManager

floatingFrameDeactivated

@Deprecated
public void floatingFrameDeactivated(WindowEvent windowEvent)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Notification from one of our floatingFrame windows that it has been deactivated

Specified by:
floatingFrameDeactivated in interface DeprecatedDockingManager

floatingFrameActivated

@Deprecated
public void floatingFrameActivated(WindowEvent windowEvent)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Notification from one of our floatingFrame windows that it has been activated.

Specified by:
floatingFrameActivated in interface DeprecatedDockingManager

createAutoHideMouseListener

@Deprecated
public MouseListener createAutoHideMouseListener(DockableFrame frame,
                                                            int side)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Creates the AutoHideMouseListener that is used on AutoHideContainer.

Specified by:
createAutoHideMouseListener in interface DeprecatedDockingManager
Parameters:
frame - the dockable frame.
side - the side.
Returns:
the MouseListener

isFocusDuringLoadLayout

@Deprecated
public boolean isFocusDuringLoadLayout()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Accessor for the flag indicating whether focus should be requested for DockableFrames during load layout. (also implies activation, which happens when a subcomponent receives focus)

Specified by:
isFocusDuringLoadLayout in interface DeprecatedDockingManager
Returns:
if focus request is enabled during load layout

setFocusDuringLayout

@Deprecated
public void setFocusDuringLayout(boolean doFocus)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Accessor to set the flag indicating whether focus should be requested for DockableFrames during load layout. (also implies activation, which happens when a subcomponent receives focus)

Specified by:
setFocusDuringLayout in interface DeprecatedDockingManager
Parameters:
doFocus - should focus requests be enabled during load layout

isAllowRequestFocus

@Deprecated
public boolean isAllowRequestFocus()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Because requesting focus may be restricted by the DockingManager during load layout, this method allows a DockableFrame to ask if it is allowed to request focus.

Specified by:
isAllowRequestFocus in interface DeprecatedDockingManager
Returns:
Does the DockingManager allow a focus request at this time?

getDefaultFocusComponent

@Deprecated
public Component getDefaultFocusComponent()
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Gets the default focus component. When application started, this component will get focus. Also when ESC key is pressed in dockable frame, this component will get focus as well.

Specified by:
getDefaultFocusComponent in interface DeprecatedDockingManager
Returns:
the default component.

setDefaultFocusComponent

@Deprecated
public void setDefaultFocusComponent(Component defaultFocusComponent)
Deprecated. 

Description copied from interface: DeprecatedDockingManager
Sets the default focus component.

Specified by:
setDefaultFocusComponent in interface DeprecatedDockingManager

checkFrameKey

protected void checkFrameKey(String key,
                             String methodName)

isActive

public boolean isActive()
Description copied from interface: DockingManager
Checks if the DockingManager is considered as active docking manager. This is only needed when you have several docking managers in one application. Although each docking manager can have its own active frame, only one frame will be painted as active. That's the one in the active docking manager. Activate one docking manager will deactivate all other docking managers in the same group.

Here is how you add multiple docking managers to a DockingManagerGroup.

 DockingManagerGroup group = new DockingManagerGroup();
 group.add(dockingManager1);
 group.add(dockingManager2);
 ... // you can add more docking managers if you want
 

Specified by:
isActive in interface DockingManager
Returns:
true or false.
See Also:
DockingManagerGroup

setActive

public void setActive(boolean active)
Description copied from interface: DockingManager
Makes the docking manager active. Activate this docking manager will deactivate all other docking managers in the same group. By default, if a component in a dockable frame receives focus, the docking manager will be activated automatically.

Specified by:
setActive in interface DockingManager
Parameters:
active - true or false.

getGroup

public DockingManagerGroup getGroup()
Description copied from interface: DockingManager
Gets the DockingManagerGroup. If the docking manager is added to DockingManagerGroup, this method will return the group.

Specified by:
getGroup in interface DockingManager
Returns:
the DockingManagerGroup.

setGroup

public void setGroup(DockingManagerGroup group)
Description copied from interface: DockingManager
Sets the DockingManagerGroup.

Specified by:
setGroup in interface DockingManager
Parameters:
group - the new DockingManagerGroup.

getFloatingContainerType

public int getFloatingContainerType()
Description copied from interface: DockingManager
Gets the floating container type. It could be DockingManager.FLOATING_CONTAINER_TYPE_DIALOG, DockingManager.FLOATING_CONTAINER_TYPE_FRAME or DockingManager.FLOATING_CONTAINER_TYPE_WINDOW.

Specified by:
getFloatingContainerType in interface DockingManager
Returns:
the floating container type.

setFloatingContainerType

public void setFloatingContainerType(int floatingContainerType)
Description copied from interface: DockingManager
Sets the floating container type. It could be DockingManager.FLOATING_CONTAINER_TYPE_DIALOG, DockingManager.FLOATING_CONTAINER_TYPE_FRAME or DockingManager.FLOATING_CONTAINER_TYPE_WINDOW.

Specified by:
setFloatingContainerType in interface DockingManager
Parameters:
floatingContainerType - the floating container type.

getFloatingContainerCustomizer

public DockingManager.FloatingContainerCustomizer getFloatingContainerCustomizer()
Description copied from interface: DockingManager
Gets the FloatingContainerCustomizer. This customizer will be used to customize the floating container when it is created.

Specified by:
getFloatingContainerCustomizer in interface DockingManager
Returns:
the FloatingContainerCustomizer.

setFloatingContainerCustomizer

public void setFloatingContainerCustomizer(DockingManager.FloatingContainerCustomizer customizer)
Description copied from interface: DockingManager
Sets the FloatingContainerCustomizer. This customizer will be used to customize the floating container when it is created.

Specified by:
setFloatingContainerCustomizer in interface DockingManager
Parameters:
customizer - the FloatingContainerCustomizer.

getFloatingFrames

public List<FloatingContainer> getFloatingFrames()
Get all floating frames in current layout.

Specified by:
getFloatingFrames in interface DockingManager
Returns:
all floating frames in an array list.

setActiveMouseInputListener

public void setActiveMouseInputListener(MouseInputListener listener)
Description copied from interface: DockingManager
This method should only be used by JIDE. We introduced these two methods to workaround a bug in JDK7 where the mouseReleased event was not delivered to the right component.

Specified by:
setActiveMouseInputListener in interface DockingManager

getActiveMouseInputListener

public MouseInputListener getActiveMouseInputListener()
Description copied from interface: DockingManager
This method should only be used by JIDE. We introduced these two methods to workaround a bug in JDK7 where the mouseReleased event was not delivered to the right component.

Specified by:
getActiveMouseInputListener in interface DockingManager

JIDE 3.5.15