|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Object | +--javax.swing.PopupFactory
PopupFactory は、名前からわかるように、Popup のインスタンスを取得するために使います。Popup は、特定の包含関係の階層に存在する他のすべての Component の上に Component を配置するために使用します。汎用規約では、PopupFactory から Popup を取得した場合、その Popup に対して hide を呼び出す必要があります。通常は、次のように使います。
PopupFactory factory = PopupFactory.getSharedInstance(); Popup popup = factory.getPopup(owner, contents, x, y); popup.show(); ... popup.hide();
Popup| コンストラクタの概要 | |
PopupFactory()
|
|
| メソッドの概要 | |
Popup |
getPopup(Component owner,
Component contents,
int x,
int y)
コンポーネント contents を含むコンポーネント owner の Popup を作成します。 |
static PopupFactory |
getSharedInstance()
Popup を取得するために使うことのできる共有 PopupFactory を返します。 |
static void |
setSharedInstance(PopupFactory factory)
AppContext 固有の PopupFactory を設定します。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
public PopupFactory()
| メソッドの詳細 |
public static void setSharedInstance(PopupFactory factory)
AppContext 固有の PopupFactory を設定します。factory が null の場合、IllegalArgumentException をスローします。
factory - 共有 PopupFactory
IllegalArgumentException - factory が null の場合public static PopupFactory getSharedInstance()
Popup を取得するために使うことのできる共有 PopupFactory を返します。
public Popup getPopup(Component owner,
Component contents,
int x,
int y)
throws IllegalArgumentException
contents を含むコンポーネント owner の Popup を作成します。owner は、どの Window (新しい Popup) が Popup の作成先の Component の親となるかを指定するために使用します。owner が null の場合、有効な親がないことを示します。x と y には、Popup を最初に配置する位置を指定します。画面のサイズや他のパラメータによっては、Popup が x と y に表示されないことがあります。
owner - マウスの座標の基準になる Component。null も可contents - Popup の Contentsx - 初期の x 画面座標y - 初期の y 画面座標
IllegalArgumentException - contents が null の場合
|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
Java、Java 2D、および JDBC は米国ならびにその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.