Class Popup
java.lang.Object
javafx.stage.Window
javafx.stage.PopupWindow
javafx.stage.Popup
- All Implemented Interfaces:
EventTarget
A Popup is a special window-like container for a scene graph. It is typically
used for tooltip like notification, drop down boxes, menus, and so forth.
The popup has no decorations, and essentially acts as a specialized
scene/window which has no decorations, is transparent, and with a null fill.
- Since:
- JavaFX 2.0
-
Nested Class Summary
Nested classes/interfaces declared in class PopupWindow
PopupWindow.AnchorLocationModifier and TypeClassDescriptionstatic enumAnchor location constants for popup anchor point selection. -
Property Summary
Properties declared in class PopupWindow
anchorLocation, anchorX, anchorY, autoFix, autoHide, consumeAutoHidingEvents, hideOnEscape, onAutoHide, ownerNode, ownerWindowTypePropertyDescriptionSpecifies the popup anchor point which is used in popup positioning.final ReadOnlyDoublePropertySpecifies the x coordinate of the popup anchor point on the screen.final ReadOnlyDoublePropertySpecifies the y coordinate of the popup anchor point on the screen.final BooleanPropertyThis convenience variable indicates whether, when the popup is shown, it should automatically correct its position such that it doesn't end up positioned off the screen.final BooleanPropertySpecifies whether Popups should auto hide.final BooleanPropertySpecifies whether the event, which caused the Popup to hide, should be consumed.final BooleanPropertySpecifies whether the PopupWindow should be hidden when an unhandled escape key is pressed while the popup has focus.final ObjectProperty<EventHandler<Event>> Called after autoHide is run.final ReadOnlyObjectProperty<Node> The node which is the owner of this popup.final ReadOnlyObjectProperty<Window> The window which is the parent of this popup.Properties declared in class Window
eventDispatcher, focused, forceIntegerRenderScale, height, onCloseRequest, onHidden, onHiding, onShowing, onShown, opacity, outputScaleX, outputScaleY, renderScaleX, renderScaleY, scene, showing, width, x, yTypePropertyDescriptionfinal ObjectProperty<EventDispatcher> Specifies the event dispatcher for this node.final ReadOnlyBooleanPropertyWhether or not thisWindowhas the keyboard or input focus.final BooleanPropertyBoolean property that controls whether only integer render scales are set by default by the system when there is a change in the associated output scale.final ReadOnlyDoublePropertyThe height of thisWindow.final ObjectProperty<EventHandler<WindowEvent>> Called when there is an external request to close thisWindow.final ObjectProperty<EventHandler<WindowEvent>> Called just after the Window has been hidden.final ObjectProperty<EventHandler<WindowEvent>> Called just prior to the Window being hidden.final ObjectProperty<EventHandler<WindowEvent>> Called just prior to the Window being shown.final ObjectProperty<EventHandler<WindowEvent>> Called just after the Window is shown.final DoublePropertyDefines the opacity of theWindowas a value between 0.0 and 1.0.final ReadOnlyDoublePropertyThe scale that theWindowwill apply to horizontal scene coordinates in all stages of rendering and compositing the output to the screen or other destination device.final ReadOnlyDoublePropertyThe scale that theWindowwill apply to vertical scene coordinates in all stages of rendering and compositing the output to the screen or other destination device.final DoublePropertyThe horizontal scale that theWindowwill use when rendering itsSceneto the rendering buffer.final DoublePropertyThe vertical scale that theWindowwill use when rendering itsSceneto the rendering buffer.final ReadOnlyObjectProperty<Scene> TheSceneto be rendered on thisWindow.final ReadOnlyBooleanPropertyWhether or not thisWindowis showing (that is, open on the user's system).final ReadOnlyDoublePropertyThe width of thisWindow.final ReadOnlyDoublePropertyThe horizontal location of thisWindowon the screen.final ReadOnlyDoublePropertyThe vertical location of thisWindowon the screen. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ObservableList<Node> The ObservableList ofNodes to be rendered on thisPopup.Methods declared in class PopupWindow
anchorLocationProperty, anchorXProperty, anchorYProperty, autoFixProperty, autoHideProperty, consumeAutoHidingEventsProperty, getAnchorLocation, getAnchorX, getAnchorY, getConsumeAutoHidingEvents, getOnAutoHide, getOwnerNode, getOwnerWindow, hide, hideOnEscapeProperty, isAutoFix, isAutoHide, isHideOnEscape, onAutoHideProperty, ownerNodeProperty, ownerWindowProperty, setAnchorLocation, setAnchorX, setAnchorY, setAutoFix, setAutoHide, setConsumeAutoHidingEvents, setHideOnEscape, setOnAutoHide, setScene, show, show, showModifier and TypeMethodDescriptionSpecifies the popup anchor point which is used in popup positioning.final ReadOnlyDoublePropertySpecifies the x coordinate of the popup anchor point on the screen.final ReadOnlyDoublePropertySpecifies the y coordinate of the popup anchor point on the screen.final BooleanPropertyThis convenience variable indicates whether, when the popup is shown, it should automatically correct its position such that it doesn't end up positioned off the screen.final BooleanPropertySpecifies whether Popups should auto hide.final BooleanPropertySpecifies whether the event, which caused the Popup to hide, should be consumed.Gets the value of theanchorLocationproperty.final doubleGets the value of theanchorXproperty.final doubleGets the value of theanchorYproperty.final booleanGets the value of theconsumeAutoHidingEventsproperty.final EventHandler<Event> Gets the value of theonAutoHideproperty.final NodeGets the value of theownerNodeproperty.final WindowGets the value of theownerWindowproperty.voidhide()Hide this Popup and all its childrenfinal BooleanPropertySpecifies whether the PopupWindow should be hidden when an unhandled escape key is pressed while the popup has focus.final booleanGets the value of theautoFixproperty.final booleanGets the value of theautoHideproperty.final booleanGets the value of thehideOnEscapeproperty.final ObjectProperty<EventHandler<Event>> Called after autoHide is run.final ReadOnlyObjectProperty<Node> The node which is the owner of this popup.final ReadOnlyObjectProperty<Window> The window which is the parent of this popup.final voidSets the value of theanchorLocationproperty.final voidsetAnchorX(double value) Sets the value of theanchorXproperty.final voidsetAnchorY(double value) Sets the value of theanchorYproperty.final voidsetAutoFix(boolean value) Sets the value of theautoFixproperty.final voidsetAutoHide(boolean value) Sets the value of theautoHideproperty.final voidsetConsumeAutoHidingEvents(boolean value) Sets the value of theconsumeAutoHidingEventsproperty.final voidsetHideOnEscape(boolean value) Sets the value of thehideOnEscapeproperty.final voidsetOnAutoHide(EventHandler<Event> value) Sets the value of theonAutoHideproperty.protected final voidNote to subclasses: the scene used by PopupWindow is very specifically managed by PopupWindow.voidShows the popup at the specified location on the screen.voidShow the popup.voidShows the popup at the specified location on the screen.Methods declared in class Window
addEventFilter, addEventHandler, buildEventDispatchChain, centerOnScreen, eventDispatcherProperty, fireEvent, focusedProperty, forceIntegerRenderScaleProperty, getEventDispatcher, getHeight, getOnCloseRequest, getOnHidden, getOnHiding, getOnShowing, getOnShown, getOpacity, getOutputScaleX, getOutputScaleY, getProperties, getRenderScaleX, getRenderScaleY, getScene, getUserData, getWidth, getWindows, getX, getY, hasProperties, heightProperty, isFocused, isForceIntegerRenderScale, isShowing, onCloseRequestProperty, onHiddenProperty, onHidingProperty, onShowingProperty, onShownProperty, opacityProperty, outputScaleXProperty, outputScaleYProperty, removeEventFilter, removeEventHandler, renderScaleXProperty, renderScaleYProperty, requestFocus, sceneProperty, setEventDispatcher, setEventHandler, setForceIntegerRenderScale, setHeight, setOnCloseRequest, setOnHidden, setOnHiding, setOnShowing, setOnShown, setOpacity, setRenderScaleX, setRenderScaleY, setUserData, setWidth, setX, setY, show, showingProperty, sizeToScene, widthProperty, xProperty, yPropertyModifier and TypeMethodDescriptionfinal <T extends Event>
voidaddEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter) Registers an event filter for this target.final <T extends Event>
voidaddEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Registers an event handler for this target.Construct an event dispatch chain for this target.voidSets x and y properties on this Window so that it is centered on the current screen.final ObjectProperty<EventDispatcher> Specifies the event dispatcher for this node.final voidFires the specified event.final ReadOnlyBooleanPropertyWhether or not thisWindowhas the keyboard or input focus.final BooleanPropertyBoolean property that controls whether only integer render scales are set by default by the system when there is a change in the associated output scale.final EventDispatcherGets the value of theeventDispatcherproperty.final doubleGets the value of theheightproperty.final EventHandler<WindowEvent> Gets the value of theonCloseRequestproperty.final EventHandler<WindowEvent> Gets the value of theonHiddenproperty.final EventHandler<WindowEvent> Gets the value of theonHidingproperty.final EventHandler<WindowEvent> Gets the value of theonShowingproperty.final EventHandler<WindowEvent> Gets the value of theonShownproperty.final doubleGets the value of theopacityproperty.final doubleGets the value of theoutputScaleXproperty.final doubleGets the value of theoutputScaleYproperty.final ObservableMap<Object, Object> Returns an observable map of properties on this node for use primarily by application developers.final doubleGets the value of therenderScaleXproperty.final doubleGets the value of therenderScaleYproperty.final ScenegetScene()Gets the value of thesceneproperty.Returns a previously set Object property, or null if no such property has been set using theWindow.setUserData(java.lang.Object)method.final doublegetWidth()Gets the value of thewidthproperty.static ObservableList<Window> Returns a list containing a reference to the currently showing JavaFX windows.final doublegetX()Gets the value of thexproperty.final doublegetY()Gets the value of theyproperty.booleanTests if Window has properties.final ReadOnlyDoublePropertyThe height of thisWindow.final booleanGets the value of thefocusedproperty.final booleanGets the value of theforceIntegerRenderScaleproperty.final booleanGets the value of theshowingproperty.final ObjectProperty<EventHandler<WindowEvent>> Called when there is an external request to close thisWindow.final ObjectProperty<EventHandler<WindowEvent>> Called just after the Window has been hidden.final ObjectProperty<EventHandler<WindowEvent>> Called just prior to the Window being hidden.final ObjectProperty<EventHandler<WindowEvent>> Called just prior to the Window being shown.final ObjectProperty<EventHandler<WindowEvent>> Called just after the Window is shown.final DoublePropertyDefines the opacity of theWindowas a value between 0.0 and 1.0.final ReadOnlyDoublePropertyThe scale that theWindowwill apply to horizontal scene coordinates in all stages of rendering and compositing the output to the screen or other destination device.final ReadOnlyDoublePropertyThe scale that theWindowwill apply to vertical scene coordinates in all stages of rendering and compositing the output to the screen or other destination device.final <T extends Event>
voidremoveEventFilter(EventType<T> eventType, EventHandler<? super T> eventFilter) Unregisters a previously registered event filter from this target.final <T extends Event>
voidremoveEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Unregisters a previously registered event handler from this target.final DoublePropertyThe horizontal scale that theWindowwill use when rendering itsSceneto the rendering buffer.final DoublePropertyThe vertical scale that theWindowwill use when rendering itsSceneto the rendering buffer.final voidRequests that thisWindowget the input focus.final ReadOnlyObjectProperty<Scene> TheSceneto be rendered on thisWindow.final voidSets the value of theeventDispatcherproperty.protected final <T extends Event>
voidsetEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) Sets the handler to use for this event type.final voidsetForceIntegerRenderScale(boolean forced) Sets the value of theforceIntegerRenderScaleproperty.final voidsetHeight(double value) Sets the value of theheightproperty.final voidsetOnCloseRequest(EventHandler<WindowEvent> value) Sets the value of theonCloseRequestproperty.final voidsetOnHidden(EventHandler<WindowEvent> value) Sets the value of theonHiddenproperty.final voidsetOnHiding(EventHandler<WindowEvent> value) Sets the value of theonHidingproperty.final voidsetOnShowing(EventHandler<WindowEvent> value) Sets the value of theonShowingproperty.final voidsetOnShown(EventHandler<WindowEvent> value) Sets the value of theonShownproperty.final voidsetOpacity(double value) Sets the value of theopacityproperty.final voidsetRenderScaleX(double scale) Sets the value of therenderScaleXproperty.final voidsetRenderScaleY(double scale) Sets the value of therenderScaleYproperty.voidsetUserData(Object value) Convenience method for setting a single Object property that can be retrieved at a later date.final voidsetWidth(double value) Sets the value of thewidthproperty.final voidsetX(double value) Sets the value of thexproperty.final voidsetY(double value) Sets the value of theyproperty.protected voidshow()Attempts to show this Window by setting visibility to truefinal ReadOnlyBooleanPropertyWhether or not thisWindowis showing (that is, open on the user's system).voidSet the width and height of this Window to match the size of the content of this Window's Scene.final ReadOnlyDoublePropertyThe width of thisWindow.final ReadOnlyDoublePropertyThe horizontal location of thisWindowon the screen.final ReadOnlyDoublePropertyThe vertical location of thisWindowon the screen.
-
Constructor Details
-
Popup
public Popup()Creates aPopup.
-
-
Method Details
-
getContent
The ObservableList ofNodes to be rendered on thisPopup. The content forms the complete visual representation of the Popup. Popups have no intrinsic visuals.
-