declare namespace javax {
namespace swing {
/**
* JSplitPane
is used to divide two (and only two)
* Component
s. The two Component
s
* are graphically divided based on the look and feel
* implementation, and the two Component
s 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 Component
s 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 Component
s
* is to invoke
* setDividerLocation
where location
is either
* the new x or y position, depending on the orientation of the
* JSplitPane
.
*
* To resize the Component
s to their preferred sizes invoke
* resetToPreferredSizes
.
*
* When the user is resizing the Component
s the minimum
* size of the Components
is used to determine the
* maximum/minimum position the Component
s
* 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 {@link JComponent#setMinimumSize}.
*
* 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 {@link java.beans.XMLEncoder}.
* @see #setDividerLocation
* @see #resetToPreferredSizes
* @author Scott Violet
*/
// @ts-ignore
class JSplitPane extends javax.swing.JComponent implements javax.accessibility.Accessible {
/**
* Creates a new JSplitPane
configured to arrange the child
* components side-by-side horizontally, using two buttons for the components.
*/
// @ts-ignore
constructor()
/**
* Creates a new JSplitPane
configured with the
* specified orientation.
* @param newOrientation JSplitPane.HORIZONTAL_SPLIT
or
* JSplitPane.VERTICAL_SPLIT
* @exception IllegalArgumentException if orientation
* is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT.
*/
// @ts-ignore
constructor(newOrientation: number /*int*/)
/**
* Creates a new JSplitPane
with the specified
* orientation and redrawing style.
* @param newOrientation JSplitPane.HORIZONTAL_SPLIT
or
* JSplitPane.VERTICAL_SPLIT
* @param newContinuousLayout 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
* @exception IllegalArgumentException if orientation
* is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT
*/
// @ts-ignore
constructor(newOrientation: number /*int*/, newContinuousLayout: boolean)
/**
* Creates a new JSplitPane
with the specified
* orientation and the specified components.
* @param newOrientation JSplitPane.HORIZONTAL_SPLIT
or
* JSplitPane.VERTICAL_SPLIT
* @param newLeftComponent the Component
that will
* appear on the left
* of a horizontally-split pane, or at the top of a
* vertically-split pane
* @param newRightComponent the Component
that will
* appear on the right
* of a horizontally-split pane, or at the bottom of a
* vertically-split pane
* @exception IllegalArgumentException if orientation
* is not one of: HORIZONTAL_SPLIT or VERTICAL_SPLIT
*/
// @ts-ignore
constructor(newOrientation: number /*int*/, newLeftComponent: java.awt.Component, newRightComponent: java.awt.Component)
/**
* Creates a new JSplitPane
with the specified
* orientation and
* redrawing style, and with the specified components.
* @param newOrientation JSplitPane.HORIZONTAL_SPLIT
or
* JSplitPane.VERTICAL_SPLIT
* @param newContinuousLayout 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
* @param newLeftComponent the Component
that will
* appear on the left
* of a horizontally-split pane, or at the top of a
* vertically-split pane
* @param newRightComponent the Component
that will
* appear on the right
* of a horizontally-split pane, or at the bottom of a
* vertically-split pane
* @exception IllegalArgumentException if orientation
* is not one of HORIZONTAL_SPLIT or VERTICAL_SPLIT
*/
// @ts-ignore
constructor(newOrientation: number /*int*/, newContinuousLayout: boolean, newLeftComponent: java.awt.Component, newRightComponent: java.awt.Component)
/**
* Vertical split indicates the Component
s are
* split along the y axis. For example the two
* Component
s will be split one on top of the other.
*/
// @ts-ignore
public static readonly VERTICAL_SPLIT: number /*int*/
/**
* Horizontal split indicates the Component
s are
* split along the x axis. For example the two
* Component
s will be split one to the left of the
* other.
*/
// @ts-ignore
public static readonly HORIZONTAL_SPLIT: number /*int*/
/**
* Used to add a Component
to the left of the other
* Component
.
*/
// @ts-ignore
public static readonly LEFT: java.lang.String | string
/**
* Used to add a Component
to the right of the other
* Component
.
*/
// @ts-ignore
public static readonly RIGHT: java.lang.String | string
/**
* Used to add a Component
above the other
* Component
.
*/
// @ts-ignore
public static readonly TOP: java.lang.String | string
/**
* Used to add a Component
below the other
* Component
.
*/
// @ts-ignore
public static readonly BOTTOM: java.lang.String | string
/**
* Used to add a Component
that will represent the divider.
*/
// @ts-ignore
public static readonly DIVIDER: java.lang.String | string
/**
* Bound property name for orientation (horizontal or vertical).
*/
// @ts-ignore
public static readonly ORIENTATION_PROPERTY: java.lang.String | string
/**
* Bound property name for continuousLayout.
*/
// @ts-ignore
public static readonly CONTINUOUS_LAYOUT_PROPERTY: java.lang.String | string
/**
* Bound property name for border.
*/
// @ts-ignore
public static readonly DIVIDER_SIZE_PROPERTY: java.lang.String | string
/**
* Bound property for oneTouchExpandable.
*/
// @ts-ignore
public static readonly ONE_TOUCH_EXPANDABLE_PROPERTY: java.lang.String | string
/**
* Bound property for lastLocation.
*/
// @ts-ignore
public static readonly LAST_DIVIDER_LOCATION_PROPERTY: java.lang.String | string
/**
* Bound property for the dividerLocation.
* @since 1.3
*/
// @ts-ignore
public static readonly DIVIDER_LOCATION_PROPERTY: java.lang.String | string
/**
* Bound property for weight.
* @since 1.3
*/
// @ts-ignore
public static readonly RESIZE_WEIGHT_PROPERTY: java.lang.String | string
/**
* How the views are split.
*/
// @ts-ignore
orientation: number /*int*/
/**
* Whether or not the views are continuously redisplayed while
* resizing.
*/
// @ts-ignore
continuousLayout: boolean
/**
* The left or top component.
*/
// @ts-ignore
leftComponent: java.awt.Component
/**
* The right or bottom component.
*/
// @ts-ignore
rightComponent: java.awt.Component
/**
* Size of the divider.
*/
// @ts-ignore
dividerSize: number /*int*/
/**
* Is a little widget provided to quickly expand/collapse the
* split pane?
*/
// @ts-ignore
oneTouchExpandable: boolean
/**
* Previous location of the split pane.
*/
// @ts-ignore
lastDividerLocation: number /*int*/
/**
* Sets the L&F object that renders this component.
* @param ui the SplitPaneUI
L&F object
* @see UIDefaults#getUI
* @beaninfo bound: true
* hidden: true
* attribute: visualUpdate true
* description: The UI object that implements the Component's LookAndFeel.
*/
// @ts-ignore
public setUI(ui: javax.swing.plaf.SplitPaneUI): void
/**
* Returns the SplitPaneUI
that is providing the
* current look and feel.
* @return the SplitPaneUI
object that renders this component
* @beaninfo expert: true
* description: The L&F object that renders this component.
*/
// @ts-ignore
public getUI(): javax.swing.plaf.SplitPaneUI
/**
* Notification from the UIManager
that the L&F has changed.
* Replaces the current UI object with the latest version from the
* UIManager
.
* @see JComponent#updateUI
*/
// @ts-ignore
public updateUI(): void
/**
* Returns the name of the L&F class that renders this component.
* @return the string "SplitPaneUI"
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
* @beaninfo expert: true
* description: A string that specifies the name of the L&F class.
*/
// @ts-ignore
public getUIClassID(): string
/**
* Sets the size of the divider.
* @param newSize an integer giving the size of the divider in pixels
* @beaninfo bound: true
* description: The size of the divider.
*/
// @ts-ignore
public setDividerSize(newSize: number /*int*/): void
/**
* Returns the size of the divider.
* @return an integer giving the size of the divider in pixels
*/
// @ts-ignore
public getDividerSize(): number /*int*/
/**
* Sets the component to the left (or above) the divider.
* @param comp the Component
to display in that position
*/
// @ts-ignore
public setLeftComponent(comp: java.awt.Component): void
/**
* Returns the component to the left (or above) the divider.
* @return the Component
displayed in that position
* @beaninfo preferred: true
* description: The component to the left (or above) the divider.
*/
// @ts-ignore
public getLeftComponent(): java.awt.Component
/**
* Sets the component above, or to the left of the divider.
* @param comp the Component
to display in that position
* @beaninfo description: The component above, or to the left of the divider.
*/
// @ts-ignore
public setTopComponent(comp: java.awt.Component): void
/**
* Returns the component above, or to the left of the divider.
* @return the Component
displayed in that position
*/
// @ts-ignore
public getTopComponent(): java.awt.Component
/**
* Sets the component to the right (or below) the divider.
* @param comp the Component
to display in that position
* @beaninfo preferred: true
* description: The component to the right (or below) the divider.
*/
// @ts-ignore
public setRightComponent(comp: java.awt.Component): void
/**
* Returns the component to the right (or below) the divider.
* @return the Component
displayed in that position
*/
// @ts-ignore
public getRightComponent(): java.awt.Component
/**
* Sets the component below, or to the right of the divider.
* @param comp the Component
to display in that position
* @beaninfo description: The component below, or to the right of the divider.
*/
// @ts-ignore
public setBottomComponent(comp: java.awt.Component): void
/**
* Returns the component below, or to the right of the divider.
* @return the Component
displayed in that position
*/
// @ts-ignore
public getBottomComponent(): java.awt.Component
/**
* 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.
* @param newValue true
to specify that the split pane should provide a
* collapse/expand widget
* @beaninfo bound: true
* description: UI widget on the divider to quickly
* expand/collapse the divider.
* @see #isOneTouchExpandable
*/
// @ts-ignore
public setOneTouchExpandable(newValue: boolean): void
/**
* Gets the oneTouchExpandable
property.
* @return the value of the oneTouchExpandable
property
* @see #setOneTouchExpandable
*/
// @ts-ignore
public isOneTouchExpandable(): boolean
/**
* Sets the last location the divider was at to
* newLastLocation
.
* @param newLastLocation 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
* @beaninfo bound: true
* description: The last location the divider was at.
*/
// @ts-ignore
public setLastDividerLocation(newLastLocation: number /*int*/): void
/**
* Returns the last location the divider was at.
* @return 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
*/
// @ts-ignore
public getLastDividerLocation(): number /*int*/
/**
* Sets the orientation, or how the splitter is divided. The options
* are:
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.
* @param newContinuousLayout true
if the components
* should continuously be redrawn as the divider changes position
* @beaninfo bound: true
* description: Whether the child components are
* continuously redisplayed and laid out during
* user intervention.
* @see #isContinuousLayout
*/
// @ts-ignore
public setContinuousLayout(newContinuousLayout: boolean): void
/**
* Gets the continuousLayout
property.
* @return the value of the continuousLayout
property
* @see #setContinuousLayout
*/
// @ts-ignore
public isContinuousLayout(): boolean
/**
* 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.
* @param value as described above
* @exception IllegalArgumentException if value
is < 0 or > 1
* @since 1.3
* @beaninfo bound: true
* description: Specifies how to distribute extra space when the split pane
* resizes.
*/
// @ts-ignore
public setResizeWeight(value: number /*double*/): void
/**
* Returns the number that determines how extra space is distributed.
* @return how extra space is to be distributed on a resize of the
* split pane
* @since 1.3
*/
// @ts-ignore
public getResizeWeight(): number /*double*/
/**
* Lays out the JSplitPane
layout based on the preferred size
* of the children components. This will likely result in changing
* the divider location.
*/
// @ts-ignore
public resetToPreferredSizes(): void
/**
* 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).
* @param proportionalLocation a double-precision floating point value
* that specifies a percentage, from zero (top/left) to 1.0
* (bottom/right)
* @exception IllegalArgumentException if the specified location is < 0
* or > 1.0
* @beaninfo description: The location of the divider.
*/
// @ts-ignore
public setDividerLocation(proportionalLocation: number /*double*/): void
/**
* Sets the location of the divider. This is passed off to the
* look and feel implementation, and then listeners are notified. A value
* less than 0 implies the divider should be reset to a value that
* attempts to honor the preferred size of the left/top component.
* After notifying the listeners, the last divider location is updated,
* via setLastDividerLocation
.
* @param location an int specifying a UI-specific value (typically a
* pixel count)
* @beaninfo bound: true
* description: The location of the divider.
*/
// @ts-ignore
public setDividerLocation(location: number /*int*/): void
/**
* 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).
* @return an integer specifying the location of the divider
*/
// @ts-ignore
public getDividerLocation(): number /*int*/
/**
* Returns the minimum location of the divider from the look and feel
* implementation.
* @return an integer specifying a UI-specific value for the minimum
* location (typically a pixel count); or -1 if the UI is
* null
* @beaninfo description: The minimum location of the divider from the L&F.
*/
// @ts-ignore
public getMinimumDividerLocation(): number /*int*/
/**
* Returns the maximum location of the divider from the look and feel
* implementation.
* @return an integer specifying a UI-specific value for the maximum
* location (typically a pixel count); or -1 if the UI is
* null
*/
// @ts-ignore
public getMaximumDividerLocation(): number /*int*/
/**
* Removes the child component, component
from the
* pane. Resets the leftComponent
or
* rightComponent
instance variable, as necessary.
* @param component the Component
to remove
*/
// @ts-ignore
public remove(component: java.awt.Component): void
/**
* Removes the Component
at the specified index.
* Updates the leftComponent
and rightComponent
* instance variables as necessary, and then messages super.
* @param index an integer specifying the component to remove, where
* 1 specifies the left/top component and 2 specifies the
* bottom/right component
*/
// @ts-ignore
public remove(index: number /*int*/): void
/**
* Removes all the child components from the split pane. Resets the
* leftComonent
and rightComponent
* instance variables.
*/
// @ts-ignore
public removeAll(): void
/**
* 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.
* @return true
* @see JComponent#revalidate
* @see java.awt.Container#isValidateRoot
* @beaninfo hidden: true
*/
// @ts-ignore
public isValidateRoot(): boolean
/**
* Adds the specified component to this split pane.
* If constraints
identifies the left/top or
* right/bottom child component, and a component with that identifier
* was previously added, it will be removed and then comp
* will be added in its place. If constraints
is not
* one of the known identifiers the layout manager may throw an
* IllegalArgumentException
.
*
* The possible constraints objects (Strings) are: *
constraints
object is null
,
* the component is added in the
* first available position (left/top if open, else right/bottom).
* @param comp the component to add
* @param constraints an Object
specifying the
* layout constraints
* (position) for this component
* @param index an integer specifying the index in the container's
* list.
* @exception IllegalArgumentException if the constraints
* object does not match an existing component
* @see java.awt.Container#addImpl(Component, Object, int)
*/
// @ts-ignore
addImpl(comp: java.awt.Component, constraints: java.lang.Object | any, index: number /*int*/): void
/**
* Subclassed to message the UI with finishedPaintingChildren
* after super has been messaged, as well as painting the border.
* @param g the Graphics
context within which to paint
*/
// @ts-ignore
paintChildren(g: java.awt.Graphics): void
/**
* Returns a string representation of this JSplitPane
.
* This method
* is intended to be used only for debugging purposes, and the
* content and format of the returned string may vary between
* implementations. The returned string may be empty but may not
* be null
.
* @return a string representation of this JSplitPane
.
*/
// @ts-ignore
paramString(): string
/**
* 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.
* @return an AccessibleJSplitPane that serves as the
* AccessibleContext of this JSplitPane
* @beaninfo expert: true
* description: The AccessibleContext associated with this SplitPane.
*/
// @ts-ignore
public getAccessibleContext(): javax.accessibility.AccessibleContext
}
}
}