Package com.jidesoft.swing
Class JideSplitPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jidesoft.swing.JideSplitPane
- All Implemented Interfaces:
ComponentListener
,ContainerListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
public class JideSplitPane
extends JPanel
implements ContainerListener, ComponentListener, Accessible
JideSplitPane
is used to divide multiple Component
s.
These Component
s in a split pane can be aligned left to right using
JideSplitPane.HORIZONTAL_SPLIT
, or top to bottom using JideSplitPane.VERTICAL_SPLIT
.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
This class implements accessibility support for theJideSplitPane
class.Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Bound property name for continuousLayout.static final String
Bound property name for border size.static final String
Bound property name for gripper.static final int
Horizontal split indicates theComponent
s are split along the x axis.protected static final String
The divider used for non-continuous layout is added to the split pane with this object.static final String
Bound property foroneTouchExpandable
.static final String
Bound property name for orientation (horizontal or vertical).static final String
Bound property name for border size.static final String
static final String
Bound property name for proportional layout.static final String
Bound property name for the proportions used in the layout.static final int
Vertical split indicates theComponent
s are split along the y axis.Fields inherited from class javax.swing.JComponent
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
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newJideSplitPane
configured to arrange the child components side-by-side horizontally.JideSplitPane
(int newOrientation) Creates a newJideSplitPane
configured with the specified orientation. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Add divider if there are two panes side by side without a divider in between.Adds the specified pane to this container at the end.protected void
addProportion
(int paneIndex) Adds a proportion at the given pane index, taking a proportional amount from each of the existing proportions.void
Invoked when a component has been added to the container.void
void
void
Invoked when a component has been removed from the container.void
void
protected JideSplitPaneDivider
void
doLayout()
Causes this container to lay out its components.protected void
dragDividerTo
(JideSplitPaneDivider divider, int location) Drags divider to right location.protected void
finishDraggingTo
(JideSplitPaneDivider divider, int location) Finishes dragging.Gets the AccessibleContext associated with this JideSplitPane.getDividerAt
(int index) Returns the divider at index.int
getDividerLocation
(int dividerIndex) Get the divider location.int[]
Gets the divider locations.int
Returns the size of the divider.int
Get the step size while dragging the divider.Gets the left button's image icon.int
getNextDividerLocation
(JideSplitPaneDivider divider, boolean ignoreVisibility, boolean reversed) Get previous divider's, if any, location from current divider.int
Returns the orientation.getPaneAt
(int index) Returns the component at index.int
Gets the count of panes, regardless of dividers.protected int
getPreviousDividerLocation
(JideSplitPaneDivider divider, boolean ignoreVisibility, boolean reversed) Get previous divider's, if any, location from current divider.double[]
Returns the current array of proportions used for proportional layout, or null if none has been established viasetProportions(double[])
or via user action.Gets the right button's image icon.int
Returns the index of the component.int
indexOfDivider
(JideSplitPaneDivider divider) Returns the index of the divider.int
indexOfPane
(Component pane) Returns the index of the pane.insertPane
(Component pane, int index) Inserts the specified pane to this container at the given position.insertPane
(Component pane, Object constraint, int index) Inserts the specified pane to this container at the given position.boolean
Determines whether the JSplitPane is set to use a continuous layout.boolean
Get the flag indicating if dragging the divider could resize the panes.boolean
boolean
Returns the flag that tells whether to do even proportions for the initial proportional layout, in the absence of explicit proportions.boolean
Returns whether one-touch expand/collapse is on.boolean
Returns the proportional layout flag.boolean
Checks if the gripper is visible.boolean
Returns true, so that calls torevalidate
on any descendant of thisJideSplitPane
will cause a request to be queued that will validate theJideSplitPane
and all its descendants.protected boolean
Remove extra divider.void
removePane
(int index) Removes the pane, specified byindex
, from this container.void
removePane
(Component pane) Removes the pane, specified byindex
, from this container.protected void
removeProportion
(int paneIndex) Removes the proportion at the given pane index, spreading its value proportionally across the other proportions.void
Lays out theJideSplitPane
layout based on the preferred size children components, or based on the proportions if proportional layout is on.void
setContinuousLayout
(boolean continuousLayout) Turn continuous layout on/off.void
setDividerLocation
(int dividerIndex, int location) Set the divider location.void
setDividerLocation
(JideSplitPaneDivider divider, int location) Set the divider location.void
setDividerLocations
(int[] locations) Sets the divider locations.void
setDividerSize
(int newSize) Sets the size of the divider.void
setDividerStepSize
(int dividerStepSize) Set the step size while dragging the divider.protected void
Before this method is call, the panes must be separated by dividers.void
setDragResizable
(boolean dragResizable) Set the flag indicating if dragging the divider could resize the panes.void
setHeavyweightComponentEnabled
(boolean heavyweightComponentEnabled) Enables heavyweight components.void
setInitiallyEven
(boolean initiallyEven) Sets the flag telling whether to do even proportions for the initial proportional layout, in the absence of explicit proportions.void
setLeftOneTouchButtonImageIcon
(ImageIcon leftButtonImageIcon) Sets the left button's image icon.void
setOneTouchExpandable
(boolean oneTouchExpandable) Sets the value of theoneTouchExpandable
property.void
setOrientation
(int orientation) Sets the orientation, or how the splitter is divided.void
Replaces the pane at the position specified by index.void
Replaces the pane at the position specified by index.void
setProportionalLayout
(boolean proportionalLayout) Sets this split pane to lay its constituents out proportionally if the given flag is true, or by preferred sizes otherwise.void
setProportions
(double[] proportions) Sets the proportions to use in laying out this split pane's children.void
setRightOneTouchButtonImageIcon
(ImageIcon rightButtonImageIcon) Sets the right button's image icon.void
setShowGripper
(boolean showGripper) Sets the visibility of gripper.void
setVisible
(boolean aFlag) protected void
startDragging
(JideSplitPaneDivider divider) Prepares dragging if it's not continuous layout.void
updateUI()
Methods inherited from class javax.swing.JPanel
getUI, getUIClassID, paramString, setUI
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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, 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, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, 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, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
NON_CONTINUOUS_DIVIDER
The divider used for non-continuous layout is added to the split pane with this object.- See Also:
-
VERTICAL_SPLIT
public static final int VERTICAL_SPLITVertical split indicates theComponent
s are split along the y axis. For example the two or moreComponent
s will be split one on top of the other.- See Also:
-
HORIZONTAL_SPLIT
public static final int HORIZONTAL_SPLITHorizontal split indicates theComponent
s are split along the x axis. For example the two or moreComponent
s will be split one to the left of the other.- See Also:
-
ORIENTATION_PROPERTY
Bound property name for orientation (horizontal or vertical).- See Also:
-
DIVIDER_SIZE_PROPERTY
Bound property name for border size.- See Also:
-
PROPERTY_DIVIDER_LOCATION
Bound property name for border size.- See Also:
-
CONTINUOUS_LAYOUT_PROPERTY
Bound property name for continuousLayout.- See Also:
-
GRIPPER_PROPERTY
Bound property name for gripper.- See Also:
-
PROPORTIONAL_LAYOUT_PROPERTY
Bound property name for proportional layout.- See Also:
-
PROPORTIONS_PROPERTY
Bound property name for the proportions used in the layout.- See Also:
-
PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED
- See Also:
-
_windowDeactivatedListener
-
ONE_TOUCH_EXPANDABLE_PROPERTY
Bound property foroneTouchExpandable
.- See Also:
-
-
Constructor Details
-
JideSplitPane
public JideSplitPane()Creates a newJideSplitPane
configured to arrange the child components side-by-side horizontally. -
JideSplitPane
public JideSplitPane(int newOrientation) Creates a newJideSplitPane
configured with the specified orientation.- Parameters:
newOrientation
-JideSplitPane.HORIZONTAL_SPLIT
orJideSplitPane.VERTICAL_SPLIT
- Throws:
IllegalArgumentException
- iforientation
is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT.
-
-
Method Details
-
getDividerStepSize
public int getDividerStepSize()Get the step size while dragging the divider. The default value of the step size is 0, which means no constraints on the dragging position- Returns:
- the step size.
-
setDividerStepSize
public void setDividerStepSize(int dividerStepSize) Set the step size while dragging the divider. The step size cannot be negative.- Parameters:
dividerStepSize
- the step size
-
updateUI
public void updateUI() -
setDividerSize
public void setDividerSize(int newSize) Sets the size of the divider.- Parameters:
newSize
- an integer giving the size of the divider in pixels
-
getDividerSize
public int getDividerSize()Returns the size of the divider.- Returns:
- an integer giving the size of the divider in pixels
-
insertPane
Inserts the specified pane to this container at the given position. Note: Divider is not counted.- Parameters:
pane
- the pane to be addedindex
- the position at which to insert the component.- Returns:
- the component
pane
-
insertPane
Inserts the specified pane to this container at the given position. Note: Divider is not counted.- Parameters:
pane
- the pane to be addedconstraint
- an object expressing layout constraints for this componentindex
- the position at which to insert the component.- Returns:
- the component
pane
-
addPane
Adds the specified pane to this container at the end.- Parameters:
pane
- the pane to be added- Returns:
- the pane
pane
-
removePane
Removes the pane, specified byindex
, from this container.- Parameters:
pane
- the pane to be removed.
-
setPaneAt
Replaces the pane at the position specified by index.- Parameters:
pane
- new paneindex
- position
-
setPaneAt
Replaces the pane at the position specified by index.- Parameters:
pane
- new paneconstraint
- an object expressing layout constraints for this componentindex
- position
-
removePane
public void removePane(int index) Removes the pane, specified byindex
, from this container.- Parameters:
index
- the index of the component to be removed.
-
setOrientation
public void setOrientation(int orientation) Sets the orientation, or how the splitter is divided. The options are:- JideSplitPane.VERTICAL_SPLIT (above/below orientation of components)
- JideSplitPane.HORIZONTAL_SPLIT (left/right orientation of components)
- Parameters:
orientation
- an integer specifying the orientation- Throws:
IllegalArgumentException
- if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT.
-
getOrientation
public int getOrientation()Returns the orientation.- Returns:
- an integer giving the orientation
- See Also:
-
resetToPreferredSizes
public void resetToPreferredSizes()Lays out theJideSplitPane
layout based on the preferred size children components, or based on the proportions if proportional layout is on. This will likely result in changing the divider location. -
setProportionalLayout
public void setProportionalLayout(boolean proportionalLayout) Sets this split pane to lay its constituents out proportionally if the given flag is true, or by preferred sizes otherwise.- Parameters:
proportionalLayout
- true or false.
-
isProportionalLayout
public boolean isProportionalLayout()Returns the proportional layout flag.- Returns:
- true or false.
-
setProportions
public void setProportions(double[] proportions) Sets the proportions to use in laying out this split pane's children. Only applicable whenisProportionalLayout()
is true; calling it when false will throw an exception. The given array must either be null, or have one fewer slots than there are contained panes. Each item in the array (if not null) must be a number between 0 and 1, and the sum of all of them must be no more than 1.- Parameters:
proportions
- the proportions of all the panes.
-
getProportions
public double[] getProportions()Returns the current array of proportions used for proportional layout, or null if none has been established viasetProportions(double[])
or via user action.- Returns:
- the proportions.
-
setInitiallyEven
public void setInitiallyEven(boolean initiallyEven) Sets the flag telling whether to do even proportions for the initial proportional layout, in the absence of explicit proportions.- Parameters:
initiallyEven
- true or false.
-
isInitiallyEven
public boolean isInitiallyEven()Returns the flag that tells whether to do even proportions for the initial proportional layout, in the absence of explicit proportions.- Returns:
- true or false.
-
isValidateRoot
public boolean isValidateRoot()Returns true, so that calls torevalidate
on any descendant of thisJideSplitPane
will cause a request to be queued that will validate theJideSplitPane
and all its descendants.- Overrides:
isValidateRoot
in classJComponent
- Returns:
- true
- See Also:
-
startDragging
Prepares dragging if it's not continuous layout. If it's continuous layout, do nothing.- Parameters:
divider
- the divider
-
dragDividerTo
Drags divider to right location. If it's continuous layout, really drag the divider; if not, only drag the shadow.- Parameters:
divider
- the dividerlocation
- new location
-
finishDraggingTo
Finishes dragging. If it's not continuous layout, clear up the shadow component.- Parameters:
divider
- the dividerlocation
- new location
-
indexOfDivider
Returns the index of the divider. For example, the index of the first divider is 0, the index of the second is 1. Notes: Pane is not counted- Parameters:
divider
- divider to get index- Returns:
- index of the divider. -1 if comp doesn't exist in this container
-
indexOfPane
Returns the index of the pane. For example, the index of the first pane is 0, the index of the second is 1. Notes: divider is not counted- Parameters:
pane
- pane to get index- Returns:
- index of the pane. -1 if comp doesn't exist in this container
-
indexOf
Returns the index of the component.- Parameters:
comp
- component to get index- Returns:
- index of the comp. -1 if comp doesn't exist in this container
-
getDividerAt
Returns the divider at index.- Parameters:
index
- index- Returns:
- the divider at the index
-
getPaneAt
Returns the component at index.- Parameters:
index
- index- Returns:
- the component at the index
-
getPaneCount
public int getPaneCount()Gets the count of panes, regardless of dividers.- Returns:
- the count of panes
-
setDividerLocation
Set the divider location.- Parameters:
divider
- the dividerlocation
- new location
-
setDividerLocation
public void setDividerLocation(int dividerIndex, int location) Set the divider location. You can only call this method to set the divider location when the component is rendered on the screen. If the component has never been displayed before, this method call has no effect.- Parameters:
dividerIndex
- the divider index, starting from 0 for the first divider.location
- new location
-
getDividerLocation
public int getDividerLocation(int dividerIndex) Get the divider location. You can only get a valid divider location when the component is displayed on the screen. If the component has never been displayed on screen, -1 will be returned.- Parameters:
dividerIndex
- the divider index- Returns:
- the location of the divider.
-
componentAdded
Invoked when a component has been added to the container. Basically if you add anything which is not divider, a divider will automatically added before or after the component.- Specified by:
componentAdded
in interfaceContainerListener
- Parameters:
e
- ContainerEvent
-
componentRemoved
Invoked when a component has been removed from the container. Basically if you remove anything which is not divider, a divider will automatically deleted before or after the component.- Specified by:
componentRemoved
in interfaceContainerListener
- Parameters:
e
- ContainerEvent
-
componentResized
- Specified by:
componentResized
in interfaceComponentListener
-
componentMoved
- Specified by:
componentMoved
in interfaceComponentListener
-
componentShown
- Specified by:
componentShown
in interfaceComponentListener
-
componentHidden
- Specified by:
componentHidden
in interfaceComponentListener
-
removeExtraDividers
protected boolean removeExtraDividers()Remove extra divider. One is considered as extra dividers where two dividers are adjacent.- Returns:
- true if dividers are removed.
-
removeProportion
protected void removeProportion(int paneIndex) Removes the proportion at the given pane index, spreading its value proportionally across the other proportions. If it's the last proportion being removed, sets the proportions to null.- Parameters:
paneIndex
- the pane index.
-
addExtraDividers
protected void addExtraDividers()Add divider if there are two panes side by side without a divider in between. -
addProportion
protected void addProportion(int paneIndex) Adds a proportion at the given pane index, taking a proportional amount from each of the existing proportions.- Parameters:
paneIndex
- the pane index.
-
setVisible
public void setVisible(boolean aFlag) - Overrides:
setVisible
in classJComponent
-
setDividersVisible
protected void setDividersVisible()Before this method is call, the panes must be separated by dividers. -
createSplitPaneDivider
-
getPreviousDividerLocation
protected int getPreviousDividerLocation(JideSplitPaneDivider divider, boolean ignoreVisibility, boolean reversed) Get previous divider's, if any, location from current divider. If there is no previous divider, return 0.- Parameters:
divider
- the dividerignoreVisibility
- true to not check if the pane is visible.reversed
- from left to right or reversed.- Returns:
- the location of previous divider if any
-
getNextDividerLocation
public int getNextDividerLocation(JideSplitPaneDivider divider, boolean ignoreVisibility, boolean reversed) Get previous divider's, if any, location from current divider. If there is no previous divider, return 0.- Parameters:
divider
- the dividerignoreVisibility
- true to not check if the pane is visible.reversed
- from left to right or reversed.- Returns:
- the location of next divider if any
-
isShowGripper
public boolean isShowGripper()Checks if the gripper is visible.- Returns:
- true if gripper is visible
-
setShowGripper
public void setShowGripper(boolean showGripper) Sets the visibility of gripper.- Parameters:
showGripper
- true to show gripper
-
doLayout
public void doLayout()Causes this container to lay out its components. Most programs should not call this method directly, but should invoke thevalidate
method instead. -
isContinuousLayout
public boolean isContinuousLayout()Determines whether the JSplitPane is set to use a continuous layout.- Returns:
- true or false.
-
setContinuousLayout
public void setContinuousLayout(boolean continuousLayout) Turn continuous layout on/off.- Parameters:
continuousLayout
- true or false.
-
getAccessibleContext
Gets the AccessibleContext associated with this JideSplitPane. For split panes, the AccessibleContext takes the form of an AccessibleJideSplitPane. A new AccessibleJideSplitPane instance is created if necessary.- Specified by:
getAccessibleContext
in interfaceAccessible
- Overrides:
getAccessibleContext
in classJPanel
- Returns:
- an AccessibleJideSplitPane that serves as the AccessibleContext of this JideSplitPane
-
isDragResizable
public boolean isDragResizable()Get the flag indicating if dragging the divider could resize the panes. By default, the value is true for JideSplitPane. You could set it to false if you don't like it.- Returns:
- the flag.
-
setDragResizable
public void setDragResizable(boolean dragResizable) Set the flag indicating if dragging the divider could resize the panes.- Parameters:
dragResizable
- the flag
-
isHeavyweightComponentEnabled
public boolean isHeavyweightComponentEnabled()- Returns:
- true if the heavyweight component is enabled.
-
setHeavyweightComponentEnabled
public void setHeavyweightComponentEnabled(boolean heavyweightComponentEnabled) Enables heavyweight components. The difference is the divider. If true, the divider will be heavyweight divider. Otherwise it will use lightweight divider.- Parameters:
heavyweightComponentEnabled
- true to enable the usage of heavyweight components.
-
setOneTouchExpandable
public void setOneTouchExpandable(boolean oneTouchExpandable) Sets the value of theoneTouchExpandable
property. Iftrue
, theJSplitPane
will display a UI widget on the divider to quickly expand/collapse the divider.false
.- Parameters:
oneTouchExpandable
-true
to specify that the split pane should provide a collapse/expand widget- See Also:
-
isOneTouchExpandable
public boolean isOneTouchExpandable()Returns whether one-touch expand/collapse is on.- Returns:
- the value of the
oneTouchExpandable
property - See Also:
-
setLeftOneTouchButtonImageIcon
Sets the left button's image icon. By default, the button has a width of 5 pixels and a height of 10 pixel in HORIZONTAL_SPLIT mode (and a width of 10 pixels and a height of 5 pixel in VERTICAL_SPLIT mode) -- this should be considered when assigning its imageIcon.- Parameters:
leftButtonImageIcon
- the image to be displayed on the left one-touch button
-
getLeftOneTouchButtonImageIcon
Gets the left button's image icon.- Returns:
- the imageIcon used displayed on the left one-touch button
-
setRightOneTouchButtonImageIcon
Sets the right button's image icon. By default, the button has a width of 5 pixels and a height of 10 pixel in HORIZONTAL_SPLIT mode (and a width of 10 pixels and a height of 5 pixel in VERTICAL_SPLIT mode) -- this should be considered when assigning its imageIcon.- Parameters:
rightButtonImageIcon
- the image to be displayed on the right one-touch button
-
getRightOneTouchButtonImageIcon
Gets the right button's image icon.- Returns:
- the imageIcon used displayed on the left one-touch button
-
setDividerLocations
public void setDividerLocations(int[] locations) Sets the divider locations.- Parameters:
locations
- the new divider locations.
-
getDividerLocations
public int[] getDividerLocations()Gets the divider locations.- Returns:
- the divider locations.
-