Package org.flexdock.docking.defaults
Class StandardBorderManager
java.lang.Object
org.flexdock.docking.defaults.StandardBorderManager
- All Implemented Interfaces:
BorderManager
This class provides a standard implementation of the
BorderManager
interface. It is designed to avoid the negative visual effects caused by
nesting docked components that have individual borders. It accomplishes this
by establishing and maintaining a single border for all docked components
This class encapsulates a javax.swing.border.Border instance, or a
null border reference, for application to a
DefaultDockingPort and its child components. If the
DefaultDockingPort has no child component, then
managePortNullChild() will apply the encapsulated border to the
DefaultDockingPort itself, rendering the visible outline of an empty
DockingPort. If the DefaultDockingPort has a generic
Component as its child, excluding a JTabbedPane or
JSplitPane, then the border for that component is set to
null and the encapsulated border is applied to the
DockingPort via managePortSimpleChild(). If the
DefaultDockingPort has a JTabbedPane as its child, then a
null border is set for the JTabbedPane and all of its child
components, and the encapsulated border is applied to the DockingPort.
This is accomplished by calling managePortTabbedChild(). Finally,
managePortSplitChild() will manage the border for a
DefaultDockingPort whose docked component is a JSplitPane.
This method removes all borders from the DefaultDockingPort and the
split pane divider and applies the encapsulated border to both left and right
child components of the JSplitPane.- Author:
- Christopher Butler
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newStandardBorderManagerwith anullassigned border.StandardBorderManager(Border border) Creates a newStandardBorderManagerwith the specified assigned border. -
Method Summary
Modifier and TypeMethodDescriptionReturns the currently assigned border.voidSet the border on the suppliedDockingPortto the currently assigned border.voidRemoves any border from theDockingPort'sdocked component and set the border on theDockingPortitself to the currently assigned border.voidRemoves any border from theDockingPortitself and places the currently assigned border on the two child components of theDockingPort's</code JSplitPanechild.voidRemoves any border from theDockingPort'sdockedJTabbedPanecomponent and sets the border on theDockingPortitself to the currently assigned border.voidSets the assigned border.
-
Constructor Details
-
StandardBorderManager
public StandardBorderManager()Creates a newStandardBorderManagerwith anullassigned border. -
StandardBorderManager
Creates a newStandardBorderManagerwith the specified assigned border.- Parameters:
border- the currently assigned border.
-
-
Method Details
-
getBorder
Returns the currently assigned border.- Returns:
- the currently assigned border.
-
setBorder
Sets the assigned border. Null values are acceptable.- Parameters:
border- the assigned border.
-
managePortNullChild
Set the border on the suppliedDockingPortto the currently assigned border.- Specified by:
managePortNullChildin interfaceBorderManager- Parameters:
port- theDockingPortwhose layout borders are to be managed- See Also:
-
managePortSimpleChild
Removes any border from theDockingPort'sdocked component and set the border on theDockingPortitself to the currently assigned border.- Specified by:
managePortSimpleChildin interfaceBorderManager- Parameters:
port- theDockingPortwhose layout borders are to be managed- See Also:
-
managePortSplitChild
Removes any border from theDockingPortitself and places the currently assigned border on the two child components of theDockingPort's</code JSplitPanechild.- Specified by:
managePortSplitChildin interfaceBorderManager- Parameters:
port- theDockingPortwhose layout borders are to be managed- See Also:
-
managePortTabbedChild
Removes any border from theDockingPort'sdockedJTabbedPanecomponent and sets the border on theDockingPortitself to the currently assigned border.- Specified by:
managePortTabbedChildin interfaceBorderManager- Parameters:
port- theDockingPortwhose layout borders are to be managed- See Also:
-