A JavaFX UI framework to create fully customized undecorated windows

Overview

CustomStage Mentioned in Awesome JavaFX

A JavaFX undecorated stage which can fully be customized

Download Licence(https://img.shields.io/github/license/Oshan96/CustomStage.svg) Total Downloads JitPack HitCount

Donations

If this project is helpful to you and love my work and feel like showing love/appreciation, would you like to buy me a coffee?
Buy Me A Coffee

An Implementation See the code in wiki at "A complete implementation"

CustomStage Implementation

Additional Tools provided (After v1.3.0)

Checkout the CustomStage Wiki for more examples and documentation.

Using CustomStage ?

  • Fork the repository and update with this readme's Projects using CustomStage section in the following format adding your project details and do a Pull Request!

Project_Name : Brief_Description

Projects using CustomStage

  • RentLio : This is a vehicle reservation system. Which is made with JavaFX and also using hibernate and RMI.

Overview

This CustomStage is a JavaFX undecorated Stage. To put it simple, CustomStage is a Window and you can add different views (FXML files) to the window (like changing the scene of the window) as you prefer. The basic problem making the Stage "Undecorated" is that you will not be able to,

  1. Resize the window using mouse.
  2. Lose the default action buttons.
  3. Move the window (by dragging) (etc.)

So, CustomStage will get rid of all of these issues since it includes,

  1. Window resizing (the ResizeHelper class is used here with minor modifications) -> ResizeHelper class
  2. Default action buttons and their behaviour (close, maximize/restore, minimize)
  3. Window dragging

What else?

  • Window is automatically scaled as for screen resolution
  • Very responsive
  • Apart from those, this is called CustomStage since it can be customized as you wish

How?

  • Easy. You can get your customized Stage using the CustomStageBuilder class. This class includes all the methods you will need to customize your window.

How to use?

Starting from version 1.3.1 CustomStage releases are/will be available through JCenter and MavenCentral

Maven

<dependency>
    <groupId>lk.vivoxalabs.customstage</groupId>
    <artifactId>CustomStage</artifactId>
    <version>1.3.2</version>
</dependency>

Gradle

  dependencies {
    compile 'lk.vivoxalabs.customstage:CustomStage:1.3.2'
  }

Download via Jitpack (Will not be possible for releases after v1.3.1)

Gradle

Add jitpack as a repository

repositories {
    maven { url 'https://jitpack.io' }
}

Add dependancy

dependencies {
    compile 'com.github.Oshan96:CustomStage:v1.3.1'
}

Maven

Add jitpack as a repository

<repositories>
  <repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
  </repository>
</repositories>

Add dependancy

<dependency>
  <groupId>com.github.Oshan96</groupId>
  <artifactId>CustomStage</artifactId>
  <version>v1.3.1</version>
</dependency>

Or download and add as a dependancy to your project

How to use a CustomStage?

CustomStage

Transparent CustomStage

CustomStage with custom icons

Documentation

CustomStage API Documentation can be found here : CustomStage Documentation

Any issue detected?

:D

Feel free to post issues in "Issues" for further improvements

Comments
  • how to use scene

    how to use scene

    Hi @Oshan96 ,

    If I don't want to use fxml when setting up a scene, how do I proceed with adding the scene to the CustomStage ?

    Say I want to define a stack pane to sit inside the stage.

            Scene scene = new Scene(new StackPane(), 800, 600);
            stage.setScene(scene);
    

    As soon as I do stage.setScene(scene), the title bar will be covered and I won't be able to drag the window/stage or use the buttons.

    So how should I add a stack pane or an anchor pane to a custom stage ?

    opened by mokun 6
  • high cpu util

    high cpu util

    After I switch from Stage to CustomStage, I experience a 20% up in CPU utilization when I drag my window across the screen.

    Also, the way it moves is not smooth.

    When the CustomStage is not moving, the CPU resources stays normal.

    What could possibly be causing it ?

    bug 
    opened by mokun 2
  • Image as title, adding more buttons to the titlebar

    Image as title, adding more buttons to the titlebar

    Would it be possible to add a constructor that allows for an image as a title (Useful for company logos etc.). Additionally, is there a way to similarly add more buttons to the title bar.

    enhancement 
    opened by desaianand1 1
  • Fixed minimum dimensions

    Fixed minimum dimensions

    If we create a stage which is smaller than 259x700 it gets resized to 259x700 the first time a user tries to change the window size manually (by dragging the edges of the window).

    We suspect the error to be in lk.vivoxalabs.customstage.tools.ResizeHelper:17. Is there a specific reason for fixing the minimum dimensions to 259x700?

    question 
    opened by SimonMeili 1
  • Typo in wiki section

    Typo in wiki section "What is CustomStage?"

    FYI, in the "What is CustomStage?" section of the wiki, there is a typo.

    I believe the word "costedin" is a typo. Not sure what words you would want instead. Maybe "time and cost developing"?

    Thank you for sharing your hard work/code with the JavaFX community, its appreciated!

    opened by aromanelli 1
  • Feature Request: Shadow

    Feature Request: Shadow

    Thanks for sharing your great work! It would be nice to have the possibility to let the stage drop a shadow to let it look more distinct from its background.

    enhancement 
    opened by BrightyMcBrightface 1
  • Custom

    Custom "Stage Close" behavior

    Greetings, Fantastic job on the customStage project. Was definitely needed in the javaFX world.

    One thing you might want to implement is to allow the user to set a custom behavior when closing the Stage. If I have multiple windows, and I just want to close one, there is no access to define this behavior, as you simply use the Stage System.exit(0), and thus closes the entire application down. Perhaps having an option close/hide might be better for some cases.

    Unless I'm missing something... Thanks and cheers

    opened by clisztian 0
  • disable maximize/resize

    disable maximize/resize

    Hi, amazing tool to work with, thank you a lot. I was wondering if it there was a way to disable resizing/maximizing of the stage. I tried to use setResizeable() but I suppose you are overriding this function since you rewrote the whole resizing process yourself.

    I also tried to listen for attempts to maximize then set maximize to false but your codes set it back to true.

    Custom Stage itself is a private class so I cannot extend/override it.

    Any idea ?

    question 
    opened by LaureLazard 1
  • unable to load the jar as module to run,compiled with the same setting.

    unable to load the jar as module to run,compiled with the same setting.

    Unable to derive module descriptor for E:\Coding\JavaRuntimeAsset\CustomStage\CustomStage-v1.3.1.jar

    set CustomStage="%cd%\JavaRuntimeAsset\CustomStage\CustomStage-v1.3.1.jar"

    compile:javac -verbose --module-path ......;%CustomStage% --add-modules ALL-MODULE-PATH ........

    run it:java ....... --module-path .......;%CustomStage% --add-modules ALL-MODULE-PATH .......

    opened by LJWxyz 5
  • title truncated

    title truncated

    The string text of the title got truncated somehow at the end of the 22nd character

    The width of the custom stage is 1280. More than enough space.

    I wonder why ?

    opened by mokun 1
Releases(v1.3.1)
Owner
Oshan Mendis
Undergraduate in Information Systems. Open Source contributor and developer. Author of @customstage JavaFX UI framework
Oshan Mendis
Decorate "Undecorated" JavaFX windows

DEPRECATED: The latest version of this project is UndecoratorBis https://github.com/in-sideFX/UndecoratorBis Undecorator Decorate undecorated Java

null 115 Sep 23, 2022
DataFX - is a JavaFX frameworks that provides additional features to create MVC based applications in JavaFX by providing routing and a context for CDI.

What you’ve stumbled upon here is a project that intends to make retrieving, massaging, populating, viewing, and editing data in JavaFX UI controls ea

Guigarage 110 Dec 29, 2022
A library for JavaFX that gives you the ability to show progress on the Windows taskbar.

A clean and easy way to implement this amazing native Windows taskbar-progressbar functionality in javaFX Background Since Windows 7 there is a taskba

Daniel Gyoerffy 77 Nov 28, 2022
A prayer times (Adhan) app for Windows and GNU/Linux written in JavaFX.

Salawat Salawat - سالوات A prayer times and Adhan application for Windows, macOS and GNU/Linux written in Java Download » View Demo · Report Bug · Req

DarkBlackChocolate 8 Nov 17, 2022
Custom captions (window decorations) on Windows for JavaFX

javafx-customcaption javafx-customcaption is designed to allow customizing the native window caption on Microsoft Windows Usage: You can use the follo

null 3 Dec 15, 2022
Old and archived; More recent development is in https://github.com/Create-Fabric/Create-Refabricated.

NOW ARCHIVED Go here for the continuation of this project. Old README Create Fabric A Fabric port of Create. Create Discord: https://discord.gg/AjRTh6

null 12 Dec 7, 2022
CSS keyframe animation for JavaFX. Create animations like you would do with CSS.

JFXAnimation CSS keyframe animation for JavaFX. If you are using JFoenix JFXAnimation is included (currently version 1.0.0 only) Requirements JDK 8 an

Marcel Schlegel 49 Dec 28, 2022
A project that shows the different ways on how to create custom controls in JavaFX

JavaFX Custom Controls This project will show different ways on how to create custom controls in JavaFX. It will cover the following approaches: Resty

Gerrit Grunwald 27 Sep 5, 2022
A small tools to play with JavaFX Color.derive() function - allows to create custom colors and to save those in color palettes.

DeriveColorsFX This is not a serious application. Its a small tool where I just played with the method Color::deriveColor provided by JavaFX. Also its

Oliver Löffler 11 Oct 9, 2022
The goal of this project is to create AssertJ assertions for JavaFX (8).

The goal of this project is to create AssertJ assertions for JavaFX (8).

Manuel Mauky 6 Jul 30, 2021
InstallRepos - Install GitHub Repository on any Operating System (Linux, MacOS or Windows).

Install Repos Install GitHub Repository on any Operating System (Linux, MacOS or Windows). Requires Java JRE 17.0.0.1 or later. Repository Includes: s

Tushar Chaurasia 2 Apr 21, 2022
Terminal GUI library for simple ANSI console tools and graphical interfaces with Windows/Linux support

TerminalCore Terminal GUI library for Windows/Linux. This library contains all colors as ascii codes, native functions of the respective operating sys

Pascal 3 Oct 19, 2022
WavesFX an open-source Waves wallet for Windows, macOS and Linux

WavesFX WavesFX is an open-source Waves wallet for Windows, macOS and Linux. Telegram Chat Releases can be found on the release list. How to build Wav

WavesFX 22 Apr 15, 2022
Create your own auto-update framework

Read the documentation, explore the JavaDoc, or see it in action Create a framework: design the environment and lifecycle (—bootstrap) to make your ow

null 698 Dec 29, 2022
Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.

FXTrayIcon Library intended for use in JavaFX applications that makes adding a System Tray icon easier. The FXTrayIcon class handles all the messy AWT

Dustin Redmond 248 Dec 30, 2022
Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE 8 and provides the functionalities to use and handle easily Tiles in your JavaFX application.

Lib-Tile Intention Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tile

Peter Rogge 13 Apr 13, 2022
Docking framework for JavaFX platform

Docking framework for JavaFX platform AnchorFX is a gratis and open source library for JavaFX to create graphical interfaces with docking features Anc

Alessio Vinerbi 197 Oct 15, 2022
A Java framework for creating sophisticated calendar views (JavaFX 8, 9, 10, and 11)

CalendarFX A Java framework for creating sophisticated calendar views based on JavaFX. A detailed developer manual can be found online: CalendarFX 8 D

DLSC Software & Consulting GmbH 660 Jan 6, 2023
A framework for easily creating forms for a JavaFX UI.

FormsFX Forms for business application made easy. Creating forms in Java has never been this easy! Maven To use this framework as part of your Maven b

DLSC Software & Consulting GmbH 534 Dec 30, 2022