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:
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();
}
}
Version >= 0.5
is compatible with JDK >= 11. Just use the JavaFx Gradle plugin via
plugins {
id 'org.openjfx.javafxplugin' version '0.0.7' // use latest version
}
and declare the dependency to the controls
module.
javafx {
modules = [ 'javafx.controls' ]
}
Version <= 0.4
is compatible with JDK 8 (probably also 9 and 10)