Skip to content

CatWithAWand/BorderlessSceneFX

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BorderlessSceneFX

BorderlessSceneFX Release
An undecorated JavaFX scene with move, resize, minimize, maximize, close, and Aero Snap/Quarter Tiling.


About

BorderlessSceneFX is a JavaFX scene that allows you to create a borderless window with move, resize, minimize, maximize, close, and Aero Snap/Quarter Tiling.
Both the scene and the aero snap window are customizable.

Features

  • Move
  • Resize
  • Minimize
  • Maximize
  • Close
  • Aero Snap/Quarter Tiling
  • Styling Aero Snap window
  • Styling Main window
  • Extensive API
  • Customizable

demo_aero_snap

This project has been forked and further developed from this GitHub repository.

Getting Started

Add BorderlessSceneFX to your dependencies

Gradle

dependencies {
    implementation 'com.catwithawand:borderlessscenefx:1.0.0'
}

Maven

<dependency>
  <groupId>com.catwithawand</groupId>
  <artifactId>BorderlessSceneFX</artifactId>
  <version>1.0.0</version>
</dependency>

Example

@Override
public void start(Stage primaryStage) throws Exception {
    // Our root node
    BorderPane root = new BorderPane();
    
    // Our top bar
    HBox topBar = new Hbox();
    topBar.setMinHeight(50);
    topBar.setMaxSize(Double.MAX_VALUE, Double.MAX_VALUE);
    topBar.setStyle("-fx-background-color:#303030;");
    topBar.setAlignment(Pos.CENTER_RIGHT);
    borderPane.setTop(topBar);
    
    // A close button
    Button closeButton = new Button("x");
    closeButton.setOnAction(event -> primaryStage.close());
    
    // Create the BorderlessScene scene
    BorderlessScene scene = new BorderlessScene(primaryStage, StageStyle.TRANSPARENT, root, Color.TRANSPARENT);
    
    // Make the top bar draggable, so we can move the stage
    scene.setMoveControl(topBar);
    
    // Set the scene to our stage
    primaryStage.setScene(scene);
    
    primaryStage.setTitle("BorderlessSceneFX");
    
    // Finally show the stage
    primaryStage.show();
}

Advanced example

For an actual implementation see the BorderlessSceneFX demo application.

Showcase

Resize and the resize property

demo_resizable

Vertical resize snap and preventing mouse over taskbar

demo_vertical_and_taskbar

White Noise style

demo_white_noise

Glass Glare style

demo_glass_glare

Glass Transparent style

demo_glass_transparent

Gnome style

demo_gnome

Minimalistic style (Default)

demo_minimalistic

License

About

An undecorated JavaFX scene with move, resize, minimize, maximize, close, and Aero Snap/Quarter Tiling.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published