JIDE 3.5.15

com.jidesoft.swing
Class JideSplitPane

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.swing.JideSplitPane
All Implemented Interfaces:
ComponentListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
ContainerContainer, DocumentPane, DualList, DualTable, GanttChartPane, ResizableGadgetContainer, TableSplitPane, TextFieldList

public class JideSplitPane
extends JPanel
implements ContainerListener, ComponentListener, Accessible

JideSplitPane is used to divide multiple Components.

These Components in a split pane can be aligned left to right using JideSplitPane.HORIZONTAL_SPLIT, or top to bottom using JideSplitPane.VERTICAL_SPLIT.

See Also:
Serialized Form

Nested Class Summary
protected  class JideSplitPane.AccessibleJideSplitPane
          This class implements accessibility support for the JideSplitPane 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
 WindowAdapter _windowDeactivatedListener
           
static String CONTINUOUS_LAYOUT_PROPERTY
          Bound property name for continuousLayout.
static String DIVIDER_SIZE_PROPERTY
          Bound property name for border size.
static String GRIPPER_PROPERTY
          Bound property name for gripper.
static int HORIZONTAL_SPLIT
          Horizontal split indicates the Components are split along the x axis.
protected static String NON_CONTINUOUS_DIVIDER
          The divider used for non-continuous layout is added to the split pane with this object.
static String ONE_TOUCH_EXPANDABLE_PROPERTY
          Bound property for oneTouchExpandable.
static String ORIENTATION_PROPERTY
          Bound property name for orientation (horizontal or vertical).
static String PROPERTY_DIVIDER_LOCATION
          Bound property name for border size.
static String PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED
           
static String PROPORTIONAL_LAYOUT_PROPERTY
          Bound property name for proportional layout.
static String PROPORTIONS_PROPERTY
          Bound property name for the proportions used in the layout.
static int VERTICAL_SPLIT
          Vertical split indicates the Components are split along the y axis.
 
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 java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
JideSplitPane()
          Creates a new JideSplitPane configured to arrange the child components side-by-side horizontally.
JideSplitPane(int newOrientation)
          Creates a new JideSplitPane configured with the specified orientation.
 
Method Summary
protected  void addExtraDividers()
          Add divider if there are two panes side by side without a divider in between.
 Component addPane(Component pane)
          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 componentAdded(ContainerEvent e)
          Invoked when a component has been added to the container.
 void componentHidden(ComponentEvent e)
           
 void componentMoved(ComponentEvent e)
           
 void componentRemoved(ContainerEvent e)
          Invoked when a component has been removed from the container.
 void componentResized(ComponentEvent e)
           
 void componentShown(ComponentEvent e)
           
protected  JideSplitPaneDivider createSplitPaneDivider()
           
 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.
 AccessibleContext getAccessibleContext()
          Gets the AccessibleContext associated with this JideSplitPane.
 JideSplitPaneDivider getDividerAt(int index)
          Returns the divider at index.
 int getDividerLocation(int dividerIndex)
          Get the divider location.
 int[] getDividerLocations()
          Gets the divider locations.
 int getDividerSize()
          Returns the size of the divider.
 int getDividerStepSize()
          Get the step size while dragging the divider.
 ImageIcon getLeftOneTouchButtonImageIcon()
          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 getOrientation()
          Returns the orientation.
 Component getPaneAt(int index)
          Returns the component at index.
 int getPaneCount()
          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[] getProportions()
          Returns the current array of proportions used for proportional layout, or null if none has been established via setProportions(double[]) or via user action.
 ImageIcon getRightOneTouchButtonImageIcon()
          Gets the right button's image icon.
 int indexOf(Component comp)
          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.
 Component insertPane(Component pane, int index)
          Inserts the specified pane to this container at the given position.
 Component insertPane(Component pane, Object constraint, int index)
          Inserts the specified pane to this container at the given position.
 boolean isContinuousLayout()
          Determines whether the JSplitPane is set to use a continuous layout.
 boolean isDragResizable()
          Get the flag indicating if dragging the divider could resize the panes.
 boolean isHeavyweightComponentEnabled()
           
 boolean isInitiallyEven()
          Returns the flag that tells whether to do even proportions for the initial proportional layout, in the absence of explicit proportions.
 boolean isOneTouchExpandable()
          Returns whether one-touch expand/collapse is on.
 boolean isProportionalLayout()
          Returns the proportional layout flag.
 boolean isShowGripper()
          Checks if the gripper is visible.
 boolean isValidateRoot()
          Returns true, so that calls to revalidate on any descendant of this JideSplitPane will cause a request to be queued that will validate the JideSplitPane and all its descendants.
protected  boolean removeExtraDividers()
          Remove extra divider.
 void removePane(Component pane)
          Removes the pane, specified by index, from this container.
 void removePane(int index)
          Removes the pane, specified by index, 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 resetToPreferredSizes()
          Lays out the JideSplitPane 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 setDividersVisible()
          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 the oneTouchExpandable property.
 void setOrientation(int orientation)
          Sets the orientation, or how the splitter is divided.
 void setPaneAt(Component pane, int index)
          Replaces the pane at the position specified by index.
 void setPaneAt(Component pane, Object constraint, int index)
          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, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, 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

NON_CONTINUOUS_DIVIDER

protected static final String NON_CONTINUOUS_DIVIDER
The divider used for non-continuous layout is added to the split pane with this object.

See Also:
Constant Field Values

VERTICAL_SPLIT

public static final int VERTICAL_SPLIT
Vertical split indicates the Components are split along the y axis. For example the two or more Components will be split one on top of the other.

See Also:
Constant Field Values

HORIZONTAL_SPLIT

public static final int HORIZONTAL_SPLIT
Horizontal split indicates the Components are split along the x axis. For example the two or more Components will be split one to the left of the other.

See Also:
Constant Field Values

ORIENTATION_PROPERTY

public static final String ORIENTATION_PROPERTY
Bound property name for orientation (horizontal or vertical).

See Also:
Constant Field Values

DIVIDER_SIZE_PROPERTY

public static final String DIVIDER_SIZE_PROPERTY
Bound property name for border size.

See Also:
Constant Field Values

PROPERTY_DIVIDER_LOCATION

public static final String PROPERTY_DIVIDER_LOCATION
Bound property name for border size.

See Also:
Constant Field Values

CONTINUOUS_LAYOUT_PROPERTY

public static final String CONTINUOUS_LAYOUT_PROPERTY
Bound property name for continuousLayout.

See Also:
Constant Field Values

GRIPPER_PROPERTY

public static final String GRIPPER_PROPERTY
Bound property name for gripper.

See Also:
Constant Field Values

PROPORTIONAL_LAYOUT_PROPERTY

public static final String PROPORTIONAL_LAYOUT_PROPERTY
Bound property name for proportional layout.

See Also:
Constant Field Values

PROPORTIONS_PROPERTY

public static final String PROPORTIONS_PROPERTY
Bound property name for the proportions used in the layout.

See Also:
Constant Field Values

PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED

public static final String PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED
See Also:
Constant Field Values

_windowDeactivatedListener

public WindowAdapter _windowDeactivatedListener

ONE_TOUCH_EXPANDABLE_PROPERTY

public static final String ONE_TOUCH_EXPANDABLE_PROPERTY
Bound property for oneTouchExpandable.

See Also:
setOneTouchExpandable(boolean), Constant Field Values
Constructor Detail

JideSplitPane

public JideSplitPane()
Creates a new JideSplitPane configured to arrange the child components side-by-side horizontally.


JideSplitPane

public JideSplitPane(int newOrientation)
Creates a new JideSplitPane configured with the specified orientation.

Parameters:
newOrientation - JideSplitPane.HORIZONTAL_SPLIT or JideSplitPane.VERTICAL_SPLIT
Throws:
IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT.
Method Detail

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()
Overrides:
updateUI in class JPanel

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

public Component insertPane(Component pane,
                            int index)
Inserts the specified pane to this container at the given position. Note: Divider is not counted.

Parameters:
pane - the pane to be added
index - the position at which to insert the component.
Returns:
the component pane

insertPane

public Component insertPane(Component pane,
                            Object constraint,
                            int index)
Inserts the specified pane to this container at the given position. Note: Divider is not counted.

Parameters:
pane - the pane to be added
constraint - an object expressing layout constraints for this component
index - the position at which to insert the component.
Returns:
the component pane

addPane

public Component addPane(Component pane)
Adds the specified pane to this container at the end.

Parameters:
pane - the pane to be added
Returns:
the pane pane

removePane

public void removePane(Component pane)
Removes the pane, specified by index, from this container.

Parameters:
pane - the pane to be removed.

setPaneAt

public void setPaneAt(Component pane,
                      int index)
Replaces the pane at the position specified by index.

Parameters:
pane - new pane
index - position

setPaneAt

public void setPaneAt(Component pane,
                      Object constraint,
                      int index)
Replaces the pane at the position specified by index.

Parameters:
pane - new pane
constraint - an object expressing layout constraints for this component
index - position

removePane

public void removePane(int index)
Removes the pane, specified by index, 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:

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:
setOrientation(int)

resetToPreferredSizes

public void resetToPreferredSizes()
Lays out the JideSplitPane 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 when isProportionalLayout() 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 via setProportions(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 to revalidate on any descendant of this JideSplitPane will cause a request to be queued that will validate the JideSplitPane and all its descendants.

Overrides:
isValidateRoot in class JComponent
Returns:
true
See Also:
JComponent.revalidate()

startDragging

protected void startDragging(JideSplitPaneDivider divider)
Prepares dragging if it's not continuous layout. If it's continuous layout, do nothing.

Parameters:
divider - the divider

dragDividerTo

protected void dragDividerTo(JideSplitPaneDivider divider,
                             int location)
Drags divider to right location. If it's continuous layout, really drag the divider; if not, only drag the shadow.

Parameters:
divider - the divider
location - new location

finishDraggingTo

protected void finishDraggingTo(JideSplitPaneDivider divider,
                                int location)
Finishes dragging. If it's not continuous layout, clear up the shadow component.

Parameters:
divider - the divider
location - new location

indexOfDivider

public int indexOfDivider(JideSplitPaneDivider divider)
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

public int indexOfPane(Component pane)
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

public int indexOf(Component comp)
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

public JideSplitPaneDivider getDividerAt(int index)
Returns the divider at index.

Parameters:
index - index
Returns:
the divider at the index

getPaneAt

public Component getPaneAt(int index)
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

public void setDividerLocation(JideSplitPaneDivider divider,
                               int location)
Set the divider location.

Parameters:
divider - the divider
location - 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

public void componentAdded(ContainerEvent e)
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 interface ContainerListener
Parameters:
e - ContainerEvent

componentRemoved

public void componentRemoved(ContainerEvent e)
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 interface ContainerListener
Parameters:
e - ContainerEvent

componentResized

public void componentResized(ComponentEvent e)
Specified by:
componentResized in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Specified by:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Specified by:
componentShown in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Specified by:
componentHidden in interface ComponentListener

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 class JComponent

setDividersVisible

protected void setDividersVisible()
Before this method is call, the panes must be separated by dividers.


createSplitPaneDivider

protected JideSplitPaneDivider 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 divider
ignoreVisibility - 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 divider
ignoreVisibility - 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 the validate method instead.

Overrides:
doLayout in class Container
Since:
JDK1.1
See Also:
LayoutManager.layoutContainer(java.awt.Container), Container.setLayout(java.awt.LayoutManager), Container.validate()

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

public AccessibleContext 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 interface Accessible
Overrides:
getAccessibleContext in class JPanel
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 the oneTouchExpandable property. If true, the JSplitPane will display a UI widget on the divider to quickly expand/collapse the divider.

The default value of this property is false.

Please note: Some look and feels might not support one-touch expanding; they will ignore this property.

Parameters:
oneTouchExpandable - true to specify that the split pane should provide a collapse/expand widget
See Also:
isOneTouchExpandable()

isOneTouchExpandable

public boolean isOneTouchExpandable()
Returns whether one-touch expand/collapse is on.

Returns:
the value of the oneTouchExpandable property
See Also:
setOneTouchExpandable(boolean)

setLeftOneTouchButtonImageIcon

public void setLeftOneTouchButtonImageIcon(ImageIcon leftButtonImageIcon)
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

public ImageIcon getLeftOneTouchButtonImageIcon()
Gets the left button's image icon.

Returns:
the imageIcon used displayed on the left one-touch button

setRightOneTouchButtonImageIcon

public void setRightOneTouchButtonImageIcon(ImageIcon rightButtonImageIcon)
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

public ImageIcon 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.

JIDE 3.5.15