|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectto.tetramorph.starbase.chartparts.GComponent
to.tetramorph.starbase.chartparts.GBoxLayout
public class GBoxLayout
ZodiacPanel上に文字をレイアウトするための部品。 TextReporterなどの文字部品をこのオブジェクトにaddして使用する。 整列方法はSwingのBoxLayoutと概念的には同じで、縦方向(上から下)または横方向(左か ら右)に連続して部品を配置する。各部品との隙間は、各部品ごとにインセット値を設定 することによって行う。
フィールドの概要 | |
---|---|
static int |
HORIZONTAL
|
static int |
VERTICAL
|
クラス to.tetramorph.starbase.chartparts.GComponent から継承されたフィールド |
---|
baseWidth, bgColor, BOTTOM, CENTER, g, gcl, insets, LEFT, RIGHT, TOP |
インタフェース to.tetramorph.starbase.chartparts.GLayout から継承されたフィールド |
---|
G_BOTTOM, G_CENTER, G_LEFT, G_RIGHT, G_TOP |
コンストラクタの概要 | |
---|---|
GBoxLayout(int direction)
GLayout オブジェクトを作成する 縦方向にレイアウトする場合はVERTICAL,水平方向ならHORIZONTALを指定。 |
メソッドの概要 | |
---|---|
void |
add(GComponent... rps)
子のGComponentを追加する。 |
void |
add(GComponent rp)
子のGComponentを追加する。 |
GComponent |
contains(int x,
int y)
このレイアウトに格納されているGComponent(GLabelやGBoxLayout)に、指定座標が 含まれる場合はその部品を返す。 |
void |
draw()
|
protected void |
draw(double x,
double y)
描画する。 |
int |
getComponentCount()
このレイアウトに格納されている子のコンポーネントの数を返す。 |
Rectangle2D.Float |
getFullSize()
部品サイズにインセットを加算したサイズを返す。 |
Rectangle2D.Float |
getSize()
部品のサイズを返す。 |
void |
removeAll()
子をGComponentをすべて削除する。 |
void |
setBasePoint(Point2D basePoint)
原点となる座標を指定する。 |
void |
setBaseWidth(float baseWidth)
このオブジェクトと格納されているすべてのGComponentにBaseWidthを設定する。 |
void |
setGraphics(Graphics2D g)
このオブジェクトと格納されているすべてのGComponentにGraphicsを設定する。 |
void |
setLocation(double xper,
double yper)
このレイアウトを表示する位置を、baseWidthに対するパーセントで指定する。 |
void |
setLocation(double xper,
double yper,
int align,
int valign)
このレイアウトを表示する位置を、baseWidthに対するパーセントで、縦と横の アラインを一括セットする。 |
void |
setup()
描画の準備をする。 |
クラス to.tetramorph.starbase.chartparts.GComponent から継承されたメソッド |
---|
getActionCommand, getAlign, getBGColor, getGComponentListener, getInset, getVAlign, setActionCommand, setAlign, setAligns, setBGColor, setGComponentListener, setInset, setInsets, setVAlign |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
インタフェース to.tetramorph.starbase.chartparts.GLayout から継承されたメソッド |
---|
getGComponentListener |
フィールドの詳細 |
---|
public static final int HORIZONTAL
public static final int VERTICAL
コンストラクタの詳細 |
---|
public GBoxLayout(int direction)
メソッドの詳細 |
---|
public void add(GComponent rp)
IllegalArgumentException
- 引数にnullを指定した場合。public void add(GComponent... rps)
IllegalArgumentException
- 引数の要素がゼロの場合public void removeAll()
public int getComponentCount()
public void setLocation(double xper, double yper)
GLayout
内の setLocation
xper
- 横軸の表示位置。0-100[%]で指定。yper
- 縦軸の表示位置。0-100[%]で指定。public void setLocation(double xper, double yper, int align, int valign)
xper
- 横軸の表示位置。0-100[%]で指定。yper
- 縦軸の表示位置。0-100[%]で指定。public void setBaseWidth(float baseWidth)
GLayout
内の setBaseWidth
GComponent
内の setBaseWidth
public void setGraphics(Graphics2D g)
GLayout
内の setGraphics
GComponent
内の setGraphics
protected void draw(double x, double y)
GComponent
の記述:
GComponent
内の draw
public void draw()
GLayout
内の draw
public void setBasePoint(Point2D basePoint)
GLayout
の記述:
GLayout
内の setBasePoint
public Rectangle2D.Float getSize()
GComponent
の記述:
GComponent
内の getSize
public Rectangle2D.Float getFullSize()
GComponent
の記述:
GComponent
内の getFullSize
public void setup()
GComponent
の記述:
GLayout
内の setup
GComponent
内の setup
public GComponent contains(int x, int y)
GLayout
内の contains
GComponent
内の contains
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |