Liking cljdoc? Tell your friends :D

javax.swing.JSplitPane

JSplitPane is used to divide two (and only two) Components. The two Components are graphically divided based on the look and feel implementation, and the two Components can then be interactively resized by the user. Information on using JSplitPane is in How to Use Split Panes in The Java Tutorial.

The two Components in a split pane can be aligned left to right using JSplitPane.HORIZONTAL_SPLIT, or top to bottom using JSplitPane.VERTICAL_SPLIT. The preferred way to change the size of the Components is to invoke setDividerLocation where location is either the new x or y position, depending on the orientation of the JSplitPane.

To resize the Components to their preferred sizes invoke resetToPreferredSizes.

When the user is resizing the Components the minimum size of the Components is used to determine the maximum/minimum position the Components can be set to. If the minimum size of the two components is greater than the size of the split pane the divider will not allow you to resize it. To alter the minimum size of a JComponent, see JComponent.setMinimumSize(java.awt.Dimension).

When the user resizes the split pane the new space is distributed between the two components based on the resizeWeight property. A value of 0, the default, indicates the right/bottom component gets all the space, where as a value of 1 indicates the left/top component gets all the space.

Warning: Swing is not thread safe. For more information see Swing's Threading Policy.

Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeans™ has been added to the java.beans package. Please see XMLEncoder.

JSplitPane is used to divide two (and only two)
Components. The two Components
are graphically divided based on the look and feel
implementation, and the two Components can then be
interactively resized by the user.
Information on using JSplitPane is in
How to Use Split Panes in
The Java Tutorial.

The two Components in a split pane can be aligned
left to right using
JSplitPane.HORIZONTAL_SPLIT, or top to bottom using
JSplitPane.VERTICAL_SPLIT.
The preferred way to change the size of the Components
is to invoke
setDividerLocation where location is either
the new x or y position, depending on the orientation of the
JSplitPane.

To resize the Components to their preferred sizes invoke
resetToPreferredSizes.

When the user is resizing the Components the minimum
size of the Components is used to determine the
maximum/minimum position the Components
can be set to. If the minimum size of the two
components is greater than the size of the split pane the divider
will not allow you to resize it. To alter the minimum size of a
JComponent, see JComponent.setMinimumSize(java.awt.Dimension).

When the user resizes the split pane the new space is distributed between
the two components based on the resizeWeight property.
A value of 0,
the default, indicates the right/bottom component gets all the space,
where as a value of 1 indicates the left/top component gets all the space.

Warning: Swing is not thread safe. For more
information see Swing's Threading
Policy.

Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing.  As of 1.4, support for long term storage
of all JavaBeans™
has been added to the java.beans package.
Please see XMLEncoder.
raw docstring

*-bottomclj

Static Constant.

Used to add a Component below the other Component.

type: java.lang.String

Static Constant.

Used to add a Component below the other
 Component.

type: java.lang.String
raw docstring

*-continuous-layout-propertyclj

Static Constant.

Bound property name for continuousLayout.

type: java.lang.String

Static Constant.

Bound property name for continuousLayout.

type: java.lang.String
raw docstring

*-dividerclj

Static Constant.

Used to add a Component that will represent the divider.

type: java.lang.String

Static Constant.

Used to add a Component that will represent the divider.

type: java.lang.String
raw docstring

*-divider-location-propertyclj

Static Constant.

Bound property for the dividerLocation.

type: java.lang.String

Static Constant.

Bound property for the dividerLocation.

type: java.lang.String
raw docstring

*-divider-size-propertyclj

Static Constant.

Bound property name for border.

type: java.lang.String

Static Constant.

Bound property name for border.

type: java.lang.String
raw docstring

*-horizontal-splitclj

Static Constant.

Horizontal split indicates the Components are split along the x axis. For example the two Components will be split one to the left of the other.

type: int

Static Constant.

Horizontal split indicates the Components are
 split along the x axis.  For example the two
 Components will be split one to the left of the
 other.

type: int
raw docstring

*-last-divider-location-propertyclj

Static Constant.

Bound property for lastLocation.

type: java.lang.String

Static Constant.

Bound property for lastLocation.

type: java.lang.String
raw docstring

*-leftclj

Static Constant.

Used to add a Component to the left of the other Component.

type: java.lang.String

Static Constant.

Used to add a Component to the left of the other
 Component.

type: java.lang.String
raw docstring

*-one-touch-expandable-propertyclj

Static Constant.

Bound property for oneTouchExpandable.

type: java.lang.String

Static Constant.

Bound property for oneTouchExpandable.

type: java.lang.String
raw docstring

*-orientation-propertyclj

Static Constant.

Bound property name for orientation (horizontal or vertical).

type: java.lang.String

Static Constant.

Bound property name for orientation (horizontal or vertical).

type: java.lang.String
raw docstring

*-resize-weight-propertyclj

Static Constant.

Bound property for weight.

type: java.lang.String

Static Constant.

Bound property for weight.

type: java.lang.String
raw docstring

*-rightclj

Static Constant.

Used to add a Component to the right of the other Component.

type: java.lang.String

Static Constant.

Used to add a Component to the right of the other
 Component.

type: java.lang.String
raw docstring

*-topclj

Static Constant.

Used to add a Component above the other Component.

type: java.lang.String

Static Constant.

Used to add a Component above the other
 Component.

type: java.lang.String
raw docstring

*-vertical-splitclj

Static Constant.

Vertical split indicates the Components are split along the y axis. For example the two Components will be split one on top of the other.

type: int

Static Constant.

Vertical split indicates the Components are
 split along the y axis.  For example the two
 Components will be split one on top of the other.

type: int
raw docstring

->j-split-paneclj

(->j-split-pane)
(->j-split-pane new-orientation)
(->j-split-pane new-orientation new-continuous-layout)
(->j-split-pane new-orientation new-left-component new-right-component)
(->j-split-pane new-orientation
                new-continuous-layout
                new-left-component
                new-right-component)

Constructor.

Creates a new JSplitPane with the specified orientation and redrawing style, and with the specified components.

new-orientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT - int new-continuous-layout - a boolean, true for the components to redraw continuously as the divider changes position, false to wait until the divider position stops changing to redraw - boolean new-left-component - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane - java.awt.Component new-right-component - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane - java.awt.Component

throws: java.lang.IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT

Constructor.

Creates a new JSplitPane with the specified
 orientation and
 redrawing style, and with the specified components.

new-orientation - JSplitPane.HORIZONTAL_SPLIT or JSplitPane.VERTICAL_SPLIT - `int`
new-continuous-layout - a boolean, true for the components to redraw continuously as the divider changes position, false to wait until the divider position stops changing to redraw - `boolean`
new-left-component - the Component that will appear on the left of a horizontally-split pane, or at the top of a vertically-split pane - `java.awt.Component`
new-right-component - the Component that will appear on the right of a horizontally-split pane, or at the bottom of a vertically-split pane - `java.awt.Component`

throws: java.lang.IllegalArgumentException - if orientation is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT
raw docstring

continuous-layout?clj

(continuous-layout? this)

Gets the continuousLayout property.

returns: the value of the continuousLayout property - boolean

Gets the continuousLayout property.

returns: the value of the continuousLayout property - `boolean`
raw docstring

get-accessible-contextclj

(get-accessible-context this)

Gets the AccessibleContext associated with this JSplitPane. For split panes, the AccessibleContext takes the form of an AccessibleJSplitPane. A new AccessibleJSplitPane instance is created if necessary.

returns: an AccessibleJSplitPane that serves as the AccessibleContext of this JSplitPane - javax.accessibility.AccessibleContext

Gets the AccessibleContext associated with this JSplitPane.
 For split panes, the AccessibleContext takes the form of an
 AccessibleJSplitPane.
 A new AccessibleJSplitPane instance is created if necessary.

returns: an AccessibleJSplitPane that serves as the
         AccessibleContext of this JSplitPane - `javax.accessibility.AccessibleContext`
raw docstring

get-bottom-componentclj

(get-bottom-component this)

Returns the component below, or to the right of the divider.

returns: the Component displayed in that position - java.awt.Component

Returns the component below, or to the right of the divider.

returns: the Component displayed in that position - `java.awt.Component`
raw docstring

get-divider-locationclj

(get-divider-location this)

Returns the last value passed to setDividerLocation. The value returned from this method may differ from the actual divider location (if setDividerLocation was passed a value bigger than the current size).

returns: an integer specifying the location of the divider - int

Returns the last value passed to setDividerLocation.
 The value returned from this method may differ from the actual
 divider location (if setDividerLocation was passed a
 value bigger than the current size).

returns: an integer specifying the location of the divider - `int`
raw docstring

get-divider-sizeclj

(get-divider-size this)

Returns the size of the divider.

returns: an integer giving the size of the divider in pixels - int

Returns the size of the divider.

returns: an integer giving the size of the divider in pixels - `int`
raw docstring

get-last-divider-locationclj

(get-last-divider-location this)

Returns the last location the divider was at.

returns: an integer specifying the last divider location as a count of pixels from the left (or upper) edge of the pane to the left (or upper) edge of the divider - int

Returns the last location the divider was at.

returns: an integer specifying the last divider location as a count
       of pixels from the left (or upper) edge of the pane to the
       left (or upper) edge of the divider - `int`
raw docstring

get-left-componentclj

(get-left-component this)

Returns the component to the left (or above) the divider.

returns: the Component displayed in that position - java.awt.Component

Returns the component to the left (or above) the divider.

returns: the Component displayed in that position - `java.awt.Component`
raw docstring

get-maximum-divider-locationclj

(get-maximum-divider-location this)

Returns the maximum location of the divider from the look and feel implementation.

returns: an integer specifying a UI-specific value for the maximum location (typically a pixel count); or -1 if the UI is null - int

Returns the maximum location of the divider from the look and feel
 implementation.

returns: an integer specifying a UI-specific value for the maximum
          location (typically a pixel count); or -1 if the  UI is
          null - `int`
raw docstring

get-minimum-divider-locationclj

(get-minimum-divider-location this)

Returns the minimum location of the divider from the look and feel implementation.

returns: an integer specifying a UI-specific value for the minimum location (typically a pixel count); or -1 if the UI is null - int

Returns the minimum location of the divider from the look and feel
 implementation.

returns: an integer specifying a UI-specific value for the minimum
          location (typically a pixel count); or -1 if the UI is
          null - `int`
raw docstring

get-orientationclj

(get-orientation this)

Returns the orientation.

returns: an integer giving the orientation - int

Returns the orientation.

returns: an integer giving the orientation - `int`
raw docstring

get-resize-weightclj

(get-resize-weight this)

Returns the number that determines how extra space is distributed.

returns: how extra space is to be distributed on a resize of the split pane - double

Returns the number that determines how extra space is distributed.

returns: how extra space is to be distributed on a resize of the
         split pane - `double`
raw docstring

get-right-componentclj

(get-right-component this)

Returns the component to the right (or below) the divider.

returns: the Component displayed in that position - java.awt.Component

Returns the component to the right (or below) the divider.

returns: the Component displayed in that position - `java.awt.Component`
raw docstring

get-top-componentclj

(get-top-component this)

Returns the component above, or to the left of the divider.

returns: the Component displayed in that position - java.awt.Component

Returns the component above, or to the left of the divider.

returns: the Component displayed in that position - `java.awt.Component`
raw docstring

get-uiclj

(get-ui this)

Returns the SplitPaneUI that is providing the current look and feel.

returns: the SplitPaneUI object that renders this component - javax.swing.plaf.SplitPaneUI

Returns the SplitPaneUI that is providing the
 current look and feel.

returns: the SplitPaneUI object that renders this component - `javax.swing.plaf.SplitPaneUI`
raw docstring

get-ui-class-idclj

(get-ui-class-id this)

Returns the name of the L&F class that renders this component.

returns: the string "SplitPaneUI" - java.lang.String

Returns the name of the L&F class that renders this component.

returns: the string "SplitPaneUI" - `java.lang.String`
raw docstring

one-touch-expandable?clj

(one-touch-expandable? this)

Gets the oneTouchExpandable property.

returns: the value of the oneTouchExpandable property - boolean

Gets the oneTouchExpandable property.

returns: the value of the oneTouchExpandable property - `boolean`
raw docstring

removeclj

(remove this component)

Removes the child component, component from the pane. Resets the leftComponent or rightComponent instance variable, as necessary.

component - the Component to remove - java.awt.Component

Removes the child component, component from the
 pane. Resets the leftComponent or
 rightComponent instance variable, as necessary.

component - the Component to remove - `java.awt.Component`
raw docstring

remove-allclj

(remove-all this)

Removes all the child components from the split pane. Resets the leftComonent and rightComponent instance variables.

Removes all the child components from the split pane. Resets the
leftComonent and rightComponent
instance variables.
raw docstring

reset-to-preferred-sizesclj

(reset-to-preferred-sizes this)

Lays out the JSplitPane layout based on the preferred size of the children components. This will likely result in changing the divider location.

Lays out the JSplitPane layout based on the preferred size
of the children components. This will likely result in changing
the divider location.
raw docstring

set-bottom-componentclj

(set-bottom-component this comp)

Sets the component below, or to the right of the divider.

comp - the Component to display in that position - java.awt.Component

Sets the component below, or to the right of the divider.

comp - the Component to display in that position - `java.awt.Component`
raw docstring

set-continuous-layoutclj

(set-continuous-layout this new-continuous-layout)

Sets the value of the continuousLayout property, which must be true for the child components to be continuously redisplayed and laid out during user intervention. The default value of this property is look and feel dependent. Some look and feels might not support continuous layout; they will ignore this property.

new-continuous-layout - true if the components should continuously be redrawn as the divider changes position - boolean

Sets the value of the continuousLayout property,
 which must be true for the child components
 to be continuously
 redisplayed and laid out during user intervention.
 The default value of this property is look and feel dependent.
 Some look and feels might not support continuous layout;
 they will ignore this property.

new-continuous-layout - true if the components should continuously be redrawn as the divider changes position - `boolean`
raw docstring

set-divider-locationclj

(set-divider-location this proportional-location)

Sets the divider location as a percentage of the JSplitPane's size.

This method is implemented in terms of setDividerLocation(int). This method immediately changes the size of the split pane based on its current size. If the split pane is not correctly realized and on screen, this method will have no effect (new divider location will become (current size * proportionalLocation) which is 0).

proportional-location - a double-precision floating point value that specifies a percentage, from zero (top/left) to 1.0 (bottom/right) - double

throws: java.lang.IllegalArgumentException - if the specified location is < 0 or > 1.0

Sets the divider location as a percentage of the
 JSplitPane's size.

 This method is implemented in terms of
 setDividerLocation(int).
 This method immediately changes the size of the split pane based on
 its current size. If the split pane is not correctly realized and on
 screen, this method will have no effect (new divider location will
 become (current size * proportionalLocation) which is 0).

proportional-location - a double-precision floating point value that specifies a percentage, from zero (top/left) to 1.0 (bottom/right) - `double`

throws: java.lang.IllegalArgumentException - if the specified location is < 0 or > 1.0
raw docstring

set-divider-sizeclj

(set-divider-size this new-size)

Sets the size of the divider.

new-size - an integer giving the size of the divider in pixels - int

Sets the size of the divider.

new-size - an integer giving the size of the divider in pixels - `int`
raw docstring

set-last-divider-locationclj

(set-last-divider-location this new-last-location)

Sets the last location the divider was at to newLastLocation.

new-last-location - an integer specifying the last divider location in pixels, from the left (or upper) edge of the pane to the left (or upper) edge of the divider - int

Sets the last location the divider was at to
 newLastLocation.

new-last-location - an integer specifying the last divider location in pixels, from the left (or upper) edge of the pane to the left (or upper) edge of the divider - `int`
raw docstring

set-left-componentclj

(set-left-component this comp)

Sets the component to the left (or above) the divider.

comp - the Component to display in that position - java.awt.Component

Sets the component to the left (or above) the divider.

comp - the Component to display in that position - `java.awt.Component`
raw docstring

set-one-touch-expandableclj

(set-one-touch-expandable this new-value)

Sets the value of the oneTouchExpandable property, which must be true for the JSplitPane to provide a UI widget on the divider to quickly expand/collapse the divider. The default value of this property is false. Some look and feels might not support one-touch expanding; they will ignore this property.

new-value - true to specify that the split pane should provide a collapse/expand widget - boolean

Sets the value of the oneTouchExpandable property,
 which must be true for the
 JSplitPane to provide a UI widget
 on the divider to quickly expand/collapse the divider.
 The default value of this property is false.
 Some look and feels might not support one-touch expanding;
 they will ignore this property.

new-value - true to specify that the split pane should provide a collapse/expand widget - `boolean`
raw docstring

set-orientationclj

(set-orientation this orientation)

Sets the orientation, or how the splitter is divided. The options are: JSplitPane.VERTICAL_SPLIT (above/below orientation of components) JSplitPane.HORIZONTAL_SPLIT (left/right orientation of components)

orientation - an integer specifying the orientation - int

throws: java.lang.IllegalArgumentException - if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT.

Sets the orientation, or how the splitter is divided. The options
 are:
 JSplitPane.VERTICAL_SPLIT  (above/below orientation of components)
 JSplitPane.HORIZONTAL_SPLIT  (left/right orientation of components)

orientation - an integer specifying the orientation - `int`

throws: java.lang.IllegalArgumentException - if orientation is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT.
raw docstring

set-resize-weightclj

(set-resize-weight this value)

Specifies how to distribute extra space when the size of the split pane changes. A value of 0, the default, indicates the right/bottom component gets all the extra space (the left/top component acts fixed), where as a value of 1 specifies the left/top component gets all the extra space (the right/bottom component acts fixed). Specifically, the left/top component gets (weight * diff) extra space and the right/bottom component gets (1 - weight) * diff extra space.

value - as described above - double

throws: java.lang.IllegalArgumentException - if value is < 0 or > 1

Specifies how to distribute extra space when the size of the split pane
 changes. A value of 0, the default,
 indicates the right/bottom component gets all the extra space (the
 left/top component acts fixed), where as a value of 1 specifies the
 left/top component gets all the extra space (the right/bottom component
 acts fixed). Specifically, the left/top component gets (weight * diff)
 extra space and the right/bottom component gets (1 - weight) * diff
 extra space.

value - as described above - `double`

throws: java.lang.IllegalArgumentException - if value is < 0 or > 1
raw docstring

set-right-componentclj

(set-right-component this comp)

Sets the component to the right (or below) the divider.

comp - the Component to display in that position - java.awt.Component

Sets the component to the right (or below) the divider.

comp - the Component to display in that position - `java.awt.Component`
raw docstring

set-top-componentclj

(set-top-component this comp)

Sets the component above, or to the left of the divider.

comp - the Component to display in that position - java.awt.Component

Sets the component above, or to the left of the divider.

comp - the Component to display in that position - `java.awt.Component`
raw docstring

set-uiclj

(set-ui this ui)

Sets the L&F object that renders this component.

ui - the SplitPaneUI L&F object - javax.swing.plaf.SplitPaneUI

Sets the L&F object that renders this component.

ui - the SplitPaneUI L&F object - `javax.swing.plaf.SplitPaneUI`
raw docstring

update-uiclj

(update-ui this)

Notification from the UIManager that the L&F has changed. Replaces the current UI object with the latest version from the UIManager.

Notification from the UIManager that the L&F has changed.
Replaces the current UI object with the latest version from the
UIManager.
raw docstring

validate-root?clj

(validate-root? this)

Returns true, so that calls to revalidate on any descendant of this JSplitPane will cause a request to be queued that will validate the JSplitPane and all its descendants.

returns: true - boolean

Returns true, so that calls to revalidate
 on any descendant of this JSplitPane
 will cause a request to be queued that
 will validate the JSplitPane and all its descendants.

returns: true - `boolean`
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close