Java プラットフォーム 1.2

javax.swing.plaf.basic
クラス BasicSplitPaneUI.BasicHorizontalLayoutManager

java.lang.Object
  |
  +--javax.swing.plaf.basic.BasicSplitPaneUI.BasicHorizontalLayoutManager
直接の既知のサブクラス:
BasicSplitPaneUI.BasicVerticalLayoutManager

public class BasicSplitPaneUI.BasicHorizontalLayoutManager
extends Object
implements LayoutManager2

HORIZONTAL_SPLIT 方向の JSplitPane の LayoutManager です。

この内部クラスは public とマークされますが、これはコンパイラのバグが原因です。このクラスは、protected 内部クラスとして扱われます。このクラスのインスタンス生成は、BasicSplitPaneUI のサブクラス内だけで行なってください。


フィールドの概要
protected  Component[] components
           
protected  int[] sizes
           
 
メソッドの概要
 void addLayoutComponent(Component comp, Object constraints)
          指定された制約オブジェクトを使って、指定されたコンポーネントをレイアウトに追加します。
 void addLayoutComponent(String place, Component component)
          コンポーネントを place に追加します。
protected  int getAvailableSize(Dimension containerSize, Insets insets)
          コンテナのサイズとインセットに基づいて有効な幅を返します。
protected  int getInitialLocation(Insets insets)
          Insets が null でない限り、左インセットを返します。
 float getLayoutAlignmentX(Container target)
          x 軸に沿った配置方法を返します。
 float getLayoutAlignmentY(Container target)
          y 軸に沿った配置方法を返します。
protected  int getPreferredSizeOfComponent(Component c)
          渡された Component の適切なサイズの幅を返します。
protected  int getSizeOfComponent(Component c)
          渡されたコンポーネントの幅を返します。
protected  int[] getSizes()
          コンポーネントのサイズを返します。
 void invalidateLayout(Container c)
          何も行われません。
 void layoutContainer(Container container)
          実際のレイアウトを計算します。
 Dimension maximumLayoutSize(Container target)
          最大のレイアウトサイズを返します。
 Dimension minimumLayoutSize(Container container)
          子を格納するために必要な最小サイズを返します。
 Dimension preferredLayoutSize(Container container)
          子を格納するための適切なサイズを返します。
 void removeLayoutComponent(Component component)
          指定されたコンポーネントを削除します。
protected  void resetSizeAt(int index)
          渡された位置にある Component のサイズをリセットします。
 void resetToPreferredSizes()
          キャッシュに格納されているサイズをリセットします。
protected  void setComponentToSize(Component c, int size, int location, Insets insets, Dimension containerSize)
          x 位置を location、y 位置を insets.top に配置することにより、コンポーネント c の幅を size に設定し、その高さを containersize.height から上インセットと下インセットを減算した値に設定します。
protected  void setSizes(int[] newSizes)
          サイズを newSizes に設定します。
protected  void updateComponents()
          コンポーネントを指定します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

sizes

protected int[] sizes

components

protected Component[] components
メソッドの詳細

resetSizeAt

protected void resetSizeAt(int index)
渡された位置にある Component のサイズをリセットします。

setSizes

protected void setSizes(int[] newSizes)
サイズを newSizes に設定します。

getSizes

protected int[] getSizes()
コンポーネントのサイズを返します。

getPreferredSizeOfComponent

protected int getPreferredSizeOfComponent(Component c)
渡された Component の適切なサイズの幅を返します。

getSizeOfComponent

protected int getSizeOfComponent(Component c)
渡されたコンポーネントの幅を返します。

getAvailableSize

protected int getAvailableSize(Dimension containerSize,
                               Insets insets)
コンテナのサイズとインセットに基づいて有効な幅を返します。

getInitialLocation

protected int getInitialLocation(Insets insets)
Insets が null でない限り、左インセットを返します。null の場合は 0 を返します。

setComponentToSize

protected void setComponentToSize(Component c,
                                  int size,
                                  int location,
                                  Insets insets,
                                  Dimension containerSize)
x 位置を location、y 位置を insets.top に配置することにより、コンポーネント c の幅を size に設定し、その高さを containersize.height から上インセットと下インセットを減算した値に設定します。

layoutContainer

public void layoutContainer(Container container)
実際のレイアウトを計算します。

addLayoutComponent

public void addLayoutComponent(String place,
                               Component component)
コンポーネントを place に追加します。place は、JSplitPane.LEFT、RIGHT、TOP、BOTTOM、または null (ディバイダの場合) のどれかでなければなりません。

minimumLayoutSize

public Dimension minimumLayoutSize(Container container)
子を格納するために必要な最小サイズを返します。幅はそれぞれの子の最小幅の合計、高さはそれぞれの子の最小の高さの最大値です。

preferredLayoutSize

public Dimension preferredLayoutSize(Container container)
子を格納するための適切なサイズを返します。幅はそれぞれの子の適切な幅の合計、高さはそれぞれの子の適切な高さの最大値です。

removeLayoutComponent

public void removeLayoutComponent(Component component)
指定されたコンポーネントを削除します。

addLayoutComponent

public void addLayoutComponent(Component comp,
                               Object constraints)
指定された制約オブジェクトを使って、指定されたコンポーネントをレイアウトに追加します。
定義:
インタフェース LayoutManager2 内の addLayoutComponent
パラメータ:
comp - 追加されるコンポーネント
constraints - レイアウトにコンポーネントが追加される位置または方法

getLayoutAlignmentX

public float getLayoutAlignmentX(Container target)
x 軸に沿った配置方法を返します。ほかのコンポーネントの位置を基準にして、コンポーネントの配置方法が指定されます。値は、0 〜 1 の範囲の数値でなければなりません。0 は原点に沿った配置を表し、1 は原点からもっとも離れた位置への配置を表し、0.5 はその中間です。
定義:
インタフェース LayoutManager2 内の getLayoutAlignmentX

getLayoutAlignmentY

public float getLayoutAlignmentY(Container target)
y 軸に沿った配置方法を返します。ほかのコンポーネントの位置を基準にして、コンポーネントの配置方法が指定されます。値は、0 〜 1 の範囲の数値でなければなりません。0 は原点に沿った配置を表し、1 は原点からもっとも離れた位置への配置を表し、0.5 はその中間です。
定義:
インタフェース LayoutManager2 内の getLayoutAlignmentY

invalidateLayout

public void invalidateLayout(Container c)
何も行われません。ビューのどれかのサイズを変更する場合、開発者は JSplitPane.resetToPreferredSizes をメッセージとして送る必要があります。
定義:
インタフェース LayoutManager2 内の invalidateLayout

maximumLayoutSize

public Dimension maximumLayoutSize(Container target)
最大のレイアウトサイズを返します。両方向とも Integer.MAX_VALUE です。
定義:
インタフェース LayoutManager2 内の maximumLayoutSize

resetToPreferredSizes

public void resetToPreferredSizes()
キャッシュに格納されているサイズをリセットします。この結果、次に配置されるときに、このインスタンスは適切なサイズを尋ねます。

updateComponents

protected void updateComponents()
コンポーネントを指定します。このメソッドは、新しいインスタンスが既存の SplitPane にインストールされるときに必ず呼び出されます。

Java プラットフォーム 1.2

バグや機能要求の報告
新しい javadoc の表示についてのコメントやご提案
Java は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.