|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.javadocking.dock.BorderDock
public class BorderDock
This is a composite dock that can have one child dock in the center and between zero and 4 child docks at the borders. At every border there is zero or one child dock. This dock can not contain dockables. When dockables are added, child docks are created and the dockables are added to the child docks.
Information on using border docks is in How to Use Composite Docks in The Sanaware Developer Guide.
The positions for child docks of this dock are one-dimensional. The possible child docks and their first position value are:
Position.CENTER
.Position.TOP
.Position.BOTTOM
.Position.RIGHT
.Position.LEFT
.A dockable can only be added if it has as one of its docking modes:
topDockingMode
bottomDockingMode
leftDockingMode
rightDockingMode
When a dockable is added, a child dock is created with the 'childDockFactory'. The dockable is added to the child dock.
In the center there can be a dock or there can be a java.awt.Component.
The dock in the center will never be removed, even if it is empty. This kind of dock is never empty, because it contains a component in the center or a child dock in the center. When it contains 5 child docks it is full. When it contains 4 child docks at the borders and a component in the center it is also full.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
MODE_GENERAL
When the border dock is set to this mode, the docking mode for dockables in child docks should have one of the folowing values: for Position.TOP : DockingMode.TOP ,
for Position.BOTTOM : DockingMode.BOTTOM ,
for Position.LEFT : DockingMode.LEFT , and
for Position.RIGHT : DockingMode.RIGHT . |
static int |
MODE_MINIMIZE_BAR
When the border dock is set to this mode, the docking mode for dockables in child docks should have one of the folowing values: for Position.TOP : DockingMode.HORIZONTAL_MINIMIZE ,
for Position.BOTTOM : DockingMode.HORIZONTAL_MINIMIZE ,
for Position.LEFT : DockingMode.VERTICAL_MINIMIZE , and
for Position.RIGHT : DockingMode.VERTICAL_MINIMIZE . |
static int |
MODE_TOOL_BAR
When the border dock is set to this mode, the docking mode for dockables in child docks should have one of the folowing values: for Position.TOP : DockingMode.HORIZONTAL_TOOLBAR ,
for Position.BOTTOM : DockingMode.HORIZONTAL_TOOLBAR ,
for Position.LEFT : DockingMode.VERTICAL_TOOLBAR , and
for Position.RIGHT : DockingMode.VERTICAL_TOOLBAR . |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface com.javadocking.dock.CompositeDock |
---|
CHILD_DOCK_PREFIX |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
BorderDock()
Constructs an abstract border dock with a LeafDockFactory
as factory for the child docks. |
|
BorderDock(Dock centerChildDock)
Constructs a border dock with a given child dock for in the center and a LeafDockFactory as factory for the child docks. |
|
BorderDock(DockFactory childDockFactory)
Constructs a border dock with the given factory for creating the child docks at the borders. |
|
BorderDock(DockFactory childDockFactory,
Dock centerChildDock)
Constructs a border dock with the given factory for creating the child docks at the borders and a given child dock for in the center. |
Method Summary | |
---|---|
void |
addChildDock(Dock dock,
Position position)
Sets the given dock as child dock of this dock in the given position. |
boolean |
addDockable(Dockable dockableToAdd,
java.awt.Point relativeLocation,
java.awt.Point dockableOffset)
Adds a dockable to this dock. |
void |
addDockingListener(DockingListener listener)
Adds a listener for DockingEvent s of this dock. |
void |
clearGhosts()
Clears the ghost child docks from this dock. |
void |
emptyChild(Dock emptyChildDock)
Is called when the specified child dock is empty. |
int |
getBottomDockingMode()
Gets the docking mode for a dockable that is docked at the bottom child dock. |
java.awt.Component |
getCenterComponent()
Gets the component in the center of the dock. |
Dock |
getChildDock(int index)
Gets the child dock with the specified index. |
int |
getChildDockCount()
Gets the number of child docks of this dock. |
DockFactory |
getChildDockFactory()
Gets the factory that creates the child docks for this composite dock. |
Dock |
getChildDockOfPosition(int position)
Gets the child dock in the given position. |
Position |
getChildDockPosition(Dock childDock)
Gets the position, where the child dock is docked in this dock. |
protected int |
getChildDockWidth(int preferredWidth,
int totalWidth,
int position)
Computes the width for a component that will be added. |
int |
getDockingMode(int dockPosition)
Calculates the docking mode that corresponds with a given dock position in this dock. |
protected void |
getDockingRectangle(java.awt.Rectangle rectangle,
int position)
Computes the relative rectangle in this dock in which we can dock for a given position. |
protected int |
getDockPosition(java.awt.Point relativePosition)
Gets the position where the dockable should be docked in the dock given the mouse position. |
int |
getDockPriority(Dockable dockable,
java.awt.Point relativeLocation)
Determines if the dockable can be added. |
int |
getLeftDockingMode()
Gets the docking mode for a dockable that is docked at the left child dock. |
CompositeDock |
getParentDock()
Gets the parent dock of this dock. |
protected void |
getPriorityRectangle(java.awt.Rectangle rectangle,
int position)
Gets the relative rectangle in this dock in which docking has priority. |
int |
getRightDockingMode()
Gets the docking mode for a dockable that is docked at the right child dock. |
int |
getTopDockingMode()
Gets the docking mode for a dockable that is docked at the top child dock. |
void |
ghostChild(Dock childDock)
Makes the given empty child dock invisible. |
boolean |
isEmpty()
This dock can never be empty. |
protected boolean |
isFree(int position)
Verifies if there is not already a child dock at the given position. |
boolean |
isFull()
Determines if any more dockables can be added to this dock. |
void |
loadProperties(java.lang.String prefix,
java.util.Properties properties,
java.util.Map childDocks,
java.util.Map dockablesMap,
java.awt.Window owner)
Loads the properties for this dock. |
void |
removeCenterComponent()
Removes the component in the center of this dock. |
void |
removeDockingListener(DockingListener listener)
Removes a listener for docking events of this dock. |
int |
retrieveDockingRectangle(Dockable dockable,
java.awt.Point relativeLocation,
java.awt.Point dockableOffset,
java.awt.Rectangle rectangle)
Sets the given rectangle to the position and size of the graphical content component of the dockable, when it will be docked in this dock. |
void |
saveProperties(java.lang.String prefix,
java.util.Properties properties,
java.util.Map childDockIds)
Saves the properties of this dock in the given properties object. |
void |
setBottomDockingMode(int bottomDockingMode)
Sets the docking mode for a dockable that is docked at the bottom child dock. |
void |
setCenterComponent(java.awt.Component centerComponent)
Sets the component in the center of the dock. |
void |
setChildDockFactory(DockFactory childDockFactory)
Sets the factory that creates the child docks for this composite dock. |
void |
setDock(Dock dock,
int position)
Sets the given dock as child dock of this dock in the given position. |
void |
setLeftDockingMode(int leftDockingMode)
Sets the docking mode for a dockable that is docked at the left child dock. |
void |
setMode(int mode)
Defines the docking modes for the dockables that will be added to this dock. |
void |
setParentDock(CompositeDock parentDock)
Sets the specified dock as new parent dock of this dock. |
void |
setRightDockingMode(int rightDockingMode)
Sets the docking mode for a dockable that is docked at the right child dock. |
void |
setTopDockingMode(int topDockingMode)
Sets the docking mode for a dockable that is docked at the top child dock. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MODE_GENERAL
Position.TOP
: DockingMode.TOP
,Position.BOTTOM
: DockingMode.BOTTOM
,Position.LEFT
: DockingMode.LEFT
, andPosition.RIGHT
: DockingMode.RIGHT
.
public static final int MODE_TOOL_BAR
Position.TOP
: DockingMode.HORIZONTAL_TOOLBAR
,Position.BOTTOM
: DockingMode.HORIZONTAL_TOOLBAR
,Position.LEFT
: DockingMode.VERTICAL_TOOLBAR
, andPosition.RIGHT
: DockingMode.VERTICAL_TOOLBAR
.
public static final int MODE_MINIMIZE_BAR
Position.TOP
: DockingMode.HORIZONTAL_MINIMIZE
,Position.BOTTOM
: DockingMode.HORIZONTAL_MINIMIZE
,Position.LEFT
: DockingMode.VERTICAL_MINIMIZE
, andPosition.RIGHT
: DockingMode.VERTICAL_MINIMIZE
.
Constructor Detail |
---|
public BorderDock()
LeafDockFactory
as factory for the child docks.
public BorderDock(Dock centerChildDock)
LeafDockFactory
as factory for the child docks.
centerChildDock
- The child dock that will be put in the center.public BorderDock(DockFactory childDockFactory)
childDockFactory
- The factory for creating the child docks at the borders.public BorderDock(DockFactory childDockFactory, Dock centerChildDock)
childDockFactory
- The factory for creating the child docks at the borders.centerChildDock
- The child dock that will be put in the center.Method Detail |
---|
public int getDockPriority(Dockable dockable, java.awt.Point relativeLocation)
Determines if the dockable can be added.
A dockable can only be added if it has as one of its docking modes:
It can only be added in a position that corresponds with one of its docking modes.When there are already 5 child docks, the dockable cannot be added anymore.
We only can dock if the dock factory can create a child dock for the given dockable.
getDockPriority
in interface Dock
dockable
- The dockable that will be added.relativeLocation
- The location where the dockable will be added.
public int retrieveDockingRectangle(Dockable dockable, java.awt.Point relativeLocation, java.awt.Point dockableOffset, java.awt.Rectangle rectangle)
Dock
Sets the given rectangle to the position and size of the graphical content component of the dockable, when it will be docked in this dock.
Determines if the dockable can be added to this dock. If the dockable cannot be added,
it returns Priority.CANNOT_DOCK
and the given rectangle is not changed.
retrieveDockingRectangle
in interface Dock
dockable
- The dockable that will be added.relativeLocation
- The location where the dockable will be added.dockableOffset
- The mouse location where the dragging started, relatively to the previous dock of the dockable.rectangle
- This rectangle will be set to the location and size of the graphical component of the dockable
when it will be docked in this dock. The rectangle is relative to this dock.
Priority.CANNOT_DOCK
is returned, otherwise a positive integer.public boolean addDockable(Dockable dockableToAdd, java.awt.Point relativeLocation, java.awt.Point dockableOffset)
Dock
Adds a dockable to this dock.
First it determines if the dockable can be added with Dock.getDockPriority(Dockable, Point)
.
If this method returns CANNOT_DOCK, the dockable is not added.
addDockable
in interface Dock
dockableToAdd
- The dockable that will be added.relativeLocation
- The location where the dockable will be added.dockableOffset
- The mouse location where the dragging started, relatively to the previous dock of the dockable.
public boolean isEmpty()
isEmpty
in interface Dock
public boolean isFull()
Dock
isFull
in interface Dock
public CompositeDock getParentDock()
Dock
getParentDock
in interface Dock
public void setParentDock(CompositeDock parentDock)
Dock
setParentDock
in interface Dock
parentDock
- The parent dock of this dock.public void saveProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map childDockIds)
Dock
Saves the properties of this dock in the given properties object.
The property names for this dock should start with the given prefix.
saveProperties
in interface Dock
prefix
- The prefix for the property names.properties
- The properties object to which the properties should be added.childDockIds
- A mapping between the child docks that are already saved and the keys that are used for the save.
Dock
).public void loadProperties(java.lang.String prefix, java.util.Properties properties, java.util.Map childDocks, java.util.Map dockablesMap, java.awt.Window owner) throws java.io.IOException
Dock
Loads the properties for this dock. The properties can be found in the given properties object. The property names for this dock start with the given prefix.
The dockables that should be docked in this dock are added to this dock. They can be found in the given dockables mapping. The docks that should be docked inside this dock are added to this dock. They can be found in the given childDocks mapping.
This method should be called after the empty constructor to create the content of the dock. Don't call this method for a dock that already has a content.
loadProperties
in interface Dock
prefix
- The prefix of the names of the properties that have been intended for this dock.properties
- The properties object that contains the properties for this dock. It can contain also
properties for other objects, but they will have another prefix.childDocks
- A mapping between the dock keys of the child docks that are already loaded and the docks.
Dock
).dockablesMap
- A mapping that contains the available dockables.
Dockable
).owner
- The owner window of the dock in the dock model (DockModel
).
java.io.IOException
- If an error occures while decoding the properties.public void addDockingListener(DockingListener listener)
Dock
DockingEvent
s of this dock.
The listener will be informed before and after
adding, moving or removing dockables or child docks from this dock.
addDockingListener
in interface Dock
listener
- A docking listener that will be notified when a dockable or child dock is added, moved, or removed.public void removeDockingListener(DockingListener listener)
Dock
removeDockingListener
in interface Dock
listener
- The docking listener to remove.public void addChildDock(Dock dock, Position position) throws java.lang.IllegalStateException
Sets the given dock as child dock of this dock in the given position.
The valid positions are:
If the position is not valid, the first free position of the dock is taken.
addChildDock
in interface CompositeDock
dock
- The new child dock for this dock.position
- The new child dock position.
java.lang.IllegalStateException
- If this dock is full.public int getChildDockCount()
CompositeDock
getChildDockCount
in interface CompositeDock
public Dock getChildDock(int index) throws java.lang.IndexOutOfBoundsException
CompositeDock
getChildDock
in interface CompositeDock
index
- The index of the child dock.
java.lang.IndexOutOfBoundsException
- If the index is out of range (index < 0 || index >= getChildDockCount()).public Position getChildDockPosition(Dock childDock) throws java.lang.IllegalArgumentException
CompositeDock
getChildDockPosition
in interface CompositeDock
childDock
- The dockable that is docked in this dock.
java.lang.IllegalArgumentException
- If the given dock is not docked in this dock.public void emptyChild(Dock emptyChildDock)
CompositeDock
emptyChild
in interface CompositeDock
emptyChildDock
- The child dock that is empty.public void ghostChild(Dock childDock)
CompositeDock
ghostChild
in interface CompositeDock
childDock
- The child dock that is empty, but not may be removed.public void clearGhosts()
CompositeDock
clearGhosts
in interface CompositeDock
public DockFactory getChildDockFactory()
CompositeDock
getChildDockFactory
in interface CompositeDock
public void setChildDockFactory(DockFactory childDockFactory)
CompositeDock
setChildDockFactory
in interface CompositeDock
childDockFactory
- The factory that creates the child docks for this composite dock.public Dock getChildDockOfPosition(int position)
position
- This is an integer defined by the class Position
.
The possible values are:
protected int getDockPosition(java.awt.Point relativePosition)
Gets the position where the dockable should be docked in the dock given the mouse position.
There are 4 possible return values:
relativePosition
- The mouse location, where the dockable will be added.
protected void getPriorityRectangle(java.awt.Rectangle rectangle, int position)
Gets the relative rectangle in this dock in which docking has priority. The given rectangle gets the size and position of this priority rectangle.
For the positions Position.LEFT
, Position.RIGHT
, Position.TOP
, and Position.BOTTOM
the rectangle is at the correspondent border of this dock.
rectangle
- Gets the size and position of the calculated priority rectangle.position
- The position of the priority rectangle. There are 4 possibilities:
protected void getDockingRectangle(java.awt.Rectangle rectangle, int position)
Computes the relative rectangle in this dock in which we can dock for a given position. The given rectangle gets the size and position of this priority rectangle.
For the positions Position.LEFT
, Position.RIGHT
, Position.TOP
, and Position.BOTTOM
the rectangle is at the correspondent border of this dock.
rectangle
- Gets the size and position of the calculated priority rectangle.position
- The position of the rectangle. There are 4 possibilities:
protected boolean isFree(int position)
position
- The position for a new child dock.
java.lang.IllegalArgumentException
- If the given position is not Position.CENTER,
Position.LEFT, Position.RIGHT, Position.TOP or Position.BOTTOM.public java.awt.Component getCenterComponent()
public void setCenterComponent(java.awt.Component centerComponent)
centerComponent
- The component in the center of the dock.
java.lang.IllegalStateException
- When there is already a dock in the center.
java.lang.IllegalStateException
- When there is already a component in the center.public void removeCenterComponent()
java.lang.IllegalStateException
- If there is no center component in this dock.public int getBottomDockingMode()
public void setBottomDockingMode(int bottomDockingMode)
bottomDockingMode
- The docking mode for a dockable that is docked at the bottom child dock.public int getLeftDockingMode()
public void setLeftDockingMode(int leftDockingMode)
leftDockingMode
- The docking mode for a dockable that is docked at the left child dock.public int getRightDockingMode()
public void setRightDockingMode(int rightDockingMode)
rightDockingMode
- The docking mode for a dockable that is docked at the right child dock.public int getTopDockingMode()
public void setTopDockingMode(int topDockingMode)
topDockingMode
- The docking mode for a dockable that is docked at the top child dock.public int getDockingMode(int dockPosition)
dockPosition
- The dock position of a dockable in this dock.
This should be:
topDockingMode
,bottomDockingMode
,leftDockingMode
, orrightDockingMode
DockingMode.CENTER
java.lang.IllegalArgumentException
- If the given position is not a valid position for this dock.protected int getChildDockWidth(int preferredWidth, int totalWidth, int position)
preferredWidth
- The preferred width or height of the component that will be added.totalWidth
- The total width or height that is available.position
- The position where the new component will come. This can be Position.LEFT
,Position.RIGHT
,
Position.TOP
, or Position.BOTTOM
.
public void setDock(Dock dock, int position)
dock
- The new child dock for this dock.
java.lang.IllegalStateException
- If there is already a dock at this position.
java.lang.IllegalStateException
- If the position is not valid.public void setMode(int mode)
mode
- Defines the docking modes for the dockables that will be added to this dock.
Possible values are:
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |