- すべての実装されたインタフェース:
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
- 関連項目:
-
ネストされたクラスのサマリー
ネストされたクラス修飾子と型クラス説明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 final StringComponentをもう一方のComponentの下に追加するときに使います。static final StringcontinuousLayoutのバウンド・プロパティ名です。protected booleanサイズ変更の際、ビューが継続して再表示されるかどうかを示します。static final Stringディバイダを表すComponentを追加するときに使います。static final StringdividerLocationのバウンド・プロパティです。static final Stringボーダーのバウンド・プロパティ名です。protected intディバイダのサイズです。static final int水平分割は、Componentがx軸に沿って分割されることを示します。static final StringlastLocationのバウンド・プロパティです。protected intスプリットぺインの以前の位置です。static final StringComponentをもう一方のComponentの左に追加するときに使います。protected Component左または上のコンポーネントです。static final StringoneTouchExpandableのバウンド・プロパティです。protected booleanスプリットぺインをすばやく展開する/収納するために提供される小さなウィジェットです。protected intビューを分割する方法です。static final String方向(水平または垂直)のバウンド・プロパティ名です。static final Stringウエイトのバウンド・プロパティです。static final StringComponentをもう一方のComponentの右に追加するときに使います。protected Component右または下のコンポーネントです。static final StringComponentをもう一方のComponentの上に追加するときに使います。static final 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を取得します。ディバイダの下または右のコンポーネントを返します。intsetDividerLocationに渡された最終値を返します。intディバイダのサイズを返します。intディバイダが置かれていた以前の位置を返します。ディバイダの左(上)にあるコンポーネントを返します。intルック・アンド・フィールの実装からディバイダの最大の位置を返します。intルック・アンド・フィールの実装からディバイダの最小の位置を返します。int方向を返します。double余分なスペースの配分方法を決める数を返します。ディバイダの右(または下)のコンポーネントを返します。ディバイダの上または左のコンポーネントを返します。getUI()現在のルック・アンド・フィールを提供しているSplitPaneUIを返します。このコンポーネントをレンダリングするL&Fクラスの名前を返します。booleancontinuousLayoutプロパティを取得します。booleanoneTouchExpandableプロパティを取得します。booleantrueを返すと、JSplitPaneの下位オブジェクトでrevalidateを呼び出して、JSplitPaneとそのすべての下位オブジェクトを検証する要求がキューをキューに入れることができます。protected voidsuperにメッセージが送られたあとにfinishedPaintingChildrenを持つUIにメッセージを送り、ボーダーをペイントするために、サブクラス化されます。protected StringこのJSplitPaneの文字列表現を返します。voidremove(int index) 指定されたインデックスのComponentを削除します。void子コンポーネントcomponentをペインから削除します。void分割ペインからすべての子コンポーネントを削除します。void子コンポーネントの適切なサイズに基づきJSplitPaneを配置します。voidsetBottomComponent(Component comp) コンポーネントをディバイダの下または右に設定します。voidsetContinuousLayout(boolean newContinuousLayout) continuousLayoutプロパティの値を設定します。ユーザーが操作したときに子コンポーネントが連続的に再描画されて配置されるようにするには、この値をtrueに設定する必要があります。voidsetDividerLocation(double proportionalLocation) JSplitPaneのサイズのパーセンテージとしてディバイダの位置を設定します。voidsetDividerLocation(int location) ディバイダの位置を設定します。voidsetDividerSize(int newSize) ディバイダのサイズを設定します。voidsetLastDividerLocation(int newLastLocation) 以前にディバイダが置かれていた位置をnewLastLocationに設定します。voidsetLeftComponent(Component comp) コンポーネントをディバイダの左(上)に設定します。voidsetOneTouchExpandable(boolean newValue) oneTouchExpandableプロパティの値を設定します。JSplitPaneがディバイダのUIウィジェットを提供し、ディバイダを迅速に展開/収納するには、この値をtrueに設定する必要があります。voidsetOrientation(int orientation) 方向、またはスプリッタがどのように分割されるかを設定します。voidsetResizeWeight(double value) 分割ペインが変更されたときの余分なスペースの配分方法を指定します。voidsetRightComponent(Component comp) ディバイダの右(または下)のコンポーネントを設定します。voidsetTopComponent(Component comp) コンポーネントをディバイダの上または左に設定します。voidsetUI(SplitPaneUI ui) このコンポーネントをレンダリングするL&Fオブジェクトを設定します。voidupdateUI()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
-
RIGHT
-
TOP
-
BOTTOM
-
DIVIDER
-
ORIENTATION_PROPERTY
-
CONTINUOUS_LAYOUT_PROPERTY
-
DIVIDER_SIZE_PROPERTY
-
ONE_TOUCH_EXPANDABLE_PROPERTY
-
LAST_DIVIDER_LOCATION_PROPERTY
-
DIVIDER_LOCATION_PROPERTY
public static final String DIVIDER_LOCATION_PROPERTYdividerLocationのバウンド・プロパティです。- 導入されたバージョン:
- 1.3
- 関連項目:
-
RESIZE_WEIGHT_PROPERTY
-
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_SPLITnewContinuousLayout- boolean値。ディバイダの位置の変更に合わせてコンポーネントが連続して再描画されるようにする場合はtrue、ディバイダの位置の変更が終了するまで再描画を待機する場合はfalse- 例外:
IllegalArgumentException-orientationがHORIZONTAL_SPLITまたはVERTICAL_SPLITのいずれでもない場合
-
JSplitPane
指定された方向と指定されたコンポーネントを使用して新しいJSplitPaneを作成します。- パラメータ:
newOrientation-JSplitPane.HORIZONTAL_SPLITまたはJSplitPane.VERTICAL_SPLITnewLeftComponent- 水平方向に分割されたペインの左、または垂直方向に分割されたペインの上に表示されるComponentnewRightComponent- 水平方向に分割されたペインの右、または垂直方向に分割されたペインの下に表示される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_SPLITnewContinuousLayout- boolean値。ディバイダの位置の変更に合わせてコンポーネントが連続して再描画されるようにする場合はtrue、ディバイダの位置の変更が終了するまで再描画を待機する場合はfalsenewLeftComponent- 水平方向に分割されたペインの左、または垂直方向に分割されたペインの上に表示されるComponentnewRightComponent- 水平方向に分割されたペインの右、または垂直方向に分割されたペインの下に表示されるComponent- 例外:
IllegalArgumentException-orientationがHORIZONTAL_SPLITまたはVERTICAL_SPLITのいずれでもない場合
-
-
メソッドの詳細
-
setUI
public void setUI(SplitPaneUI ui) このコンポーネントをレンダリングするL&Fオブジェクトを設定します。- パラメータ:
ui-SplitPaneUIL&Fオブジェクト- 関連項目:
-
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- 関連項目:
-
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の文字列
- 関連項目:
-
setDividerSize
@BeanProperty(description="The size of the divider.") public void setDividerSize(int newSize) ディバイダのサイズを設定します。 ディバイダ・サイズnewSize < 0は無視されます。- パラメータ:
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
-
setRightComponent
@BeanProperty(bound=false, preferred=true, description="The component to the right (or below) the divider.") public void setRightComponent(Component comp) ディバイダの右(または下)のコンポーネントを設定します。- パラメータ:
comp- その位置に表示するComponent
-
getRightComponent
-
setBottomComponent
@BeanProperty(bound=false, description="The component below, or to the right of the divider.") public void setBottomComponent(Component comp) コンポーネントをディバイダの下または右に設定します。- パラメータ:
comp- その位置に表示するComponent
-
getBottomComponent
-
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
public boolean isOneTouchExpandable()oneTouchExpandableプロパティを取得します。- 戻り値:
oneTouchExpandableプロパティの値- 関連項目:
-
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()方向を返します。- 戻り値:
- 方向を指定する整数値
- 関連項目:
-
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
public boolean isContinuousLayout()continuousLayoutプロパティを取得します。- 戻り値:
continuousLayoutプロパティの値- 関連項目:
-
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
-
remove
-
removeAll
-
isValidateRoot
@BeanProperty(hidden=true) public boolean isValidateRoot()trueを返すと、JSplitPaneの下位オブジェクトでrevalidateを呼び出して、JSplitPaneとそのすべての下位オブジェクトを検証する要求がキューをキューに入れることができます。- オーバーライド:
isValidateRoot、クラスJComponent- 戻り値:
- true
- 関連項目:
-
addImpl
この分割ペインに指定したコンポーネントを追加します。constraintsが左または上あるいは右または下の子コンポーネントを識別し、その識別子を持つコンポーネントが以前に追加されている場合は、それを削除してから、その位置にcompを追加します。constraintsが既知の識別子でない場合、レイアウト・マネージャはIllegalArgumentExceptionをスローします。指定できる制約オブジェクト(String)は次のとおりです。
- JSplitPane.TOP
- JSplitPane.LEFT
- JSplitPane.BOTTOM
- JSplitPane.RIGHT
constraintsオブジェクトがnullの場合、利用可能な最初の位置にコンポーネントが追加されます(開いている場合は左または上、そうでない場合は右または下)。- オーバーライド:
addImpl、クラスContainer- パラメータ:
comp- 追加するコンポーネントconstraints- このコンポーネントのレイアウト制約(位置)を指定するObjectindex- コンテナ・リスト内のインデックスを指定するint値。- 例外:
IllegalArgumentException-constraintsオブジェクトが既存のコンポーネントに一致しない場合- 関連項目:
-
paintChildren
protected void paintChildren(Graphics g) superにメッセージが送られたあとにfinishedPaintingChildrenを持つUIにメッセージを送り、ボーダーをペイントするために、サブクラス化されます。- オーバーライド:
paintChildren、クラスJComponent- パラメータ:
g- ペイント先となる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
-