- すべての実装されたインタフェース:
ImageObserver
,MenuContainer
,Serializable
,Accessible
JSplitPane
は、2つ(2つだけ)のComponent
を分割するために使用されます。 2つのComponent
はルック・アンド・フィールの実装を基準にしてグラフィカルに分割されます。その後、ユーザーは2つのComponent
を対話的にサイズ変更できるようになります。 JSplitPane
の使用方法については、「The Java Tutorial」の「How to Use Split Panes」を参照してください。
分割ペイン内の2つのコンポーネント
は、JSplitPane.HORIZONTAL_SPLIT
を使って左右に、JSplitPane.VERTICAL_SPLIT
を使って上下に並べることができます。 Component
のサイズを変更するには、JSplitPane
の方向に応じてlocation
が新しいxまたはyの位置であるsetDividerLocation
を呼び出すことをお勧めします。
Component
のサイズを目的のサイズに変更するには、resetToPreferredSizes
を呼び出します。
ユーザーがComponent
のサイズを変更するときは、Components
の最小サイズを使用して、Component
に設定できる最大または最小の位置を決めます。 したがって、2つのコンポーネントの最小サイズが分割ペインのサイズより大きい場合、ディバイダはコンポーネントのサイズ変更を許可しません。 JComponent
の最小サイズの変更方法については、JComponent.setMinimumSize(java.awt.Dimension)
を参照してください。
ユーザーが分割ペインのサイズを変更すると、resizeWeight
プロパティに基づき2つのコンポーネントの間に新しいスペースが分配されます。 デフォルトの値0は右または下のコンポーネントがすべてのスペースを取得することを示し、値1は左または上のコンポーネントがすべてのスペースを取得することを示します。
警告: Swingはスレッドに対して安全ではありません。 詳細は、「Swing's Threading Policy」を参照してください。
警告: このクラスの直列化されたオブジェクトは、今後のSwingリリースと互換ではなくなる予定です。 現在の直列化のサポートは、短期間の格納や、同じバージョンのSwingを実行するアプリケーション間のRMIに適しています。 1.4では、すべてのJavaBeansの長期ストレージのサポートがjava.beans
パッケージに追加されました。 XMLEncoder
を参照してください。
- 導入されたバージョン:
- 1.2
- 関連項目:
setDividerLocation(double)
,resetToPreferredSizes()
-
ネストされたクラスのサマリー
修飾子と型クラス説明protected class
このクラスはJSplitPane
クラスのアクセシビリティ・サポートを実装しています。クラス javax.swing.JComponentで宣言されたネストされたクラス/インタフェース
JComponent.AccessibleJComponent
クラス java.awt.Containerで宣言されたネストされたクラス/インタフェース
Container.AccessibleAWTContainer
クラス java.awt.Componentで宣言されたネストされたクラス/インタフェース
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
フィールドのサマリー
修飾子と型フィールド説明static String
Component
をもう一方のComponent
の下に追加するときに使います。static String
continuousLayoutのバウンド・プロパティ名です。protected boolean
サイズ変更の際、ビューが継続して再表示されるかどうかを示します。static String
ディバイダを表すComponent
を追加するときに使います。static String
dividerLocationのバウンド・プロパティです。static String
ボーダーのバウンド・プロパティ名です。protected int
ディバイダのサイズです。static int
水平分割は、Component
がx軸に沿って分割されることを示します。static String
lastLocationのバウンド・プロパティです。protected int
スプリットぺインの以前の位置です。static String
Component
をもう一方のComponent
の左に追加するときに使います。protected Component
左または上のコンポーネントです。static String
oneTouchExpandableのバウンド・プロパティです。protected boolean
スプリットぺインをすばやく展開する/収納するために提供される小さなウィジェットです。protected int
ビューを分割する方法です。static String
方向(水平または垂直)のバウンド・プロパティ名です。static String
ウエイトのバウンド・プロパティです。static String
Component
をもう一方のComponent
の右に追加するときに使います。protected Component
右または下のコンポーネントです。static String
Component
をもう一方のComponent
の上に追加するときに使います。static int
垂直分割は、Component
がy軸に沿って分割されることを示します。クラス javax.swing.JComponentで宣言されたフィールド
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
クラス java.awt.Componentで宣言されたフィールド
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
インタフェース java.awt.image.ImageObserverで宣言されたフィールド
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
コンストラクタのサマリー
コンストラクタ説明コンポーネントの2つのボタンを使って、水平方向に子コンポーネントが並ぶように設定された新しいJSplitPane
を作成します。JSplitPane(int newOrientation)
指定された方向で構成されたで新しいJSplitPane
を作成します。JSplitPane(int newOrientation, boolean newContinuousLayout)
方向と再描画のスタイルを指定して新しいJSplitPane
を作成します。JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)
指定された方向、再描画スタイル、指定されたコンポーネントを使用して新しいJSplitPane
を作成します。JSplitPane(int newOrientation, Component newLeftComponent, Component newRightComponent)
指定された方向と指定されたコンポーネントを使用して新しいJSplitPane
を作成します。 -
メソッドのサマリー
修飾子と型メソッド説明protected void
この分割ペインに指定したコンポーネントを追加します。このJSplitPaneに関連付けられたAccessibleContextを取得します。ディバイダの下または右のコンポーネントを返します。int
setDividerLocation
に渡された最終値を返します。int
ディバイダのサイズを返します。int
ディバイダが置かれていた以前の位置を返します。ディバイダの左(上)にあるコンポーネントを返します。int
ルック・アンド・フィールの実装からディバイダの最大の位置を返します。int
ルック・アンド・フィールの実装からディバイダの最小の位置を返します。int
方向を返します。double
余分なスペースの配分方法を決める数を返します。ディバイダの右(または下)のコンポーネントを返します。ディバイダの上または左のコンポーネントを返します。getUI()
現在のルック・アンド・フィールを提供しているSplitPaneUI
を返します。このコンポーネントを描画するL&Fクラスの名前を返します。boolean
continuousLayout
プロパティを取得します。boolean
oneTouchExpandable
プロパティを取得します。boolean
trueを返すと、JSplitPane
の下位オブジェクトでrevalidate
を呼び出して、JSplitPane
とそのすべての下位オブジェクトを検証する要求がキューをキューに入れることができます。protected void
superにメッセージが送られたあとにfinishedPaintingChildren
を持つUIにメッセージを送り、ボーダーをペイントするために、サブクラス化されます。protected String
このJSplitPane
の文字列表現を返します。void
remove(int index)
指定されたインデックスのComponent
を削除します。void
子コンポーネントcomponent
をペインから削除します。void
分割ペインからすべての子コンポーネントを削除します。void
子コンポーネントの適切なサイズに基づきJSplitPane
を配置します。void
setBottomComponent(Component comp)
コンポーネントをディバイダの下または右に設定します。void
setContinuousLayout(boolean newContinuousLayout)
continuousLayout
プロパティの値を設定します。ユーザーが操作したときに子コンポーネントが連続的に再描画されて配置されるようにするには、この値をtrue
に設定する必要があります。void
setDividerLocation(double proportionalLocation)
JSplitPane
のサイズのパーセンテージとしてディバイダの位置を設定します。void
setDividerLocation(int location)
ディバイダの位置を設定します。void
setDividerSize(int newSize)
ディバイダのサイズを設定します。void
setLastDividerLocation(int newLastLocation)
以前にディバイダが置かれていた位置をnewLastLocation
に設定します。void
setLeftComponent(Component comp)
コンポーネントをディバイダの左(上)に設定します。void
setOneTouchExpandable(boolean newValue)
oneTouchExpandable
プロパティの値を設定します。JSplitPane
がディバイダのUIウィジェットを提供し、ディバイダを迅速に展開/収納するには、この値をtrue
に設定する必要があります。void
setOrientation(int orientation)
方向、またはスプリッタがどのように分割されるかを設定します。void
setResizeWeight(double value)
分割ペインが変更されたときの余分なスペースの配分方法を指定します。void
setRightComponent(Component comp)
ディバイダの右(または下)のコンポーネントを設定します。void
setTopComponent(Component comp)
コンポーネントをディバイダの上または左に設定します。void
setUI(SplitPaneUI ui)
このコンポーネントを描画するL&Fオブジェクトを設定します。void
updateUI()
L&Fが変更されたことを示す、UIManager
からの通知です。クラス javax.swing.JComponentで宣言されたメソッド
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, 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, setVisible, unregisterKeyboardAction, update
クラス java.awt.Containerで宣言されたメソッド
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, 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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
クラス 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, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
フィールド詳細
-
VERTICAL_SPLIT
public static final int VERTICAL_SPLIT垂直分割は、Component
がy軸に沿って分割されることを示します。 たとえば2つのComponent
が上下に並ぶように分割されることを示します。- 関連項目:
- 定数フィールド値
-
HORIZONTAL_SPLIT
public static final int HORIZONTAL_SPLIT水平分割は、Component
がx軸に沿って分割されることを示します。 たとえば2つのComponent
が左右に並ぶように分割されることを示します。- 関連項目:
- 定数フィールド値
-
LEFT
public static final String LEFTComponent
をもう一方のComponent
の左に追加するときに使います。- 関連項目:
- 定数フィールド値
-
RIGHT
public static final String RIGHTComponent
をもう一方のComponent
の右に追加するときに使います。- 関連項目:
- 定数フィールド値
-
TOP
public static final String TOPComponent
をもう一方のComponent
の上に追加するときに使います。- 関連項目:
- 定数フィールド値
-
BOTTOM
public static final String BOTTOMComponent
をもう一方のComponent
の下に追加するときに使います。- 関連項目:
- 定数フィールド値
-
DIVIDER
public static final String DIVIDERディバイダを表すComponent
を追加するときに使います。- 関連項目:
- 定数フィールド値
-
ORIENTATION_PROPERTY
public static final String ORIENTATION_PROPERTY方向(水平または垂直)のバウンド・プロパティ名です。- 関連項目:
- 定数フィールド値
-
CONTINUOUS_LAYOUT_PROPERTY
public static final String CONTINUOUS_LAYOUT_PROPERTYcontinuousLayoutのバウンド・プロパティ名です。- 関連項目:
- 定数フィールド値
-
DIVIDER_SIZE_PROPERTY
public static final String DIVIDER_SIZE_PROPERTYボーダーのバウンド・プロパティ名です。- 関連項目:
- 定数フィールド値
-
ONE_TOUCH_EXPANDABLE_PROPERTY
public static final String ONE_TOUCH_EXPANDABLE_PROPERTYoneTouchExpandableのバウンド・プロパティです。- 関連項目:
- 定数フィールド値
-
LAST_DIVIDER_LOCATION_PROPERTY
public static final String LAST_DIVIDER_LOCATION_PROPERTYlastLocationのバウンド・プロパティです。- 関連項目:
- 定数フィールド値
-
DIVIDER_LOCATION_PROPERTY
public static final String DIVIDER_LOCATION_PROPERTYdividerLocationのバウンド・プロパティです。- 導入されたバージョン:
- 1.3
- 関連項目:
- 定数フィールド値
-
RESIZE_WEIGHT_PROPERTY
public static final String RESIZE_WEIGHT_PROPERTYウエイトのバウンド・プロパティです。- 導入されたバージョン:
- 1.3
- 関連項目:
- 定数フィールド値
-
orientation
protected int orientationビューを分割する方法です。 -
continuousLayout
protected boolean continuousLayoutサイズ変更の際、ビューが継続して再表示されるかどうかを示します。 -
leftComponent
protected Component leftComponent左または上のコンポーネントです。 -
rightComponent
protected Component rightComponent右または下のコンポーネントです。 -
dividerSize
protected int dividerSizeディバイダのサイズです。 -
oneTouchExpandable
protected boolean oneTouchExpandableスプリットぺインをすばやく展開する/収納するために提供される小さなウィジェットです。 -
lastDividerLocation
protected int lastDividerLocationスプリットぺインの以前の位置です。
-
-
コンストラクタの詳細
-
JSplitPane
public JSplitPane()コンポーネントの2つのボタンを使って、水平方向に子コンポーネントが並ぶように設定された新しいJSplitPane
を作成します。 -
JSplitPane
@ConstructorProperties("orientation")public JSplitPane(int newOrientation)指定された方向で構成されたで新しいJSplitPane
を作成します。- パラメータ:
newOrientation
-JSplitPane.HORIZONTAL_SPLIT
またはJSplitPane.VERTICAL_SPLIT
- 例外:
IllegalArgumentException
-orientation
がHORIZONTAL_SPLITまたはVERTICAL_SPLITのどちらでもない場合。
-
JSplitPane
public JSplitPane(int newOrientation, boolean newContinuousLayout)方向と再描画のスタイルを指定して新しいJSplitPane
を作成します。- パラメータ:
newOrientation
-JSplitPane.HORIZONTAL_SPLIT
またはJSplitPane.VERTICAL_SPLIT
newContinuousLayout
- boolean値。ディバイダの位置の変更に合わせてコンポーネントが連続して再描画されるようにする場合はtrue、ディバイダの位置の変更が終了するまで再描画を待機する場合はfalse- 例外:
IllegalArgumentException
-orientation
がHORIZONTAL_SPLITまたはVERTICAL_SPLITのいずれでもない場合
-
JSplitPane
指定された方向と指定されたコンポーネントを使用して新しいJSplitPane
を作成します。- パラメータ:
newOrientation
-JSplitPane.HORIZONTAL_SPLIT
またはJSplitPane.VERTICAL_SPLIT
newLeftComponent
- 水平方向に分割されたペインの左、または垂直方向に分割されたペインの上に表示されるComponent
newRightComponent
- 水平方向に分割されたペインの右、または垂直方向に分割されたペインの下に表示されるComponent
- 例外:
IllegalArgumentException
-orientation
がHORIZONTAL_SPLITまたはVERTICAL_SPLITのどちらでもない場合
-
JSplitPane
public JSplitPane(int newOrientation, boolean newContinuousLayout, Component newLeftComponent, Component newRightComponent)指定された方向、再描画スタイル、指定されたコンポーネントを使用して新しいJSplitPane
を作成します。- パラメータ:
newOrientation
-JSplitPane.HORIZONTAL_SPLIT
またはJSplitPane.VERTICAL_SPLIT
newContinuousLayout
- boolean値。ディバイダの位置の変更に合わせてコンポーネントが連続して再描画されるようにする場合はtrue、ディバイダの位置の変更が終了するまで再描画を待機する場合はfalsenewLeftComponent
- 水平方向に分割されたペインの左、または垂直方向に分割されたペインの上に表示されるComponent
newRightComponent
- 水平方向に分割されたペインの右、または垂直方向に分割されたペインの下に表示されるComponent
- 例外:
IllegalArgumentException
-orientation
がHORIZONTAL_SPLITまたはVERTICAL_SPLITのいずれでもない場合
-
-
メソッドの詳細
-
setUI
public void setUI(SplitPaneUI ui)このコンポーネントを描画するL&Fオブジェクトを設定します。- パラメータ:
ui
-SplitPaneUI
L&Fオブジェクト- 関連項目:
UIDefaults.getUI(javax.swing.JComponent)
-
getUI
@BeanProperty(bound=false, expert=true, description="The L&F object that renders this component.") public SplitPaneUI getUI()現在のルック・アンド・フィールを提供しているSplitPaneUI
を返します。- オーバーライド:
- クラス
JComponent
のgetUI
- 戻り値:
- このコンポーネントをレンダリングする
SplitPaneUI
オブジェクト
-
updateUI
public void updateUI()L&Fが変更されたことを示す、UIManager
からの通知です。 現在のUIオブジェクトをUIManager
の最新バージョンに置き換えます。- オーバーライド:
updateUI
、クラス:JComponent
- 関連項目:
JComponent.updateUI()
-
getUIClassID
@BeanProperty(bound=false, expert=true, description="A string that specifies the name of the L&F class.") public String getUIClassID()このコンポーネントを描画するL&Fクラスの名前を返します。- オーバーライド:
getUIClassID
、クラス:JComponent
- 戻り値:
- SplitPaneUIの文字列
- 関連項目:
JComponent.getUIClassID()
,UIDefaults.getUI(javax.swing.JComponent)
-
setDividerSize
@BeanProperty(description="The size of the divider.")public void setDividerSize(int newSize)ディバイダのサイズを設定します。- パラメータ:
newSize
- ディバイダのサイズをピクセル数で指定するint値
-
getDividerSize
public int getDividerSize()ディバイダのサイズを返します。- 戻り値:
- ディバイダのサイズをピクセル数で指定するint値
-
setLeftComponent
public void setLeftComponent(Component comp)コンポーネントをディバイダの左(上)に設定します。- パラメータ:
comp
- その位置に表示するComponent
-
getLeftComponent
@BeanProperty(bound=false, preferred=true, description="The component to the left (or above) the divider.") public Component getLeftComponent()ディバイダの左(上)にあるコンポーネントを返します。- 戻り値:
- その位置に表示されている
Component
-
setTopComponent
@BeanProperty(bound=false, description="The component above, or to the left of the divider.")public void setTopComponent(Component comp)コンポーネントをディバイダの上または左に設定します。- パラメータ:
comp
- その位置に表示するComponent
-
getTopComponent
public Component getTopComponent()ディバイダの上または左のコンポーネントを返します。- 戻り値:
- その位置に表示されている
Component
-
setRightComponent
@BeanProperty(bound=false, preferred=true, description="The component to the right (or below) the divider.")public void setRightComponent(Component comp)ディバイダの右(または下)のコンポーネントを設定します。- パラメータ:
comp
- その位置に表示するComponent
-
getRightComponent
public Component getRightComponent()ディバイダの右(または下)のコンポーネントを返します。- 戻り値:
- その位置に表示されている
Component
-
setBottomComponent
@BeanProperty(bound=false, description="The component below, or to the right of the divider.")public void setBottomComponent(Component comp)コンポーネントをディバイダの下または右に設定します。- パラメータ:
comp
- その位置に表示するComponent
-
getBottomComponent
public Component getBottomComponent()ディバイダの下または右のコンポーネントを返します。- 戻り値:
- その位置に表示されている
Component
-
setOneTouchExpandable
@BeanProperty(description="UI widget on the divider to quickly expand/collapse the divider.")public void setOneTouchExpandable(boolean newValue)oneTouchExpandable
プロパティの値を設定します。JSplitPane
がディバイダのUIウィジェットを提供し、ディバイダを迅速に展開/収納するには、この値をtrue
に設定する必要があります。 このプロパティのデフォルト値はfalse
です。 ルック・アンド・フィールによっては、ワンタッチの展開がサポートされていない場合があります。その場合、このプロパティは無視されます。- パラメータ:
newValue
- 分割ペインが展開/折りたたみウィジェットを提供するように指定する場合はtrue
- 関連項目:
isOneTouchExpandable()
-
isOneTouchExpandable
public boolean isOneTouchExpandable()oneTouchExpandable
プロパティを取得します。- 戻り値:
oneTouchExpandable
プロパティの値- 関連項目:
setOneTouchExpandable(boolean)
-
setLastDividerLocation
@BeanProperty(description="The last location the divider was at.")public void setLastDividerLocation(int newLastLocation)以前にディバイダが置かれていた位置をnewLastLocation
に設定します。- パラメータ:
newLastLocation
- ディバイダの以前の位置を、ペインの左(または上)端からディバイダの左(または上)端までのピクセル数で指定する整数値
-
getLastDividerLocation
public int getLastDividerLocation()ディバイダが置かれていた以前の位置を返します。- 戻り値:
- ディバイダの以前の位置を、ペインの左(または上)端からディバイダの左(または上)端までのピクセル数で指定する整数値
-
setOrientation
@BeanProperty(enumerationValues={"JSplitPane.HORIZONTAL_SPLIT","JSplitPane.VERTICAL_SPLIT"}, description="The orientation, or how the splitter is divided.")public void setOrientation(int orientation)方向、またはスプリッタがどのように分割されるかを設定します。 オプションは次のとおりです。- JSplitPane.VERTICAL_SPLIT (コンポーネントの上または下の方向)
- JSplitPane.HORIZONTAL_SPLIT (コンポーネントの左または右の方向)
- パラメータ:
orientation
- 方向を指定する整数値- 例外:
IllegalArgumentException
- 方向がHORIZONTAL_SPLITでもVERTICAL_SPLITでもない場合。
-
getOrientation
public int getOrientation()方向を返します。- 戻り値:
- 方向を指定する整数値
- 関連項目:
setOrientation(int)
-
setContinuousLayout
@BeanProperty(description="Whether the child components are continuously redisplayed and laid out during user intervention.")public void setContinuousLayout(boolean newContinuousLayout)continuousLayout
プロパティの値を設定します。ユーザーが操作したときに子コンポーネントが連続的に再描画されて配置されるようにするには、この値をtrue
に設定する必要があります。 このプロパティのデフォルト値はルック・アンド・フィールに依存します。 ルック・アンド・フィールによっては、連続したレイアウトがサポートされていない場合があります。その場合、このプロパティは無視されます。- パラメータ:
newContinuousLayout
- ディバイダの位置が変更されたときにコンポーネントが連続的に再描画される場合はtrue
- 関連項目:
isContinuousLayout()
-
isContinuousLayout
public boolean isContinuousLayout()continuousLayout
プロパティを取得します。- 戻り値:
continuousLayout
プロパティの値- 関連項目:
setContinuousLayout(boolean)
-
setResizeWeight
@BeanProperty(description="Specifies how to distribute extra space when the split pane resizes.")public void setResizeWeight(double value)分割ペインが変更されたときの余分なスペースの配分方法を指定します。 デフォルトの値0は、左または上のコンポーネントが固定され右または下のコンポーネントがすべての余分なスペースを取得することを示し、値1は右または下のコンポーネントが固定され左または上のコンポーネントがすべての余分なスペースを取得することを示します。 具体的には、左/上のコンポーネントは、(ウェイト * 差)の余分なスペースを取得し、右/下のコンポーネントは、((1 - ウェイト) * 差) の余分なスペースを取得します。- パラメータ:
value
- 上記のとおり- 例外:
IllegalArgumentException
-value
が0より小さいか、1より大きい場合- 導入されたバージョン:
- 1.3
-
getResizeWeight
public double getResizeWeight()余分なスペースの配分方法を決める数を返します。- 戻り値:
- 分割ペインのサイズ変更時の余分なスペースの配分方法
- 導入されたバージョン:
- 1.3
-
resetToPreferredSizes
public void resetToPreferredSizes()子コンポーネントの適切なサイズに基づきJSplitPane
を配置します。 通常は、これによってディバイダの位置が変わります。 -
setDividerLocation
@BeanProperty(description="The location of the divider.")public void setDividerLocation(double proportionalLocation)JSplitPane
のサイズのパーセンテージとしてディバイダの位置を設定します。このメソッドは
setDividerLocation(int)
に基づいて実装されます。 このメソッドは現在のサイズに基づき分割ペインのサイズをただちに変更します。 分割ペインがスクリーン上で正しく実現されない場合、新しいディバイダの位置は現在のサイズ* proportionalLocationが0になり、このメソッドの効果はありません。- パラメータ:
proportionalLocation
- 0 (上または左)から1.0 (下または右)までのパーセンテージを指定する倍精度浮動小数点値- 例外:
IllegalArgumentException
- 指定された位置が0より小さいか、1.0より大きい場合
-
setDividerLocation
@BeanProperty(description="The location of the divider.")public void setDividerLocation(int location)ディバイダの位置を設定します。 これは、ルック・アンド・フィールの実装に渡されてからリスナーに通知されます。 0より小さい値は、ディバイダが左または上のコンポーネントの適切なサイズの値にリセットされる必要があることを意味しています。 リスナーに通知してから、最終的なディバイダの位置がsetLastDividerLocation
により変更されます。- パラメータ:
location
- UI固有の値(通常はピクセル数)を指定するint値
-
getDividerLocation
public int getDividerLocation()setDividerLocation
に渡された最終値を返します。 このメソッドで返された値は、setDividerLocation
に渡された値が現在のサイズより大きい場合は、実際のディバイダの位置と異なる場合があります。- 戻り値:
- ディバイダの位置を指定するint値
-
getMinimumDividerLocation
@BeanProperty(bound=false, description="The minimum location of the divider from the L&F.") public int getMinimumDividerLocation()ルック・アンド・フィールの実装からディバイダの最小の位置を返します。- 戻り値:
- 最小の位置のUI固有の値(通常はピクセル数)を指定するint値。UIが
null
の場合は -1
-
getMaximumDividerLocation
@BeanProperty(bound=false) public int getMaximumDividerLocation()ルック・アンド・フィールの実装からディバイダの最大の位置を返します。- 戻り値:
- 最大の位置のUI固有の値(通常はピクセル数)を指定するint値。UIが
null
の場合は -1
-
remove
public void remove(Component component)子コンポーネントcomponent
をペインから削除します。 必要に応じて、leftComponent
またはrightComponent
インスタンス変数をリセットします。- オーバーライド:
remove
、クラス:Container
- パラメータ:
component
- 削除するComponent
- 関連項目:
Container.add(java.awt.Component)
,Container.invalidate()
,Container.validate()
,Container.remove(int)
-
remove
public void remove(int index)指定されたインデックスのComponent
を削除します。 必要に応じて、leftComponent
およびrightComponent
インスタンス変数を変更してから、スーパー・クラスにメッセージを送ります。- オーバーライド:
remove
、クラス:Container
- パラメータ:
index
- 削除するコンポーネントを指定するint値。1では左または上のコンポーネントが指定され、2では下または右のコンポーネントが指定される- 関連項目:
Container.add(java.awt.Component)
,Container.invalidate()
,Container.validate()
,Container.getComponentCount()
-
removeAll
public void removeAll()分割ペインからすべての子コンポーネントを削除します。leftComonent
およびrightComponent
インスタンス変数をリセットします。- オーバーライド:
removeAll
、クラス:Container
- 関連項目:
Container.add(java.awt.Component)
,Container.remove(int)
,Container.invalidate()
-
isValidateRoot
@BeanProperty(hidden=true) public boolean isValidateRoot()trueを返すと、JSplitPane
の下位オブジェクトでrevalidate
を呼び出して、JSplitPane
とそのすべての下位オブジェクトを検証する要求がキューをキューに入れることができます。- オーバーライド:
isValidateRoot
、クラス:JComponent
- 戻り値:
- true
- 関連項目:
JComponent.revalidate()
,Container.isValidateRoot()
-
addImpl
この分割ペインに指定したコンポーネントを追加します。constraints
が左または上あるいは右または下の子コンポーネントを識別し、その識別子を持つコンポーネントが以前に追加されている場合は、それを削除してから、その位置にcomp
を追加します。constraints
が既知の識別子でない場合、レイアウト・マネージャはIllegalArgumentException
をスローします。指定できる制約オブジェクト(String)は次のとおりです。
- JSplitPane.TOP
- JSplitPane.LEFT
- JSplitPane.BOTTOM
- JSplitPane.RIGHT
constraints
オブジェクトがnull
の場合、利用可能な最初の位置にコンポーネントが追加されます(開いている場合は左または上、そうでない場合は右または下)。- オーバーライド:
addImpl
、クラス:Container
- パラメータ:
comp
- 追加するコンポーネントconstraints
- このコンポーネントのレイアウト制約(位置)を指定するObject
index
- コンテナ・リスト内のインデックスを指定するint値。- 例外:
IllegalArgumentException
-constraints
オブジェクトが既存のコンポーネントに一致しない場合- 関連項目:
Container.addImpl(Component, Object, int)
-
paintChildren
protected void paintChildren(Graphics g)superにメッセージが送られたあとにfinishedPaintingChildren
を持つUIにメッセージを送り、ボーダーをペイントするために、サブクラス化されます。- オーバーライド:
paintChildren
、クラス:JComponent
- パラメータ:
g
- ペイント先となるGraphics
コンテキスト- 関連項目:
JComponent.paint(java.awt.Graphics)
,Container.paint(java.awt.Graphics)
-
paramString
protected String paramString()このJSplitPane
の文字列表現を返します。 このメソッドはデバッグ専用であり、返される文字列の内容および形式は実装によって異なります。 返される文字列は空の場合がありますが、null
にはなりません。- オーバーライド:
paramString
、クラス:JComponent
- 戻り値:
- この
JSplitPane
を表す文字列表現。
-
getAccessibleContext
@BeanProperty(bound=false, expert=true, description="The AccessibleContext associated with this SplitPane.") public AccessibleContext getAccessibleContext()このJSplitPaneに関連付けられたAccessibleContextを取得します。 分割ペインの場合、AccessibleContextはAccessibleJSplitPaneの形式を取ります。 必要に応じて新規のAccessibleJSplitPaneインスタンスが作成されます。- 定義:
getAccessibleContext
、インタフェース:Accessible
- オーバーライド:
getAccessibleContext
、クラス:Component
- 戻り値:
- このJSplitPaneのAccessibleContextとして機能するAccessibleJSplitPane
-