Kagetaka

net.hizlab.kagetaka.awt
クラス LayoutUtils

java.lang.Object
  拡張net.hizlab.kagetaka.awt.LayoutUtils

public final class LayoutUtils
extends Object

AWT ユーティリティクラスです。

バージョン:
$Revision: 1.1.1.1 $

メソッドの概要
static void addGridBag(Container container, Component comp, GridBagLayout gbl, int x, int y, int width, int height, double weightx, double weighty, int fill, int anchor, Insets insets)
          コンテナにコンポーネントを指定した引数で追加します。
static Frame getFrame(Component comp)
          指定されたコンポーネントのフレームを返します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

addGridBag

public static void addGridBag(Container container,
                              Component comp,
                              GridBagLayout gbl,
                              int x,
                              int y,
                              int width,
                              int height,
                              double weightx,
                              double weighty,
                              int fill,
                              int anchor,
                              Insets insets)
コンテナにコンポーネントを指定した引数で追加します。 このメソッドは、GridBagLayout を利用する際の簡易メソッドです。 従って、引数は GridBagLayout のもので、 事前にコンテナのレイアウトマネージャを GridBagLayout に設定しておく必要があります。

パラメータ:
container - コンテナ
comp - 追加するコンポーネント
gbl - レイアウトマネージャ
x - GridBagConstraints.gridx
y - GridBagConstraints.gridy
width - GridBagConstraints.gridwidth
height - GridBagConstraints.gridheight
weightx - GridBagConstraints.weightx
weighty - GridBagConstraints.weighty
fill - GridBagConstraints.fill
anchor - GridBagConstraints.anchor
insets - GridBagConstraints.insets

getFrame

public static Frame getFrame(Component comp)
指定されたコンポーネントのフレームを返します。

パラメータ:
comp - コンポーネント
戻り値:
フレーム、 コンポーネントがフレームに属していない場合は null

Kagetaka

Copyright (c) 2002-2004 The Kagetaka Project 'November 20, 2004'