Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miho/scaledfx
JavaFX pane for scaling arbitrary content nodes (used in VWorkflows)
https://github.com/miho/scaledfx
java javafx
Last synced: 2 months ago
JSON representation
JavaFX pane for scaling arbitrary content nodes (used in VWorkflows)
- Host: GitHub
- URL: https://github.com/miho/scaledfx
- Owner: miho
- Created: 2016-09-24T01:07:00.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T20:45:00.000Z (over 4 years ago)
- Last Synced: 2023-07-28T09:46:29.609Z (over 1 year ago)
- Topics: java, javafx
- Language: Java
- Homepage:
- Size: 151 KB
- Stars: 87
- Watchers: 8
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ScaledFX
[![Build Status](https://travis-ci.org/miho/ScaledFX.svg?branch=master)](https://travis-ci.org/miho/ScaledFX) [ ![Download](https://api.bintray.com/packages/miho/ScaledFX/ScaledFX/images/download.svg) ](https://bintray.com/miho/ScaledFX/ScaledFX/_latestVersion) [![Javadocs](https://www.javadoc.io/badge/eu.mihosoft.jfx.scaledfx/scaledfx.svg?color=blue)](https://www.javadoc.io/doc/eu.mihosoft.jfx.scaledfx/scaledfx)JavaFX pane for scaling arbitrary content nodes (used in Vworkflows) by applying scale transformations. The `ScalableContentPane` scales its content to always fit the container bounds.
![Sample 1](https://media.giphy.com/media/l3vR99nMoId6DEOeA/giphy.gif)
![Sample 2](https://media.giphy.com/media/XvKr0mGNGtP8I/giphy.gif)
**Sample Code:**
```java
public class Main extends Application {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}@Override
public void start(Stage primaryStage) throws Exception {
ScalableContentPane scp =
new ScalableContentPane(new Button("Scaled Button"));
primaryStage.setScene(new Scene(scp));
primaryStage.setTitle("Scalable Content Pane Demo");
primaryStage.show();
}
}
```## Notes on JDK >=11
Version `>= 0.5` is compatible with JDK >= 11. Just use the [JavaFx Gradle plugin](https://openjfx.io/openjfx-docs/#gradle) via
```gradle
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7' // use latest version
}
```and declare the dependency to the `controls` module.
```gradle
javafx {
modules = [ 'javafx.controls' ]
}
```## Notes on JDK 8
Version `<= 0.4` is compatible with JDK 8 (probably also 9 and 10)