public class Window extends Control implements SelectableNode
JInternalFrame. It can be used to realize MDI based
applications. See
https://github.com/miho/VFXWindows-Samples for sample code.| Type | Property and Description |
|---|---|
ObjectProperty<Transition> |
closeTransition
Returns the "close-transition" property.
|
Property<Pane> |
contentPane
Content pane property.
|
BooleanProperty |
minimized
Returns the minimize property.
|
BooleanProperty |
movable
Returns the movable property.
|
ReadOnlyBooleanProperty |
moving
Indicates whether this window is currently moving.
|
ObjectProperty<EventHandler<ActionEvent>> |
onCloseAction
Returns the "on-close-action" property.
|
ObjectProperty<EventHandler<ActionEvent>> |
onClosedAction
Returns the "on-closed-action" property.
|
DoubleProperty |
resizableBorderWidth
Returns the resizable border width property.
|
BooleanProperty |
resizeableWindow
Returns the resize property.
|
ReadOnlyBooleanProperty |
resizing
Indicates whether this window is currently resizing.
|
BooleanProperty |
selectable |
ReadOnlyBooleanProperty |
selected
Indicates whether this window is selectable.
|
StyleableObjectProperty<Paint> |
selectionBorderColor |
StyleableBooleanProperty |
selectionEffectEnabled |
StringProperty |
titleBarStyleClass
Returns the titlebar style class property.
|
StringProperty |
title
Returns the window title property.
|
contextMenu, skinClassName, skin, tooltipbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthimpl_traversalEngine, needsLayoutaccessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, impl_showMnemonics, impl_treeVisible, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, visible| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_STYLE
Default css style.
|
static String |
DEFAULT_STYLE_CLASS
Default style class for css.
|
USE_COMPUTED_SIZE, USE_PREF_SIZEBASELINE_OFFSET_SAME_AS_HEIGHT| Constructor and Description |
|---|
Window()
Constructor.
|
Window(String title)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this window.
|
ObjectProperty<Transition> |
closeTransitionProperty()
Returns the "close-transition" property.
|
protected double |
computeMinWidth(double height) |
Property<Pane> |
contentPaneProperty()
Content pane property.
|
static List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
Transition |
getCloseTransition()
Returns the transition that shall be used to indicate window closing.
|
Pane |
getContentPane() |
List<CssMetaData<? extends Styleable,?>> |
getControlCssMetaData() |
ObservableList<WindowIcon> |
getLeftIcons()
Returns a list that contains the icons that are placed on the left side
of the titlebar.
|
EventHandler<ActionEvent> |
getOnCloseAction()
Returns the action that shall be performed before the window will be
closed.
|
EventHandler<ActionEvent> |
getOnClosedAction()
Returns the action that shall be performed after the window has been
closed.
|
double |
getResizableBorderWidth()
Returns the width of the "resizable border" of the window.
|
ObservableList<WindowIcon> |
getRightIcons()
Returns a list that contains the icons that are placed on the right side
of the titlebar.
|
Paint |
getSelectionBorderColor()
Gets the value of the property selectionBorderColor.
|
String |
getTitle()
Returns the window title.
|
String |
getTitleBarStyleClass()
Returns the CSS style class of the titlebar.
|
String |
getUserAgentStylesheet() |
boolean |
isMinimized()
Indicates whether the window is currently minimized.
|
boolean |
isMovable()
Indicates whether the window is movable.
|
boolean |
isMoveToFront()
Indicates whether the window shall be moved to front when a user clicks
on the window.
|
boolean |
isMoving()
Indicates whether this window is currently moving.
|
boolean |
isResizableWindow()
Indicates whether the window is resizeable by the user.
|
boolean |
isResizing()
Indicates whether this window is currently resizing.
|
boolean |
isSelectable()
Indicates whether this window is selectable.
|
boolean |
isSelected()
Indicates whether this node is selected.
|
boolean |
isSelectionEffectEnabled()
Gets the value of the property selectionEffectEnabled.
|
BooleanProperty |
minimizedProperty()
Returns the minimize property.
|
double |
minWidthWithTitle() |
BooleanProperty |
movableProperty()
Returns the movable property.
|
ReadOnlyBooleanProperty |
movingProperty()
Indicates whether this window is currently moving.
|
ObjectProperty<EventHandler<ActionEvent>> |
onCloseActionProperty()
Returns the "on-close-action" property.
|
ObjectProperty<EventHandler<ActionEvent>> |
onClosedActionProperty()
Returns the "on-closed-action" property.
|
boolean |
requestSelection(boolean select)
Requests selection/deselection.
|
DoubleProperty |
resizableBorderWidthProperty()
Returns the resizable border width property.
|
BooleanProperty |
resizeableWindowProperty()
Returns the resize property.
|
ReadOnlyBooleanProperty |
resizingProperty()
Indicates whether this window is currently resizing.
|
BooleanProperty |
selectableProperty() |
ReadOnlyBooleanProperty |
selectedProperty()
Indicates whether this window is selectable.
|
StyleableObjectProperty<Paint> |
selectionBorderColorProperty() |
StyleableBooleanProperty |
selectionEffectEnabledProperty() |
void |
setCloseTransition(Transition t)
Defines the transition that shall be used to indicate window closing.
|
void |
setContentPane(Pane contentPane)
Defines the content pane of this window.
|
void |
setMinimized(boolean v)
Defines whether this window shall be minimized.
|
void |
setMovable(boolean v)
Defines whether this window shall be movable.
|
void |
setMoveToFront(boolean moveToFront)
Defines whether this window shall be moved to front when a user clicks on
the window.
|
void |
setOnCloseAction(EventHandler<ActionEvent> onClosedAction)
Defines the action that shall be performed before the window will be
closed.
|
void |
setOnClosedAction(EventHandler<ActionEvent> onClosedAction)
Defines the action that shall be performed after the window has been
closed.
|
void |
setResizableBorderWidth(double v)
Defines the width of the "resizable border" of the window.
|
void |
setResizableWindow(boolean v)
Defines whether this window shall be resizeable by the user.
|
void |
setSelectable(Boolean selectable)
Defines whether this window is selectable.
|
void |
setSelectionBorderColor(Paint color)
Sets the value of the property selectionBorderColor.
|
void |
setSelectionEffectEnabled(boolean enabled)
Sets the value of the property selectionEffectEnabled.
|
void |
setTitle(String title)
Defines the window title.
|
void |
setTitleBarStyleClass(String name)
Defines the CSS style class of the titlebar.
|
StringProperty |
titleBarStyleClassProperty()
Returns the titlebar style class property.
|
StringProperty |
titleProperty()
Returns the window title property.
|
computeMaxHeight, computeMaxWidth, computeMinHeight, computePrefHeight, computePrefWidth, contextMenuProperty, createDefaultSkin, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getSkin, getTooltip, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthPropertygetChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic StyleableObjectProperty<Paint> selectionBorderColorProperty
public StyleableBooleanProperty selectionEffectEnabledProperty
public Property<Pane> contentPaneProperty
getContentPane(),
setContentPane(Pane)public final StringProperty titleProperty
getTitle(),
setTitle(String)public BooleanProperty minimizedProperty
isMinimized(),
setMinimized(boolean)public BooleanProperty resizeableWindowProperty
public BooleanProperty movableProperty
isMovable(),
setMovable(boolean)public StringProperty titleBarStyleClassProperty
public DoubleProperty resizableBorderWidthProperty
public ObjectProperty<EventHandler<ActionEvent>> onClosedActionProperty
public ObjectProperty<EventHandler<ActionEvent>> onCloseActionProperty
getOnCloseAction(),
setOnCloseAction(EventHandler)public ObjectProperty<Transition> closeTransitionProperty
public BooleanProperty selectableProperty
isSelectable(),
setSelectable(Boolean)public ReadOnlyBooleanProperty selectedProperty
selectedProperty in interface SelectableNodeisSelected()public ReadOnlyBooleanProperty movingProperty
isMoving()public ReadOnlyBooleanProperty resizingProperty
isResizing()public static final String DEFAULT_STYLE
public static final String DEFAULT_STYLE_CLASS
public Window()
public Window(String title)
title - window titlepublic Paint getSelectionBorderColor()
public void setSelectionBorderColor(Paint color)
public StyleableObjectProperty<Paint> selectionBorderColorProperty()
public boolean isSelectionEffectEnabled()
public void setSelectionEffectEnabled(boolean enabled)
public StyleableBooleanProperty selectionEffectEnabledProperty()
public List<CssMetaData<? extends Styleable,?>> getControlCssMetaData()
getControlCssMetaData in class Controlpublic static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public double minWidthWithTitle()
protected double computeMinWidth(double height)
computeMinWidth in class Controlpublic String getUserAgentStylesheet()
getUserAgentStylesheet in class Regionpublic Pane getContentPane()
public void setContentPane(Pane contentPane)
contentPane - content pane to setpublic Property<Pane> contentPaneProperty()
getContentPane(),
setContentPane(Pane)public void setMoveToFront(boolean moveToFront)
moveToFront - the state to setpublic boolean isMoveToFront()
true if the window shall be moved to front when a
user clicks on the window; false otherwisepublic final String getTitle()
public final void setTitle(String title)
title - the title to setpublic final StringProperty titleProperty()
getTitle(),
setTitle(String)public ObservableList<WindowIcon> getLeftIcons()
getRightIcons()public ObservableList<WindowIcon> getRightIcons()
getLeftIcons()public void setMinimized(boolean v)
v - the state to setpublic boolean isMinimized()
true if the window is currently minimized;
false otherwisepublic BooleanProperty minimizedProperty()
isMinimized(),
setMinimized(boolean)public void setResizableWindow(boolean v)
v - the state to setpublic boolean isResizableWindow()
true if the window is resizeable; false
otherwisepublic BooleanProperty resizeableWindowProperty()
public void setMovable(boolean v)
v - the state to setpublic boolean isMovable()
true if the window is movable; false
otherwisepublic BooleanProperty movableProperty()
isMovable(),
setMovable(boolean)public StringProperty titleBarStyleClassProperty()
public void setTitleBarStyleClass(String name)
name - the CSS style class namepublic String getTitleBarStyleClass()
public DoubleProperty resizableBorderWidthProperty()
public void setResizableBorderWidth(double v)
v - border widthpublic double getResizableBorderWidth()
setResizableBorderWidth(double)public void close()
public ObjectProperty<EventHandler<ActionEvent>> onClosedActionProperty()
public void setOnClosedAction(EventHandler<ActionEvent> onClosedAction)
onClosedAction - the action to setpublic EventHandler<ActionEvent> getOnClosedAction()
null if no such action has been definedpublic ObjectProperty<EventHandler<ActionEvent>> onCloseActionProperty()
getOnCloseAction(),
setOnCloseAction(EventHandler)public void setOnCloseAction(EventHandler<ActionEvent> onClosedAction)
onClosedAction - the action to setpublic EventHandler<ActionEvent> getOnCloseAction()
null if no such action has been definedpublic ObjectProperty<Transition> closeTransitionProperty()
public void setCloseTransition(Transition t)
t - the transition that shall be used to indicate window closing or
null if no transition shall be used.public Transition getCloseTransition()
null if no such transition has been definedpublic boolean requestSelection(boolean select)
SelectableNoderequestSelection in interface SelectableNodeselect - defines whether to select or deselect the nodetrue if request is accepted;false
otherwisepublic BooleanProperty selectableProperty()
isSelectable(),
setSelectable(Boolean)public void setSelectable(Boolean selectable)
selectable - state to setpublic boolean isSelectable()
true if this window is selectable; false
otherwisepublic ReadOnlyBooleanProperty selectedProperty()
selectedProperty in interface SelectableNodeisSelected()public boolean isSelected()
SelectableNodeisSelected in interface SelectableNodetrue if the window is selected; false otherwisepublic ReadOnlyBooleanProperty movingProperty()
isMoving()public boolean isMoving()
false
otherwisepublic ReadOnlyBooleanProperty resizingProperty()
isResizing()public boolean isResizing()
false
otherwise