Class BorderlessScene
- java.lang.Object
-
- javafx.scene.Scene
-
- com.goxr3plus.fxborderlessscene.borderless.BorderlessScene
-
- All Implemented Interfaces:
javafx.event.EventTarget
public class BorderlessScene extends javafx.scene.SceneUndecorated JavaFX Scene with implemented move, resize, minimize, maximize and Aero Snap.Usage:
{ @code //add the code here }- Version:
- 1.0
- Author:
- Nicolas Senet-Larson, GOXR3PLUS STUDIO
-
-
Constructor Summary
Constructors Constructor Description BorderlessScene(javafx.stage.Stage stage, javafx.stage.StageStyle stageStyle, javafx.scene.Parent sceneRoot)The constructor.BorderlessScene(javafx.stage.Stage stage, javafx.stage.StageStyle stageStyle, javafx.scene.Parent sceneRoot, double minWidth, double minHeight)The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DeltagetWindowedPositon()Returns the x and y position of the application when windowed.DeltagetWindowedSize()Returns the width and height of the application when windowed.booleanisDoubleClickMaximize()True if double click maximize is enabled or false if notbooleanisMaximized()True if the stage is maximized or false if notbooleanisResizable()True if the stage is resizable or false if notbooleanisSnapEnabled()True if Aero Snap is enabled or false if notjavafx.beans.property.BooleanPropertymaximizedProperty()Maximized property.voidmaximizeStage()Toggle to maximize the application.voidminimizeStage()Minimize the stage to the taskbar.voidremoveDefaultCSS()Removes the default css style of the cornersjavafx.beans.property.BooleanPropertyresizableProperty()Resizable property.voidsetContent(javafx.scene.Parent content)Change the content of the scene.voidsetDoubleClickMaximizeEnabled(boolean bool)Disable/enable double click maximize.voidsetMoveControl(javafx.scene.Node node)Set a node that can be pressed and dragged to move the application around.voidsetResizable(boolean bool)Disable/enable the resizing of your stage.voidsetSnapEnabled(boolean bool)Disable/enable the Aero Snap of your stage.voidsetTransparentWindowStyle(String style)The transparent window which allows the library to have aerosnap controls can be styled using this method .javafx.beans.property.BooleanPropertysnapProperty()Aero Snap property.-
Methods inherited from class javafx.scene.Scene
addEventFilter, addEventHandler, addMnemonic, addPostLayoutPulseListener, addPreLayoutPulseListener, buildEventDispatchChain, cameraProperty, cursorProperty, disposePeer, effectiveNodeOrientationProperty, enableInputMethodEvents, eventDispatcherProperty, fillProperty, focusOwnerProperty, getAccelerators, getAntiAliasing, getCamera, getCursor, getEffectiveNodeOrientation, getEventDispatcher, getFill, getFocusOwner, getHeight, getMnemonics, 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, getProperties, getRoot, getStylesheets, getUserAgentStylesheet, getUserData, getWidth, getWindow, getX, getY, hasProperties, heightProperty, isDepthBuffer, lookup, nodeOrientationProperty, 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, processKeyEvent, removeEventFilter, removeEventHandler, removeMnemonic, removePostLayoutPulseListener, removePreLayoutPulseListener, rootProperty, setCamera, setCursor, setEventDispatcher, setEventHandler, setFill, 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, setRoot, setUserAgentStylesheet, setUserData, snapshot, snapshot, startDragAndDrop, startFullDrag, userAgentStylesheetProperty, widthProperty, windowProperty, xProperty, yProperty
-
-
-
-
Constructor Detail
-
BorderlessScene
public BorderlessScene(javafx.stage.Stage stage, javafx.stage.StageStyle stageStyle, javafx.scene.Parent sceneRoot)The constructor.- Parameters:
stage- your stage.stageStyle- Undecorated and Transparent StageStyles are accepted or else the Transparent StageStyle will be set.sceneRoot- The root of the Scene
-
BorderlessScene
public BorderlessScene(javafx.stage.Stage stage, javafx.stage.StageStyle stageStyle, javafx.scene.Parent sceneRoot, double minWidth, double minHeight)The constructor.- Parameters:
stage- your stage.stageStyle- Undecorated and Transparent StageStyles are accepted or else the Transparent StageStyle will be set.sceneRoot- The root of the SceneminWidth- The minimum width that the Stage can haveminHeight- The minimum height that the Stage can have
-
-
Method Detail
-
setContent
public void setContent(javafx.scene.Parent content)
Change the content of the scene.- Parameters:
content- the root Parent of your new content.
-
setMoveControl
public void setMoveControl(javafx.scene.Node node)
Set a node that can be pressed and dragged to move the application around.- Parameters:
node- the node.
-
maximizeStage
public void maximizeStage()
Toggle to maximize the application.
-
minimizeStage
public void minimizeStage()
Minimize the stage to the taskbar.
-
setResizable
public void setResizable(boolean bool)
Disable/enable the resizing of your stage. Enabled by default.- Parameters:
bool- false to disable, true to enable.
-
setSnapEnabled
public void setSnapEnabled(boolean bool)
Disable/enable the Aero Snap of your stage. Enabled by default.- Parameters:
bool- false to disable, true to enable.
-
setDoubleClickMaximizeEnabled
public void setDoubleClickMaximizeEnabled(boolean bool)
Disable/enable double click maximize. Enabled by default.- Parameters:
bool- false to disable, true to enable.
-
maximizedProperty
public javafx.beans.property.BooleanProperty maximizedProperty()
Maximized property.- Returns:
- Maximized property
-
resizableProperty
public javafx.beans.property.BooleanProperty resizableProperty()
Resizable property.- Returns:
- Resizable property
-
snapProperty
public javafx.beans.property.BooleanProperty snapProperty()
Aero Snap property.- Returns:
- Aero Snap property
-
isMaximized
public boolean isMaximized()
True if the stage is maximized or false if not- Returns:
- True if the stage is maximized or false if not
-
isResizable
public boolean isResizable()
True if the stage is resizable or false if not- Returns:
- True if the stage is resizable or false if not
-
isSnapEnabled
public boolean isSnapEnabled()
True if Aero Snap is enabled or false if not- Returns:
- True if Aero Snap is enabled or false if not
-
isDoubleClickMaximize
public boolean isDoubleClickMaximize()
True if double click maximize is enabled or false if not- Returns:
- True if doucle click maximize is enabled or false if not
-
getWindowedSize
public Delta getWindowedSize()
Returns the width and height of the application when windowed.- Returns:
- instance of Delta class. Delta.x = width, Delta.y = height.
-
getWindowedPositon
public Delta getWindowedPositon()
Returns the x and y position of the application when windowed.- Returns:
- instance of Delta class. Use Delta.x and Delta.y.
-
removeDefaultCSS
public void removeDefaultCSS()
Removes the default css style of the corners
-
setTransparentWindowStyle
public void setTransparentWindowStyle(String style)
The transparent window which allows the library to have aerosnap controls can be styled using this method . It is nothing more than a StackPane in a transparent window , so for example you can change it's background color , borders , everything through this method :)- Parameters:
style- The style of the transparent window of the application
-
-