javax.swing
public class JSplitPane extends JComponent implements Accessible
| Nested Class Summary | |
|---|---|
| protected class | JSplitPane.AccessibleJSplitPane
Provides the accessibility features for the JSplitPane
component. |
| Field Summary | |
|---|---|
| static String | BOTTOM The constraints string used to add components to the bottom. |
| protected boolean | continuousLayout Whether the JSplitPane uses continuous layout. |
| static String | CONTINUOUS_LAYOUT_PROPERTY The property fired when the continuousLayout property changes. |
| protected int | dividerSize The size of the divider. |
| static String | DIVIDER The property fired when the divider property changes. |
| static String | DIVIDER_LOCATION_PROPERTY The property fired when the divider location property changes. |
| static String | DIVIDER_SIZE_PROPERTY The property fired when the divider size property changes. |
| static int | HORIZONTAL_SPLIT
The value of the orientation when the components are split horizontally. |
| protected int | lastDividerLocation The last location of the divider given by the UI. |
| protected Component | leftComponent The component on the top or left. |
| static String | LAST_DIVIDER_LOCATION_PROPERTY The property fired when the last divider location property changes. |
| static String | LEFT The constraints string used to add components to the left. |
| protected boolean | oneTouchExpandable Whether the JSplitPane uses one touch expandable buttons. |
| protected int | orientation The orientation of the JSplitPane. |
| static String | ONE_TOUCH_EXPANDABLE_PROPERTY The property fired when the one touch expandable property changes. |
| static String | ORIENTATION_PROPERTY The property fired when the orientation property changes. |
| protected Component | rightComponent The component on the right or bottom. |
| static String | RESIZE_WEIGHT_PROPERTY The property fired when the resize weight property changes. |
| static String | RIGHT The constraints string used to add components to the right. |
| static String | TOP The constraints string used to add components to the top. |
| static int | VERTICAL_SPLIT The value of the orientation when the components are split vertically. |
| Constructor Summary | |
|---|---|
| JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane object with the given orientation, layout mode,
and left and right components.
| |
| JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
Creates a new JSplitPane object using nonContinuousLayout mode, the given
orientation and left and right components.
| |
| JSplitPane(int newOrientation, boolean newContinuousLayout)
Creates a new JSplitPane object with the given layout mode and
orientation.
| |
| JSplitPane(int newOrientation)
Creates a new JSplitPane object using a nonContinuousLayout mode and the
given orientation.
| |
| JSplitPane()
Creates a new JSplitPane object using HORIZONTAL_SPLIT and a
nonContinuousLayout mode. | |
| Method Summary | |
|---|---|
| protected void | addImpl(Component comp, Object constraints, int index)
This method adds a component to the JSplitPane. |
| AccessibleContext | getAccessibleContext()
Returns the object that provides accessibility features for this
JSplitPane component.
|
| Component | getBottomComponent()
This method returns the bottom component.
|
| int | getDividerLocation()
This method returns the location of the divider. |
| int | getDividerSize()
This method returns the size of the divider.
|
| int | getLastDividerLocation()
This method returns the last divider location.
|
| Component | getLeftComponent()
This method returns the left component.
|
| int | getMaximumDividerLocation()
This method returns the maximum divider location. |
| int | getMinimumDividerLocation()
This method returns the minimum divider location. |
| int | getOrientation()
This method returns the orientation that the JSplitPane is using.
|
| double | getResizeWeight()
This method returns the current resize weight.
|
| Component | getRightComponent()
This method returns the right component.
|
| Component | getTopComponent()
This method returns the top component.
|
| SplitPaneUI | getUI()
This method returns the UI.
|
| String | getUIClassID()
This method returns a string identifier to determine which UI class it
needs.
|
| boolean | isContinuousLayout()
This method returns true if the JSplitPane is using a continuousLayout.
|
| boolean | isOneTouchExpandable()
This method returns true if the divider has one touch expandable buttons.
|
| boolean | isValidateRoot()
This method returns true.
|
| protected void | paintChildren(Graphics g)
This method overrides JComponent's paintChildren so the UI can be
messaged when the children have finished painting.
|
| protected String | paramString()
Returns an implementation-dependent string describing the attributes of
this JSplitPane.
|
| void | remove(Component component)
This method removes the given component from the JSplitPane.
|
| void | remove(int index)
This method removes the component at the given index.
|
| void | removeAll()
This method removes all components from the JSplitPane. |
| void | resetToPreferredSizes()
This method resets all children of the JSplitPane to their preferred
sizes. |
| void | setBottomComponent(Component comp)
This method sets the bottom component.
|
| void | setContinuousLayout(boolean newContinuousLayout)
This method sets the layout mode for the JSplitPane.
|
| void | setDividerLocation(double proportionalLocation)
This method sets the location of the divider. |
| void | setDividerLocation(int location)
This method sets the location of the divider.
|
| void | setDividerSize(int newSize)
This method sets the size of the divider.
|
| void | setLastDividerLocation(int newLastLocation)
This method sets the last location of the divider.
|
| void | setLeftComponent(Component comp)
This method sets the left component.
|
| void | setOneTouchExpandable(boolean newValue)
This method sets whether the divider has one touch expandable buttons.
|
| void | setOrientation(int orientation)
Sets the orientation for the JSplitPane and sends a
{@link PropertyChangeEvent} (with the property name
{@link #ORIENTATION_PROPERTY}) to all registered listeners.
|
| void | setResizeWeight(double value)
This method determines how extra space will be distributed among the left
and right components. |
| void | setRightComponent(Component comp)
This method sets the right component.
|
| void | setTopComponent(Component comp)
This method sets the top component.
|
| void | setUI(SplitPaneUI ui)
This method sets the UI used by the JSplitPane.
|
| void | updateUI()
This method resets the UI to the one specified by the current Look and
Feel. |
Parameters: newOrientation The orientation to use. newContinuousLayout The layout mode to use. newLeftComponent The left component. newRightComponent The right component.
Throws: IllegalArgumentException DOCUMENT ME!
Parameters: newOrientation The orientation to use. newLeftComponent The left component. newRightComponent The right component.
Parameters: newOrientation The orientation to use. newContinuousLayout The layout mode to use.
Parameters: newOrientation The orientation to use.
Parameters: comp The component to add. constraints The constraints string to use. index Where to place to component in the list of components.
Throws: IllegalArgumentException When the constraints is not a known identifier.
JSplitPane component.
Returns: The accessible context (an instance of {@link AccessibleJSplitPane}).
Returns: The bottom component.
Returns: The location of the divider.
Returns: The size of the divider.
Returns: The last divider location.
Returns: The left component.
Returns: DOCUMENT ME!
Returns: The minimum divider location.
Returns: The current orientation.
Returns: The current resize weight.
Returns: The right component.
Returns: The top component.
Returns: The UI.
Returns: A string that identifies it's UI class.
Returns: True if using a continuousLayout.
Returns: True if one touch expandable is used.
Returns: true.
Parameters: g The Graphics object to paint with.
JSplitPane.
Returns: A string describing the attributes of this JSplitPane
(never null).
Parameters: component The Component to remove.
Parameters: index The index of the component to remove.
Parameters: comp The Component to be placed at the bottom.
Parameters: newContinuousLayout Whether the JSplitPane is in continuousLayout mode.
Parameters: proportionalLocation A double that describes the location of the divider.
Throws: IllegalArgumentException if proportionalLocation is
not in the range from 0.0 to 1.0 inclusive.
Parameters: location The location of the divider. The negative value forces to compute the new location from the preferred sizes of the split pane components.
Parameters: newSize The size of the divider.
Parameters: newLastLocation The last location of the divider.
Parameters: comp The left component.
Parameters: newValue Whether the divider will have one touch expandable buttons.
JSplitPane and sends a
{@link PropertyChangeEvent} (with the property name
{@link #ORIENTATION_PROPERTY}) to all registered listeners.
Parameters: orientation the orientation (either {@link #HORIZONTAL_SPLIT} or {@link #VERTICAL_SPLIT}).
Throws: IllegalArgumentException if orientation is not one of
the listed values.
Parameters: value The resize weight.
Parameters: comp The right component.
Parameters: comp The top component.
Parameters: ui The UI to use.