View on GitHub

ScreenFX

A plugin library for JavaFX 8 adding features to resize and arrange stage windows for multiple screens

Download this project as a .zip file Download this project as a tar.gz file

Welcome to ScreenFX!

ScreenFX

What is ScreenFX?

ScreenFX is a library for JavaFX 8 which allows you to install a small and lightweight popup container to your application stages. This popup has abilities to handle positioning and resizing events of each stage. Please read further to learn how to use.

quartered stages example

taskbar on another side and program which reduces the real size of desktop

and another configuration example

Editor's note

This tool is inspired originally by the tool "Asus Multiframe" which was only capable to handle two screens. As the tool multiframe does not work an java applications and because of the screen number limitation i decided to write my own tool box.

Project requirements

This library is written for JavaFX 8 and was built with JDK 1.8.0-b121. If you compile the sources with JDK 1.7 it could mabye work 100% without any trouble.

How it works?

ScreenFX will read out your current system hardware configuration for screen devices and will create a grid layout:

The system layoutThe grid layout read from system configuration

As you can see the layout reacts on the total count of screens. If only one screen is available, ScreenFX will only show one (the default colored main screen #1). If more screens are installed all secondary screens get a darker color than screen #1.

1 screen2 screens

How to use?

The installation of ScreenFX is very easy. You do not need to initialize the tool manually. You only have to install the tool once per stage.

screenfx-current.jar into your JavaFX project and call the function like this:

Stage stage = new Stage();
ScreenFX screenFX = new ScreenFX();
screenFX.installOn(stage);

If you want more access to ScreenFX you can adjust the following properties (as listed in the features list):

Stage stage = new Stage();
ScreenFXProperties.put("iconSet", new ArrayList());
ScreenFXProperties.put("popupKeyCodeCombination", new KeyCodeCombination(KeyCode.S, KeyCombination.CONTROL_DOWN));
ScreenFXProperties.put("quickResizeKeyCodeCombination", KeyCode.CONTROL);
ScreenFXProperties.put("activateTaskbarKeyCodeCombination", KeyCode.SHIFT);
ScreenFXProperties.setResourceBundle(your custom resource bundle);
ScreenFXProperties.setResourcePath(//your custom path to icon and style files);
ScreenFXProperties.setTaskbarIncludeSelectedProperties(//your initial config for the 9 taskbar include checkboxes);
ScreenFXProperties.setAllowTooltips(//true/false);
ScreenFXProperties.setExitDelayTime(//your delay time as a long value);
screenFX.installOn(//stage);

There are four possible ways to set single key accelerators or key combinations of ScreenFX:

ScreenFXProperties.put("popupKeyCodeCombination", new KeyCodeCombination(KeyCode.S, KeyCombination.CONTROL_DOWN));
ScreenFXProperties.put("popupKeyCodeCombination", KeyCode.S);
ScreenFXProperties.put("popupKeyCodeCombination", KeyCode.SHIFT); //you can also use modifiers!
ScreenFXProperties.put("popupKeyCodeCombination", KeyCombination.keyCombination("Ctrl+Alt+X"));
ScreenFXProperties.put("popupKeyCodeCombination", KeyCharacterCombination.keyCombination("Ctrl+S"));

If you want to remove the key combinations do some property remove() call like the following example shows

ScreenFXProperties.remove("popupKeyCodeCombination");
ScreenFXProperties.remove("quickResizeKeyCodeCombination");
ScreenFXProperties.remove("activateTaskbarKeyCodeCombination");

Features

General

Tooltips

positioning and resizingadditional functionsinclude taskbar yes or noscreen information

Functions

To do

New features

Features to change

Bug fixing/avoiding

License

/*
 * ScreenFX - A plugin library for JavaFX 8 adding features for resizing 
 * and arranging stage windows on a multiple screen hardware configuration
 * 
 * Copyright (C) 2014 Mario Voigt 
 * Ulmenstr. 35 
 * 09112 Chemnitz 
 * Germany 
 * vmario@hrz.tu-chemnitz.de
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see http://www.gnu.org/licenses/gpl-3.0.html
 */