use of javafx.scene.Scene in project Entitas-Java by Rubentxu.
the class VisualDebbuger method start.
@Override
public void start(Stage primaryStage) throws Exception {
FXMLLoader loader = new FXMLLoader(getClass().getClassLoader().getResource("VisualDebbuger.fxml"));
Parent root = loader.load();
primaryStage.setTitle("CodeGenerator");
primaryStage.setScene(new Scene(root, 560, 575));
primaryStage.setResizable(false);
primaryStage.show();
stage = primaryStage;
client = new JmxClient("localhost", 1313);
Set<ObjectName> names = client.getBeanNames();
beanNames.setText(names.stream().map(n -> n.getKeyPropertyListString()).reduce(String::concat).get());
// MBeanAttributeInfo[] attributeInfos =
// client.getAttributesInfo(objectName);
// MBeanOperationInfo[] operationInfos =
// client.getOperationsInfo(objectName);
}
use of javafx.scene.Scene in project Smartcity-Smarthouse by TechnionYP5777.
the class ShutterSensorSimulator method start.
@Override
public void start(final Stage primaryStage) throws Exception {
final Parent root = FXMLLoader.load(getClass().getResource("/sensors/shutter/shutter_ui.fxml"));
final Scene scene = new Scene(root);
primaryStage.setTitle("Shutter Sensor Simulator");
primaryStage.setScene(scene);
primaryStage.show();
}
use of javafx.scene.Scene in project Smartcity-Smarthouse by TechnionYP5777.
the class SosSensorSimulator method start.
@Override
public void start(final Stage s) throws Exception {
sensor = new SosSensor(Random.sensorId(), 40001);
for (boolean res = false; !res; ) res = sensor.register();
final Image sosImage = new Image(getClass().getResourceAsStream("/sensors/sos/sos_icon.png"), 320, 0, true, true);
final Button sosButton = new Button();
sosButton.setId("sosButton");
sosButton.setGraphic(new ImageView(sosImage));
sosButton.setStyle("-fx-focus-color: transparent;");
sosButton.setOnAction(event -> sensor.updateSystem());
final StackPane layout = new StackPane();
layout.getChildren().add(sosButton);
s.setScene(new Scene(layout, 320, 268));
s.setTitle("SOS Sensor Simulator");
s.show();
}
use of javafx.scene.Scene in project Smartcity-Smarthouse by TechnionYP5777.
the class Controller method openConfiguration.
private void openConfiguration(Integer position) {
try {
URL location = getClass().getClassLoader().getResource("dashboard_configuration_ui.fxml");
// System.out.println(location);todo: ELIA why is this the location?
final FXMLLoader fxmlLoader = new FXMLLoader(location);
final Parent root1 = (Parent) fxmlLoader.load();
final Stage stage = new Stage();
ConfigurationController controller = fxmlLoader.getController();
controller.SetCallback(() -> updateTile(controller.getChosenType(), controller.getChosenPath(), position));
stage.setScene(new Scene(root1));
stage.show();
} catch (final Exception $) {
// TODO: handle error
System.out.println("Oops...");
$.printStackTrace();
}
}
use of javafx.scene.Scene in project Smartcity-Smarthouse by TechnionYP5777.
the class TempDashboard method start.
@Override
public void start(Stage stage) throws Exception {
pane = new FlowPane(Orientation.HORIZONTAL, 1, 1, textTile);
pane.setPadding(new Insets(5));
pane.setPrefSize(150, 150);
pane.setBackground(new Background(new BackgroundFill(Tile.BACKGROUND.darker(), CornerRadii.EMPTY, Insets.EMPTY)));
Scene scene = new Scene(pane);
stage.setTitle("Dashboard Configuration in Action");
stage.setScene(scene);
stage.show();
}
Aggregations