https://github.com/miho/scaledfx
JavaFX pane for scaling arbitrary content nodes (used in VWorkflows)
https://github.com/miho/scaledfx
java javafx
Last synced: 17 days 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 (almost 5 years ago)
- Last Synced: 2025-03-22T04:51:18.275Z (about 1 month ago)
- Topics: java, javafx
- Language: Java
- Homepage:
- Size: 151 KB
- Stars: 90
- Watchers: 7
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ScaledFX
[](https://travis-ci.org/miho/ScaledFX) [  ](https://bintray.com/miho/ScaledFX/ScaledFX/_latestVersion) [](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 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)