|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectjavax.swing.PopupFactory
public class 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)
Popup の取得に使用される PopupFactory を設定します。 |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public PopupFactory()
| メソッドの詳細 |
|---|
public static void setSharedInstance(PopupFactory factory)
Popup の取得に使用される PopupFactory を設定します。factory が null の場合、IllegalArgumentException をスローします。
factory - 共有 PopupFactory
IllegalArgumentException - factory が null の場合getPopup(java.awt.Component, java.awt.Component, int, int)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 Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。