Tuesday, 6 August 2013
My First JavaFX Radial Gauge
public class MyFirstRadialGauge extends Application {
@Override
public void start(Stage primaryStage) {
//primaryStage.initStyle(StageStyle.TRANSPARENT);
Marker temperature = new Marker(50, Color.MAGENTA);
Marker[] markerList = new Marker[]{temperature};
Gauge radial = GaugeBuilder.create()
.prefWidth(500)
.prefHeight(500)
.gaugeType(GaugeBuilder.GaugeType.RADIAL)
.frameDesign(Gauge.FrameDesign.STEEL)
...
.title("Temperature")
.unit("°C")
.build();
StackPane root = new StackPane();
root.getChildren().add(radial);
radial.setLcdValue(10.00);
radial.setLcdDecimals(2);
radial.setLcdUnitVisible(false);
temperature.setValue(30);
Scene scene = new Scene(root, 500, 500);
primaryStage.setTitle("My First Radial Gauge");
primaryStage.setScene(scene);
primaryStage.show();
}
References
http://harmoniccode.blogspot.ro/2012/06/jfxtras-series-radial-gauge.html
http://grepcode.com/snapshot/repo1.maven.org/maven2/org.jfxtras/jfxtras-labs/2.2-r5/
Labels:
JavaFX
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment