|
JavaTM 2 Platform Std. Ed. v1.4.0 |
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--javax.swing.JWindow
JWindow は、ユーザのデスクトップ上のどこにでも表示できるコンテナです。タイトルバー、ウィンドウ管理ボタン、または JFrame に関連したほかの装飾を持ちませんが、それでもユーザのデスクトップの「最上級のメンバ」であり、そのどこにでも表示できます。
JWindow コンポーネントには、唯一の子として JRootPane が格納されます。JWindow の子はどれでも contentPane を親に持たなければなりません。従来の java.awt.Window オブジェクトからは、通常は次のように操作します。
window.add(child);しかし、
JWindow では次のようなコードになります。
window.getContentPane().add(child);
LayoutManager の設定、コンポーネントの削除、子のリスト表示などについても同様です。通常、これらのメソッドはすべて JWindow ではなく、contentPane で呼び出されます。contentPane を null にすることはできません。null に設定しようとすると、JWindow が例外をスローします。デフォルトの contentPane には BorderLayout マネージャが設定されます。
contentPane、glassPane、および layeredPane コンポーネントの詳細は、JRootPane の説明を参照してください。
マルチスクリーン環境の場合には、異なったスクリーンデバイス上で JWindow を生成できます。詳細は、Window を参照してください。
標準の Look & Feel (L&F) 表現でこのコンポーネントが使用するキーボードのキーについては、JWindow のキーの割り当てを参照してください。
警告:
このクラスの直列化されたオブジェクトは、今後の Swing リリースと互換ではなくなる予定です。現在の直列化のサポートは、短期間の運用や、同じバージョンの Swing を実行するアプリケーション間の RMI に適しています。JDK バージョン 1.4 以降は、java.beans パッケージにすべての JavaBeansTM の長期記憶がサポートされます。XMLEncoder を参照してください。
JRootPane| 入れ子クラスの概要 | |
protected class |
JWindow.AccessibleJWindow
このクラスは JWindow クラス用のユーザ補助機能のサポートを実装しています。 |
| クラス java.awt.Window から継承した入れ子クラス |
|
| クラス java.awt.Container から継承した入れ子クラス |
|
| クラス java.awt.Component から継承した入れ子クラス |
Component.BltBufferStrategy, Component.FlipBufferStrategy |
| フィールドの概要 | |
protected AccessibleContext |
accessibleContext
ユーザ補助のコンテキストプロパティです。 |
protected JRootPane |
rootPane
glassPane だけでなく、このフレームの contentPane およびオプションの menuBar を管理する JRootPane のインスタンスです。 |
protected boolean |
rootPaneCheckingEnabled
true の場合、 add および setLayout を呼び出すと例外がスローされます。 |
| クラス java.awt.Component から継承したフィールド |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| インタフェース java.awt.image.ImageObserver から継承したフィールド |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| コンストラクタの概要 | |
JWindow()
オーナを指定しないでウィンドウを作成します。 |
|
JWindow(Frame owner)
オーナフレームを指定してウィンドウを作成します。 |
|
JWindow(GraphicsConfiguration gc)
スクリーンデバイスの GraphicsConfiguration を指定してウィンドウを作成します。 |
|
JWindow(Window owner)
オーナウィンドウを指定してウィンドウを作成します。 |
|
JWindow(Window owner,
GraphicsConfiguration gc)
オーナウィンドウとスクリーンデバイスの GraphicsConfiguration を指定してウィンドウを作成します。 |
|
| メソッドの概要 | |
protected void |
addImpl(Component comp,
Object constraints,
int index)
デフォルトでは、子はこのコンポーネントに直接追加できません。 |
protected JRootPane |
createRootPane()
コンストラクタメソッドによって呼び出され、デフォルトの rootPane を作成します。 |
AccessibleContext |
getAccessibleContext()
この JWindow に関連した AccessibleContext を返します。 |
Container |
getContentPane()
このウィンドウの contentPane である Container を返します。 |
Component |
getGlassPane()
このウィンドウの glassPane Component を返します。 |
JLayeredPane |
getLayeredPane()
このウィンドウの layeredPane オブジェクトを返します。 |
JRootPane |
getRootPane()
このウィンドウの rootPane オブジェクトを返します。 |
protected boolean |
isRootPaneCheckingEnabled()
add および setLayout の呼び出しが例外をスローするかどうかを返します。 |
protected String |
paramString()
この JWindow の文字列表現を返します。 |
void |
remove(Component comp)
コンテナから、指定されたコンポーネントを削除します。 |
void |
setContentPane(Container contentPane)
このウィンドウの新しい contentPane プロパティを設定します。 |
void |
setGlassPane(Component glassPane)
glassPane プロパティを設定します。 |
void |
setLayeredPane(JLayeredPane layeredPane)
layeredPane プロパティを設定します。 |
void |
setLayout(LayoutManager manager)
デフォルトでは、このコンポーネントのレイアウトは設定できません。 |
protected void |
setRootPane(JRootPane root)
このウィンドウの新しい rootPane オブジェクトを設定します。 |
protected void |
setRootPaneCheckingEnabled(boolean enabled)
add および setLayout の呼び出しが例外をスローするかどうかを設定します。 |
void |
update(Graphics g)
paint(g) を呼び出します。 |
protected void |
windowInit()
JWindow を適切に初期化するためにコンストラクタによって呼び出されます。 |
| クラス java.lang.Object から継承したメソッド |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| フィールドの詳細 |
protected JRootPane rootPane
glassPane だけでなく、このフレームの contentPane およびオプションの menuBar を管理する JRootPane のインスタンスです。
getRootPane(),
setRootPane(javax.swing.JRootPane)protected boolean rootPaneCheckingEnabled
add および setLayout を呼び出すと例外がスローされます。
isRootPaneCheckingEnabled(),
setRootPaneCheckingEnabled(boolean)protected AccessibleContext accessibleContext
| コンストラクタの詳細 |
public JWindow()
このコンストラクタは、コンポーネントのロケールプロパティを JComponent.getDefaultLocale が返す値に設定します。
HeadlessException - GraphicsEnvironment.isHeadless() が true を返す場合GraphicsEnvironment.isHeadless(),
Window.isFocusableWindow(),
JComponent.getDefaultLocale()public JWindow(GraphicsConfiguration gc)
GraphicsConfiguration を指定してウィンドウを作成します。このウィンドウには、フォーカスが設定されません。
このコンストラクタは、コンポーネントのロケールプロパティを JComponent.getDefaultLocale が返す値に設定します。
gc - 新しいいウィンドウを構築するために使用する GraphicsConfiguration。gc が null の場合は、システムのデフォルトは、GraphicsConfiguration と考えられる
HeadlessException - GraphicsEnvironment.isHeadless() が true を返す場合
IllegalArgumentException - gc がスクリーンデバイスのものではない場合GraphicsEnvironment.isHeadless(),
Window.isFocusableWindow(),
JComponent.getDefaultLocale()public JWindow(Frame owner)
owner が null の場合は、共有オーナが使用され、このウィンドウにはフォーカスが設定されません。また、オーナが画面に表示されないかぎり、このウィンドウにはフォーカスが設定されません。
このコンストラクタは、コンポーネントのロケールプロパティを JComponent.getDefaultLocale が返す値に設定します。
owner - ウィンドウを表示するフレーム
HeadlessException - GraphicsEnvironment.isHeadless() が true を返す場合GraphicsEnvironment.isHeadless(),
Window.isFocusableWindow(),
JComponent.getDefaultLocale()public JWindow(Window owner)
owner が null の場合は、共有オーナが使用され、このウィンドウにはフォーカスが設定されません。
このコンストラクタは、コンポーネントのロケールプロパティを JComponent.getDefaultLocale が返す値に設定します。
owner - ウィンドウを表示するウィンドウ
HeadlessException - GraphicsEnvironment.isHeadless() が true を返す場合GraphicsEnvironment.isHeadless(),
Window.isFocusableWindow(),
JComponent.getDefaultLocale()
public JWindow(Window owner,
GraphicsConfiguration gc)
GraphicsConfiguration を指定してウィンドウを作成します。owner が null の場合は、共有オーナが使用され、このウィンドウにはフォーカスが設定されません。
このコンストラクタは、コンポーネントのロケールプロパティを JComponent.getDefaultLocale が返す値に設定します。
owner - ウィンドウを表示するウィンドウgc - 新しいウィンドウの構築に使用する GraphicsConfiguration。gc が null の場合、システムデフォルトの GraphicsConfiguration が使われる。ただし、owner も null の場合は、共有オーナフレームの GraphicsConfiguration が使われる
HeadlessException - GraphicsEnvironment.isHeadless() が true を返す場合
IllegalArgumentException - gc がスクリーンデバイスのものではない場合GraphicsEnvironment.isHeadless(),
Window.isFocusableWindow(),
JComponent.getDefaultLocale()| メソッドの詳細 |
protected void windowInit()
JWindow を適切に初期化するためにコンストラクタによって呼び出されます。
protected JRootPane createRootPane()
rootPane を作成します。
protected boolean isRootPaneCheckingEnabled()
add および setLayout の呼び出しが例外をスローするかどうかを返します。
add および setLayout が調べられる場合は trueaddImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
setRootPaneCheckingEnabled(boolean)public void update(Graphics g)
paint(g) を呼び出します。このメソッドは、バックグラウンドをクリアするための不必要な呼び出しが行われないようにするためにオーバーライドされました。
Container 内の updateg - ペイント先となる Graphics コンテキストComponent.update(Graphics)protected void setRootPaneCheckingEnabled(boolean enabled)
add および setLayout の呼び出しが例外をスローするかどうかを設定します。
enabled - boolean 値。true の場合は、調査を有効にして例外をスローするaddImpl(java.awt.Component, java.lang.Object, int),
setLayout(java.awt.LayoutManager),
isRootPaneCheckingEnabled()
protected void addImpl(Component comp,
Object constraints,
int index)
contentPane に追加されなければなりません。次に例を示します。
thisComponent.getContentPane().add(child)このコンポーネントに直接追加しようとすると、実行時例外がスローされます。サブクラスはこの動作を無効にできます。
Container 内の addImplcomp - 拡張されるコンポーネントconstraints - コンポーネントで遵守されるべき制約index - コンポーネントのインデックス
Error - rootPaneChecking で呼び出された場合は、truesetRootPaneCheckingEnabled(boolean)public void remove(Component comp)
Container 内の removecomp - 削除されるコンポーネントContainer.add(java.awt.Component)public void setLayout(LayoutManager manager)
thisComponent.getContentPane().setLayout(new GridLayout(1, 2))このコンポーネントのレイアウトを設定しようとすると、実行時例外がスローされます。サブクラスはこの動作を無効にできます。
Container 内の setLayoutmanager - ウィンドウのレイアウトマネージャ
Error - rootPaneChecking で呼び出された場合は、truesetRootPaneCheckingEnabled(boolean)public JRootPane getRootPane()
rootPane オブジェクトを返します。
RootPaneContainer 内の getRootPanerootPane プロパティsetRootPane(javax.swing.JRootPane),
RootPaneContainer.getRootPane()protected void setRootPane(JRootPane root)
rootPane オブジェクトを設定します。このメソッドはコンストラクタによって呼び出されます。
root - 新しい rootPane プロパティgetRootPane()public Container getContentPane()
contentPane である Container を返します。
RootPaneContainer 内の getContentPanecontentPane プロパティsetContentPane(java.awt.Container),
RootPaneContainer.getContentPane()public void setContentPane(Container contentPane)
contentPane プロパティを設定します。このメソッドはコンストラクタによって呼び出されます。
RootPaneContainer 内の setContentPanecontentPane - 新しい contentPane
IllegalComponentStateException - (実行時例外) コンテンツ区画パラメータが null の場合getContentPane(),
RootPaneContainer.setContentPane(java.awt.Container)public JLayeredPane getLayeredPane()
layeredPane オブジェクトを返します。
RootPaneContainer 内の getLayeredPanelayeredPane プロパティsetLayeredPane(javax.swing.JLayeredPane),
RootPaneContainer.getLayeredPane()public void setLayeredPane(JLayeredPane layeredPane)
layeredPane プロパティを設定します。このメソッドはコンストラクタによって呼び出されます。
RootPaneContainer 内の setLayeredPanelayeredPane - 新しい layeredPane オブジェクト
IllegalComponentStateException - (実行時例外) コンテンツ区画パラメータが null の場合getLayeredPane(),
RootPaneContainer.setLayeredPane(javax.swing.JLayeredPane)public Component getGlassPane()
glassPane Component を返します。
RootPaneContainer 内の getGlassPaneglassPane プロパティsetGlassPane(java.awt.Component),
RootPaneContainer.getGlassPane()public void setGlassPane(Component glassPane)
glassPane プロパティを設定します。このメソッドはコンストラクタによって呼び出されます。
RootPaneContainer 内の setGlassPaneglassPane - このウィンドウ glassPane オブジェクトgetGlassPane(),
RootPaneContainer.setGlassPane(java.awt.Component)protected String paramString()
JWindow の文字列表現を返します。このメソッドはデバッグ専用であり、返される文字列の内容および形式は実装によって異なります。返される文字列は空の場合がありますが、null にはなりません。
Container 内の paramStringJWindow 文字列表現public AccessibleContext getAccessibleContext()
Accessible 内の getAccessibleContextWindow 内の getAccessibleContext
|
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.