jp.hishidama.swing.layout
クラス GroupLayoutUtil

java.lang.Object
  上位を拡張 jp.hishidama.swing.layout.GroupLayoutUtil

public class GroupLayoutUtil
extends Object

GroupLayoutユーティリティー.

コンポーネントの二次元配列をGroupLayoutで配置する。
使用例

※当クラスはインスタンスフィールドに個別の値を保持するので、MTセーフではない。

導入されたバージョン:
2009.11.06
バージョン:
2009.11.07
作成者:
ひしだま

入れ子のクラスの概要
static class GroupLayoutUtil.Gap
          ギャップ指定コンポーネント.
 
フィールドの概要
static Component SAME_L
          配列の左側と同じコンポーネントを配置する
static Component SAME_U
          配列の上側と同じコンポーネントを配置する
 
コンストラクタの概要
GroupLayoutUtil()
          コンストラクター.
 
メソッドの概要
 Component getComponent(int x, int y)
          コンポーネント取得.
 Component[][] getComponents()
          コンポーネント配列取得.
 GroupLayout getGroupLayout()
          GroupLayout取得.
 int getXSize()
          コンポーネント配列の横方向の個数を取得.
 int getYSize()
          コンポーネント配列の縦方向の個数を取得.
 void setComponents(Component[][] components)
          コンポーネント配列設定.
 void setGroupLayoutTo(Container container)
          GroupLayout設定.
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

SAME_L

public static final Component SAME_L
配列の左側と同じコンポーネントを配置する


SAME_U

public static final Component SAME_U
配列の上側と同じコンポーネントを配置する

コンストラクタの詳細

GroupLayoutUtil

public GroupLayoutUtil()
コンストラクター.

メソッドの詳細

setComponents

public void setComponents(Component[][] components)
コンポーネント配列設定.

パラメータ:
components - コンポーネントの二次元配列

getComponents

public Component[][] getComponents()
コンポーネント配列取得.

戻り値:
コンポーネントの二次元配列

getXSize

public int getXSize()
コンポーネント配列の横方向の個数を取得.

戻り値:
配列数

getYSize

public int getYSize()
コンポーネント配列の縦方向の個数を取得.

戻り値:
配列数

getComponent

public Component getComponent(int x,
                              int y)
コンポーネント取得.

パラメータ:
x - X
y - Y
戻り値:
コンポーネント(配列の範囲外の場合はnull)

setGroupLayoutTo

public void setGroupLayoutTo(Container container)
GroupLayout設定.

コンポーネントを配置したGroupLayoutを生成し、指定されたコンテナに登録する。

パラメータ:
container - コンテナ

getGroupLayout

public GroupLayout getGroupLayout()
GroupLayout取得.

setGroupLayoutTo(Container)を呼んでからでないと、nullが返る。

戻り値:
GroupLayout
関連項目:
setGroupLayoutTo(Container)