public abstract class PopupWindow extends Window
Popup
、Tooltip
、ContextMenu
など、異なるタイプの様々なポップアップ・ベース・ウィンドウの親です。
PopupWindowは、ウィンドウの装飾やタイトル・バーがないセカンダリ・ウィンドウです。OSで最上位ウィンドウとして表示されることはありません。通常は、通知、ドロップダウン・ボックス、メニューなどのためのツールチップに使用されます。
PopupWindowは、所有者が存在しないと表示できません。PopupWindowが表示されるためには、所有者ウィンドウが存在する必要があります。ただし、PopupWindowを事前に作成しておき、初めて表示される前に所有者を単に設定(または変更)することができます。PopupWindowの表示中にその所有者を変更しようとすると、IllegalStateExceptionが発生します。
PopupWindowは、ポップアップで一般的な動作や機能([Esc]キーが押されたら閉じる機能や、そのウィンドウが非表示の場合は常にすべての子ポップアップ・ウィンドウを非表示にする機能など)の大半をカプセル化します。これらの機能は、プロパティを介して有効または無効にできます。
型 | プロパティと説明 |
---|---|
ObjectProperty<PopupWindow.AnchorLocation> |
anchorLocation
ポップアップの位置合せに使用するポップアップのアンカー・ポイントを指定します。
|
ReadOnlyDoubleProperty |
anchorX
画面のポップアップ・アンカー・ポイントのX座標を指定します。
|
ReadOnlyDoubleProperty |
anchorY
画面のポップアップ・アンカー・ポイントのY座標を指定します。
|
BooleanProperty |
autoFix
このコンビニエンス変数は、ポップアップを表示する際に、その位置が画面を外れないように、自動的に訂正するかとどうかを示しています。
|
BooleanProperty |
autoHide
ポップアップを自動非表示にするかどうかを指定します。
|
BooleanProperty |
consumeAutoHidingEvents
ポップアップの非表示の原因となったイベントを使用するかどうかを指定します。
|
BooleanProperty |
hideOnEscape
ポップアップがフォーカスされている間に処理されないエスケープ・キーが押された場合、PopupWindowを非表示にするかどうかを指定します。
|
ObjectProperty<EventHandler<Event>> |
onAutoHide
autoHideが実行された後に呼び出されます。
|
ReadOnlyObjectProperty<Node> |
ownerNode
このポップアップの所有者であるノード。
|
ReadOnlyObjectProperty<Window> |
ownerWindow
このポップアップの親であるウィンドウ。
|
修飾子と型 | クラスと説明 |
---|---|
static class |
PopupWindow.AnchorLocation
ポップアップのアンカー・ポイント選択用のアンカー位置定数です。
|
コンストラクタと説明 |
---|
PopupWindow() |
修飾子と型 | メソッドと説明 |
---|---|
ObjectProperty<PopupWindow.AnchorLocation> |
anchorLocationProperty()
ポップアップの位置合せに使用するポップアップのアンカー・ポイントを指定します。
|
ReadOnlyDoubleProperty |
anchorXProperty()
画面のポップアップ・アンカー・ポイントのX座標を指定します。
|
ReadOnlyDoubleProperty |
anchorYProperty()
画面のポップアップ・アンカー・ポイントのY座標を指定します。
|
BooleanProperty |
autoFixProperty()
このコンビニエンス変数は、ポップアップを表示する際に、その位置が画面を外れないように、自動的に訂正するかとどうかを示しています。
|
BooleanProperty |
autoHideProperty()
ポップアップを自動非表示にするかどうかを指定します。
|
BooleanProperty |
consumeAutoHidingEventsProperty()
ポップアップの非表示の原因となったイベントを使用するかどうかを指定します。
|
PopupWindow.AnchorLocation |
getAnchorLocation()
プロパティanchorLocationの値を取得します。
|
double |
getAnchorX()
プロパティanchorXの値を取得します。
|
double |
getAnchorY()
プロパティanchorYの値を取得します。
|
boolean |
getConsumeAutoHidingEvents()
プロパティconsumeAutoHidingEventsの値を取得します。
|
EventHandler<Event> |
getOnAutoHide()
プロパティonAutoHideの値を取得します。
|
Node |
getOwnerNode()
プロパティownerNodeの値を取得します。
|
Window |
getOwnerWindow()
プロパティownerWindowの値を取得します。
|
void |
hide()
このポップアップおよびそのすべての子を非表示にします。
|
BooleanProperty |
hideOnEscapeProperty()
ポップアップがフォーカスされている間に処理されないエスケープ・キーが押された場合、PopupWindowを非表示にするかどうかを指定します。
|
boolean |
isAutoFix()
プロパティautoFixの値を取得します。
|
boolean |
isAutoHide()
プロパティautoHideの値を取得します。
|
boolean |
isHideOnEscape()
プロパティhideOnEscapeの値を取得します。
|
ObjectProperty<EventHandler<Event>> |
onAutoHideProperty()
autoHideが実行された後に呼び出されます。
|
ReadOnlyObjectProperty<Node> |
ownerNodeProperty()
このポップアップの所有者であるノード。
|
ReadOnlyObjectProperty<Window> |
ownerWindowProperty()
このポップアップの親であるウィンドウ。
|
void |
setAnchorLocation(PopupWindow.AnchorLocation value)
プロパティanchorLocationの値を設定します。
|
void |
setAnchorX(double value)
プロパティanchorXの値を設定します。
|
void |
setAnchorY(double value)
プロパティanchorYの値を設定します。
|
void |
setAutoFix(boolean value)
プロパティautoFixの値を設定します。
|
void |
setAutoHide(boolean value)
プロパティautoHideの値を設定します。
|
void |
setConsumeAutoHidingEvents(boolean value)
プロパティconsumeAutoHidingEventsの値を設定します。
|
void |
setHideOnEscape(boolean value)
プロパティhideOnEscapeの値を設定します。
|
void |
setOnAutoHide(EventHandler<Event> value)
プロパティonAutoHideの値を設定します。
|
protected void |
setScene(Scene scene)
サブクラスに関する注意: PopupWindowで使用されるシーンは、PopupWindowによって特別に管理されます。
|
void |
show(Node ownerNode, double anchorX, double anchorY)
画面上の指定した場所にポップアップを表示します。
|
void |
show(Window owner)
ポップアップを表示します。
|
void |
show(Window ownerWindow, double anchorX, double anchorY)
画面上の指定した場所にポップアップを表示します。
|
addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getProperties, getScene, getUserData, getWidth, getX, getY, hasProperties, heightProperty, isFocused, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, removeEventFilter, removeEventHandler, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yProperty
public final ReadOnlyObjectProperty<Window> ownerWindowProperty
getOwnerWindow()
public final ReadOnlyObjectProperty<Node> ownerNodeProperty
getOwnerNode()
public final BooleanProperty autoFixProperty
isAutoFix()
, setAutoFix(boolean)
public final BooleanProperty autoHideProperty
唯一の例外は、所有者ノードがshow(javafx.scene.Node, double, double)
を使用して指定された場合です。所有者ノードがフォーカスされても、PopupWindowは非表示になりません。
isAutoHide()
, setAutoHide(boolean)
public final ObjectProperty<EventHandler<Event>> onAutoHideProperty
public final BooleanProperty hideOnEscapeProperty
isHideOnEscape()
, setHideOnEscape(boolean)
public final BooleanProperty consumeAutoHidingEventsProperty
getConsumeAutoHidingEvents()
, setConsumeAutoHidingEvents(boolean)
public final ReadOnlyDoubleProperty anchorXProperty
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_BOTTOM_LEFT
に設定されている場合、x
およびanchorX
の値は同じになります。getAnchorX()
, setAnchorX(double)
public final ReadOnlyDoubleProperty anchorYProperty
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_TOP_RIGHT
に設定されている場合、y
およびanchorY
の値は同じになります。getAnchorY()
, setAnchorY(double)
public final ObjectProperty<PopupWindow.AnchorLocation> anchorLocationProperty
一般に、アンカー位置を変更しても、現在のウィンドウ位置は変更されません。そのかわりに、anchorX
およびanchorY
の値が、新しいアンカー・ポイントに対応するように再計算されます。
getAnchorLocation()
, setAnchorLocation(AnchorLocation)
public final Window getOwnerWindow()
public final ReadOnlyObjectProperty<Window> ownerWindowProperty()
getOwnerWindow()
public final Node getOwnerNode()
public final ReadOnlyObjectProperty<Node> ownerNodeProperty()
getOwnerNode()
protected final void setScene(Scene scene)
public final void setAutoFix(boolean value)
public final boolean isAutoFix()
public final BooleanProperty autoFixProperty()
isAutoFix()
, setAutoFix(boolean)
public final void setAutoHide(boolean value)
唯一の例外は、所有者ノードがshow(javafx.scene.Node, double, double)
を使用して指定された場合です。所有者ノードがフォーカスされても、PopupWindowは非表示になりません。
public final boolean isAutoHide()
唯一の例外は、所有者ノードがshow(javafx.scene.Node, double, double)
を使用して指定された場合です。所有者ノードがフォーカスされても、PopupWindowは非表示になりません。
public final BooleanProperty autoHideProperty()
唯一の例外は、所有者ノードがshow(javafx.scene.Node, double, double)
を使用して指定された場合です。所有者ノードがフォーカスされても、PopupWindowは非表示になりません。
isAutoHide()
, setAutoHide(boolean)
public final void setOnAutoHide(EventHandler<Event> value)
public final EventHandler<Event> getOnAutoHide()
public final ObjectProperty<EventHandler<Event>> onAutoHideProperty()
public final void setHideOnEscape(boolean value)
public final boolean isHideOnEscape()
public final BooleanProperty hideOnEscapeProperty()
isHideOnEscape()
, setHideOnEscape(boolean)
public final void setConsumeAutoHidingEvents(boolean value)
public final boolean getConsumeAutoHidingEvents()
public final BooleanProperty consumeAutoHidingEventsProperty()
getConsumeAutoHidingEvents()
, setConsumeAutoHidingEvents(boolean)
public void show(Window owner)
owner
- ポップアップの所有者。nullは指定できません。NullPointerException
- 所有者がnullの場合IllegalArgumentException
- 指定した所有者ウィンドウがウィンドウ階層でサイクルを作成する場合public void show(Node ownerNode, double anchorX, double anchorY)
anchorLocation
)が指定したanchorX
座標とanchorY
座標に表示されるように配置されます。
ポップアップは、指定した所有者ノードに関連付けられています。呼出し時に所有者ノードが含まれていたWindow
が、表示されるポップアップの所有者ウィンドウになります。
autoHideProperty()
がtrueに設定されている場合、所有者ノードでマウスを押してもPopupWindowは非表示にならないことに注意してください。
ownerNode
- ポップアップの所有者ノード。nullは指定できず、ウィンドウに関連付けられている必要があります。anchorX
- 画面座標でのポップアップ・アンカーのx位置anchorY
- 画面座標でのポップアップ・アンカーのy位置NullPointerException
- ownerNodeがnullの場合IllegalArgumentException
- 指定した所有者ノードがウィンドウに関連付けられていないか、またはウィンドウがウィンドウ階層でサイクルを作成する場合public void show(Window ownerWindow, double anchorX, double anchorY)
anchorLocation
)が指定したanchorX
座標とanchorY
座標に表示されるように配置されます。ownerWindow
- ポップアップの所有者。nullは指定できません。anchorX
- 画面座標でのポップアップ・アンカーのx位置anchorY
- 画面座標でのポップアップ・アンカーのy位置NullPointerException
- ownerWindowがnullの場合IllegalArgumentException
- 指定した所有者ウィンドウがウィンドウ階層でサイクルを作成する場合public final void setAnchorX(double value)
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_BOTTOM_LEFT
に設定されている場合、x
およびanchorX
の値は同じになります。public final double getAnchorX()
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_BOTTOM_LEFT
に設定されている場合、x
およびanchorX
の値は同じになります。public final ReadOnlyDoubleProperty anchorXProperty()
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_BOTTOM_LEFT
に設定されている場合、x
およびanchorX
の値は同じになります。getAnchorX()
, setAnchorX(double)
public final void setAnchorY(double value)
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_TOP_RIGHT
に設定されている場合、y
およびanchorY
の値は同じになります。public final double getAnchorY()
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_TOP_RIGHT
に設定されている場合、y
およびanchorY
の値は同じになります。public final ReadOnlyDoubleProperty anchorYProperty()
anchorLocation
がWINDOW_TOP_LEFT
またはWINDOW_TOP_RIGHT
に設定されている場合、y
およびanchorY
の値は同じになります。getAnchorY()
, setAnchorY(double)
public final void setAnchorLocation(PopupWindow.AnchorLocation value)
一般に、アンカー位置を変更しても、現在のウィンドウ位置は変更されません。そのかわりに、anchorX
およびanchorY
の値が、新しいアンカー・ポイントに対応するように再計算されます。
public final PopupWindow.AnchorLocation getAnchorLocation()
一般に、アンカー位置を変更しても、現在のウィンドウ位置は変更されません。そのかわりに、anchorX
およびanchorY
の値が、新しいアンカー・ポイントに対応するように再計算されます。
public final ObjectProperty<PopupWindow.AnchorLocation> anchorLocationProperty()
一般に、アンカー位置を変更しても、現在のウィンドウ位置は変更されません。そのかわりに、anchorX
およびanchorY
の値が、新しいアンカー・ポイントに対応するように再計算されます。
getAnchorLocation()
, setAnchorLocation(AnchorLocation)
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.