|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container javax.swing.JComponent javax.swing.JPanel com.jidesoft.swing.JideSplitPane
public class JideSplitPane
JideSplitPane
is used to divide multiple Component
s.
Component
s in a split pane can be aligned left to right using
JideSplitPane.HORIZONTAL_SPLIT
, or top to bottom using JideSplitPane.VERTICAL_SPLIT
.
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 Component s 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 Component s 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String NON_CONTINUOUS_DIVIDER
public static final int VERTICAL_SPLIT
Component
s are split along the y axis. For example the two or more
Component
s will be split one on top of the other.
public static final int HORIZONTAL_SPLIT
Component
s are split along the x axis. For example the two or more
Component
s will be split one to the left of the other.
public static final String ORIENTATION_PROPERTY
public static final String DIVIDER_SIZE_PROPERTY
public static final String PROPERTY_DIVIDER_LOCATION
public static final String CONTINUOUS_LAYOUT_PROPERTY
public static final String GRIPPER_PROPERTY
public static final String PROPORTIONAL_LAYOUT_PROPERTY
public static final String PROPORTIONS_PROPERTY
public static final String PROPERTY_HEAVYWEIGHT_COMPONENT_ENABLED
public WindowAdapter _windowDeactivatedListener
public static final String ONE_TOUCH_EXPANDABLE_PROPERTY
oneTouchExpandable
.
setOneTouchExpandable(boolean)
,
Constant Field ValuesConstructor Detail |
---|
public JideSplitPane()
JideSplitPane
configured to arrange the child components side-by-side horizontally.
public JideSplitPane(int newOrientation)
JideSplitPane
configured with the specified orientation.
newOrientation
- JideSplitPane.HORIZONTAL_SPLIT
or JideSplitPane.VERTICAL_SPLIT
IllegalArgumentException
- if orientation
is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT.Method Detail |
---|
public int getDividerStepSize()
public void setDividerStepSize(int dividerStepSize)
dividerStepSize
- the step sizepublic void updateUI()
updateUI
in class JPanel
public void setDividerSize(int newSize)
newSize
- an integer giving the size of the divider in pixelspublic int getDividerSize()
public Component insertPane(Component pane, int index)
pane
- the pane to be addedindex
- the position at which to insert the component.
pane
public Component insertPane(Component pane, Object constraint, int index)
pane
- the pane to be addedconstraint
- an object expressing layout constraints for this componentindex
- the position at which to insert the component.
pane
public Component addPane(Component pane)
pane
- the pane to be added
pane
public void removePane(Component pane)
index
, from this container.
pane
- the pane to be removed.public void setPaneAt(Component pane, int index)
pane
- new paneindex
- positionpublic void setPaneAt(Component pane, Object constraint, int index)
pane
- new paneconstraint
- an object expressing layout constraints for this componentindex
- positionpublic void removePane(int index)
index
, from this container.
index
- the index of the component to be removed.public void setOrientation(int orientation)
orientation
- an integer specifying the orientation
IllegalArgumentException
- if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT.public int getOrientation()
setOrientation(int)
public void resetToPreferredSizes()
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.
public void setProportionalLayout(boolean proportionalLayout)
proportionalLayout
- true or false.public boolean isProportionalLayout()
public void setProportions(double[] proportions)
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.
proportions
- the proportions of all the panes.public double[] getProportions()
setProportions(double[])
or via user action.
public void setInitiallyEven(boolean initiallyEven)
initiallyEven
- true or false.public boolean isInitiallyEven()
public boolean isValidateRoot()
revalidate
on any descendant of this JideSplitPane
will
cause a request to be queued that will validate the JideSplitPane
and all its descendants.
isValidateRoot
in class JComponent
JComponent.revalidate()
protected void startDragging(JideSplitPaneDivider divider)
divider
- the dividerprotected void dragDividerTo(JideSplitPaneDivider divider, int location)
divider
- the dividerlocation
- new locationprotected void finishDraggingTo(JideSplitPaneDivider divider, int location)
divider
- the dividerlocation
- new locationpublic int indexOfDivider(JideSplitPaneDivider divider)
divider
- divider to get index
public int indexOfPane(Component pane)
pane
- pane to get index
public int indexOf(Component comp)
comp
- component to get index
public JideSplitPaneDivider getDividerAt(int index)
index
- index
public Component getPaneAt(int index)
index
- index
public int getPaneCount()
public void setDividerLocation(JideSplitPaneDivider divider, int location)
divider
- the dividerlocation
- new locationpublic void setDividerLocation(int dividerIndex, int location)
dividerIndex
- the divider index, starting from 0 for the first divider.location
- new locationpublic int getDividerLocation(int dividerIndex)
dividerIndex
- the divider index
public void componentAdded(ContainerEvent e)
componentAdded
in interface ContainerListener
e
- ContainerEventpublic void componentRemoved(ContainerEvent e)
componentRemoved
in interface ContainerListener
e
- ContainerEventpublic void componentResized(ComponentEvent e)
componentResized
in interface ComponentListener
public void componentMoved(ComponentEvent e)
componentMoved
in interface ComponentListener
public void componentShown(ComponentEvent e)
componentShown
in interface ComponentListener
public void componentHidden(ComponentEvent e)
componentHidden
in interface ComponentListener
protected boolean removeExtraDividers()
protected void removeProportion(int paneIndex)
paneIndex
- the pane index.protected void addExtraDividers()
protected void addProportion(int paneIndex)
paneIndex
- the pane index.public void setVisible(boolean aFlag)
setVisible
in class JComponent
protected void setDividersVisible()
protected JideSplitPaneDivider createSplitPaneDivider()
protected int getPreviousDividerLocation(JideSplitPaneDivider divider, boolean ignoreVisibility, boolean reversed)
divider
- the dividerignoreVisibility
- true to not check if the pane is visible.reversed
- from left to right or reversed.
public int getNextDividerLocation(JideSplitPaneDivider divider, boolean ignoreVisibility, boolean reversed)
divider
- the dividerignoreVisibility
- true to not check if the pane is visible.reversed
- from left to right or reversed.
public boolean isShowGripper()
public void setShowGripper(boolean showGripper)
showGripper
- true to show gripperpublic void doLayout()
validate
method instead.
doLayout
in class Container
LayoutManager.layoutContainer(java.awt.Container)
,
Container.setLayout(java.awt.LayoutManager)
,
Container.validate()
public boolean isContinuousLayout()
public void setContinuousLayout(boolean continuousLayout)
continuousLayout
- true or false.public AccessibleContext getAccessibleContext()
getAccessibleContext
in interface Accessible
getAccessibleContext
in class JPanel
public boolean isDragResizable()
public void setDragResizable(boolean dragResizable)
dragResizable
- the flagpublic boolean isHeavyweightComponentEnabled()
public void setHeavyweightComponentEnabled(boolean heavyweightComponentEnabled)
heavyweightComponentEnabled
- true to enable the usage of heavyweight components.public void setOneTouchExpandable(boolean oneTouchExpandable)
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.
oneTouchExpandable
- true
to specify that the split pane should provide a collapse/expand
widgetisOneTouchExpandable()
public boolean isOneTouchExpandable()
oneTouchExpandable
propertysetOneTouchExpandable(boolean)
public void setLeftOneTouchButtonImageIcon(ImageIcon leftButtonImageIcon)
leftButtonImageIcon
- the image to be displayed on the left one-touch buttonpublic ImageIcon getLeftOneTouchButtonImageIcon()
public void setRightOneTouchButtonImageIcon(ImageIcon rightButtonImageIcon)
rightButtonImageIcon
- the image to be displayed on the right one-touch buttonpublic ImageIcon getRightOneTouchButtonImageIcon()
public void setDividerLocations(int[] locations)
locations
- the new divider locations.public int[] getDividerLocations()
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |