public class DockingSplitPane extends javax.swing.JSplitPane implements DockingConstants
javax.swing.JSplitPane.AccessibleJSplitPane
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected boolean |
controllerInTopLeft |
protected boolean |
dividerLocDetermined |
protected DockingPort |
dockingPort |
protected double |
initialDividerRatio |
protected double |
percent |
protected java.lang.String |
region |
BOTTOM, CONTINUOUS_LAYOUT_PROPERTY, continuousLayout, DIVIDER, DIVIDER_LOCATION_PROPERTY, DIVIDER_SIZE_PROPERTY, dividerSize, HORIZONTAL_SPLIT, LAST_DIVIDER_LOCATION_PROPERTY, lastDividerLocation, LEFT, leftComponent, ONE_TOUCH_EXPANDABLE_PROPERTY, oneTouchExpandable, orientation, ORIENTATION_PROPERTY, RESIZE_WEIGHT_PROPERTY, RIGHT, rightComponent, TOP, VERTICAL_SPLIT
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ACTIVE_WINDOW, BOTTOM, CENTER, CENTER_REGION, CLOSE_ACTION, DEFAULT_PERSISTENCE_KEY, DOCKING_ID, EAST_REGION, HEAVYWEIGHT_DOCKABLES, HORIZONTAL, LEFT, MOUSE_PRESSED, NORTH_REGION, PERMANENT_FOCUS_OWNER, PIN_ACTION, REGION, RIGHT, SOUTH_REGION, TOP, UNINITIALIZED, UNINITIALIZED_RATIO, UNKNOWN_REGION, UNSPECIFIED_SIBLING_PREF, VERTICAL, WEST_REGION
Constructor and Description |
---|
DockingSplitPane(DockingPort port,
java.lang.String region)
Creates a new
DockingSplitPane for the specified
DockingPort with the understanding that the resulting
DockingSplitPane will be used for docking a Dockable into
the DockingPort's specified region . |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Releases any internal references to external objects to aid garbage
collection.
|
void |
doLayout()
Overridden to ensure proper divider location on initial rendering.
|
protected void |
finalize() |
java.awt.Component |
getElderComponent()
Returns the 'oldest'
Component to have been added to this
DockingSplitPane as a result of a docking operation. |
double |
getPercent() |
java.lang.String |
getRegion()
Returns the docking region for which this
DockingSplitPane was
created. |
protected boolean |
isDividerSizeProperlyDetermined() |
boolean |
isElderTopLeft()
Indicates whether the 'oldest'
Component to have been added to
this DockingSplitPane as a result of a docking operation is in
the TOP or LEFT side of the split pane. |
void |
resetToPreferredSizes() |
void |
setBounds(int x,
int y,
int w,
int h) |
void |
setConstantPercent(boolean cstPercent) |
void |
setDividerLocation(double percent) |
void |
setInitialDividerRatio(double ratio)
Sets the initial divider ration for creating split panes.
|
addImpl, getAccessibleContext, getBottomComponent, getDividerLocation, getDividerSize, getLastDividerLocation, getLeftComponent, getMaximumDividerLocation, getMinimumDividerLocation, getOrientation, getResizeWeight, getRightComponent, getTopComponent, getUI, getUIClassID, isContinuousLayout, isOneTouchExpandable, isValidateRoot, paintChildren, paramString, remove, remove, removeAll, setBottomComponent, setContinuousLayout, setDividerLocation, setDividerSize, setLastDividerLocation, setLeftComponent, setOneTouchExpandable, setOrientation, setResizeWeight, setRightComponent, setTopComponent, setUI, updateUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, 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
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected DockingPort dockingPort
protected java.lang.String region
protected boolean dividerLocDetermined
protected boolean controllerInTopLeft
protected double initialDividerRatio
protected double percent
public DockingSplitPane(DockingPort port, java.lang.String region)
DockingSplitPane
for the specified
DockingPort
with the understanding that the resulting
DockingSplitPane
will be used for docking a Dockable
into
the DockingPort's
specified region
. Neither port
or region
may be null
. region
must be a valid
docking region as defined by isValidDockingRegion(String region)
.port
- the DockingPort
for which this
DockingSplitPane
is to be created.region
- the region within the specified DockingPort
for which
this DockingSplitPane
is to be created.{@code
- IllegalArgumentException}
if either port
is null
or }region} is
null
or invalid.DockingManager.isValidDockingRegion(String)
public void setBounds(int x, int y, int w, int h)
setBounds
in class java.awt.Component
public void setConstantPercent(boolean cstPercent)
public void resetToPreferredSizes()
resetToPreferredSizes
in class javax.swing.JSplitPane
public void setDividerLocation(double percent)
setDividerLocation
in class javax.swing.JSplitPane
public double getPercent()
protected boolean isDividerSizeProperlyDetermined()
public java.awt.Component getElderComponent()
Component
to have been added to this
DockingSplitPane
as a result of a docking operation. A
DockingSplitPane
is created based upon the need to share space
within a DockingPort
between two Dockables
. This happens
when a new Dockable
is introduced into an outer region of a
DockingPort
that already contains a Dockable
. The
Dockable
that was in the DockingPort
prior to splitting
the layout is the 'elder' Component
and, in many circumstances,
may be used to control initial divider location and resize weight.
If this split pane contains DockingPorts
as its child components,
then this method will return the Component
determined by calling
getDockedComponent()
for the DockingPort
in this split
pane's elder region.
The elder region of this DockingSplitPane
is determined using the
value returned from getRegion()
, where getRegion()
indicates the docking region of the 'new' Dockable
for this
DockingSplitPane
.
Component
to have been added to this
DockingSplitPane
as a result of a docking operation.getRegion()
,
DockingPort.getDockedComponent()
public java.lang.String getRegion()
DockingSplitPane
was
created. A DockingSplitPane
is created based upon the need to
share space within a DockingPort
between two Dockables
.
This happens when a new Dockable
is introduced into an outer
region of a DockingPort
that already contains a Dockable
.
This method returns that outer region for which this
DockingSplitPane
was created and may be used to control the
orientation of the split pane. The region returned by this method will be
the same passed into the DockingSplitPane
constructor on
instantiation.DockingSplitPane
was
created.DockingSplitPane(DockingPort, String)
public boolean isElderTopLeft()
Component
to have been added to
this DockingSplitPane
as a result of a docking operation is in
the TOP or LEFT side of the split pane. A DockingSplitPane
is
created based upon the need to share space within a DockingPort
between two Dockables
. This happens when a new Dockable
is introduced into an outer region of a DockingPort
that already
contains a Dockable
. The Dockable
that was in the
DockingPort
prior to splitting the layout is the 'elder'
Component
and is returned by getElderComponent()
. This
method indicates whether or not that Component
is in the TOP or
LEFT side of this DockingSplitPane
.
The elder region of this DockingSplitPane
is determined using the
value returned from getRegion()
, where getRegion()
indicates the docking region of the 'new' Dockable
for this
DockingSplitPane
.
true
if the 'oldest' Component
to have been added
to this DockingSplitPane
is in the TOP or LEFT side of
the split pane; false
otherwise.getElderComponent()
,
getRegion()
public void doLayout()
JSplitPane
layout behavior is deferred until after the initial
dimensions of this split pane have been properly determined.doLayout
in class java.awt.Container
Container.doLayout()
,
JSplitPane.setDividerLocation(double)
public void cleanup()
public
and may be invoked manually for
proactive memory management. Otherwise, this method is invoked by this
DockingSplitPane's
finalize()
method.public void setInitialDividerRatio(double ratio)
0.5
.ratio
- a ratio for determining weighting between the two sides of a
split pane.java.lang.IllegalArgumentException
- if ratio
is less than 0.0 or greater than 1.0.protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable