Search in sources :

Example 26 with Dimension2D

use of javafx.geometry.Dimension2D in project Board-Instrumentation-Framework by intel.

the class SimpleLineChartBuilder method build.

public final SimpleLineChart build() {
    final SimpleLineChart CONTROL = new SimpleLineChart();
    for (String key : properties.keySet()) {
        if ("prefSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("minSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("maxSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("prefWidth".equals(key)) {
            CONTROL.setPrefWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("prefHeight".equals(key)) {
            CONTROL.setPrefHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("minWidth".equals(key)) {
            CONTROL.setMinWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("minHeight".equals(key)) {
            CONTROL.setMinHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("maxWidth".equals(key)) {
            CONTROL.setMaxWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("maxHeight".equals(key)) {
            CONTROL.setMaxHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleX".equals(key)) {
            CONTROL.setScaleX(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleY".equals(key)) {
            CONTROL.setScaleY(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutX".equals(key)) {
            CONTROL.setLayoutX(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutY".equals(key)) {
            CONTROL.setLayoutY(((DoubleProperty) properties.get(key)).get());
        } else if ("translateX".equals(key)) {
            CONTROL.setTranslateX(((DoubleProperty) properties.get(key)).get());
        } else if ("translateY".equals(key)) {
            CONTROL.setTranslateY(((DoubleProperty) properties.get(key)).get());
        } else if ("styleClass".equals(key)) {
            CONTROL.getStyleClass().setAll("simple-line-chart", ((StringProperty) properties.get(key)).get());
        } else if ("series".equals(key)) {
            CONTROL.setSeries(((ObjectProperty<XYChart.Series>) properties.get(key)).get());
        } else if ("sectionRangeVisible".equals(key)) {
            CONTROL.setSectionRangeVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("sectionsArray".equals(key)) {
            CONTROL.setSections(((ObjectProperty<Section[]>) properties.get(key)).get());
        } else if ("sectionsList".equals(key)) {
            CONTROL.setSections(((ObjectProperty<List<Section>>) properties.get(key)).get());
        }
    }
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) BooleanProperty(javafx.beans.property.BooleanProperty) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Dimension2D(javafx.geometry.Dimension2D) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) StringProperty(javafx.beans.property.StringProperty) DoubleProperty(javafx.beans.property.DoubleProperty) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty) Section(eu.hansolo.enzo.common.Section)

Example 27 with Dimension2D

use of javafx.geometry.Dimension2D in project Board-Instrumentation-Framework by intel.

the class RoundLcdClockBuilder method build.

public final RoundLcdClock build() {
    final RoundLcdClock CONTROL = new RoundLcdClock();
    for (String key : properties.keySet()) {
        if ("prefSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("minSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("maxSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("prefWidth".equals(key)) {
            CONTROL.setPrefWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("prefHeight".equals(key)) {
            CONTROL.setPrefHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("minWidth".equals(key)) {
            CONTROL.setMinWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("minHeight".equals(key)) {
            CONTROL.setMinHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("maxWidth".equals(key)) {
            CONTROL.setMaxWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("maxHeight".equals(key)) {
            CONTROL.setMaxHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleX".equals(key)) {
            CONTROL.setScaleX(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleY".equals(key)) {
            CONTROL.setScaleY(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutX".equals(key)) {
            CONTROL.setLayoutX(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutY".equals(key)) {
            CONTROL.setLayoutY(((DoubleProperty) properties.get(key)).get());
        } else if ("translateX".equals(key)) {
            CONTROL.setTranslateX(((DoubleProperty) properties.get(key)).get());
        } else if ("translateY".equals(key)) {
            CONTROL.setTranslateY(((DoubleProperty) properties.get(key)).get());
        } else if ("color".equals(key)) {
            CONTROL.setColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("hourColor".equals(key)) {
            CONTROL.setHourColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("minuteColor".equals(key)) {
            CONTROL.setMinuteColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("minuteFiveColor".equals(key)) {
            CONTROL.setMinute5Color(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("secondColor".equals(key)) {
            CONTROL.setSecondColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("timeColor".equals(key)) {
            CONTROL.setTimeColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("dateColor".equals(key)) {
            CONTROL.setDateColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("alarmOn".equals(key)) {
            CONTROL.setAlarmOn(((BooleanProperty) properties.get(key)).get());
        } else if ("alarm".equals(key)) {
            CONTROL.setAlarm(((ObjectProperty<LocalTime>) properties.get(key)).get());
        } else if ("dateVisible".equals(key)) {
            CONTROL.setDateVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("alarmVisible".equals(key)) {
            CONTROL.setAlarmVisible(((BooleanProperty) properties.get(key)).get());
        }
    }
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) BooleanProperty(javafx.beans.property.BooleanProperty) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Dimension2D(javafx.geometry.Dimension2D) Color(javafx.scene.paint.Color) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty) DoubleProperty(javafx.beans.property.DoubleProperty)

Example 28 with Dimension2D

use of javafx.geometry.Dimension2D in project Board-Instrumentation-Framework by intel.

the class SignalTowerBuilder method build.

public final SignalTower build() {
    final SignalTower CONTROL = new SignalTower();
    properties.forEach((key, property) -> {
        if ("minSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) property).get();
            CONTROL.setMinSize(dim.getWidth(), dim.getHeight());
        } else if ("prefSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) property).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("maxSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) property).get();
            CONTROL.setMaxSize(dim.getWidth(), dim.getHeight());
        } else if ("minWidth".equals(key)) {
            CONTROL.setMinWidth(((DoubleProperty) property).get());
        } else if ("minHeight".equals(key)) {
            CONTROL.setMinHeight(((DoubleProperty) property).get());
        } else if ("prefWidth".equals(key)) {
            CONTROL.setPrefWidth(((DoubleProperty) property).get());
        } else if ("prefHeight".equals(key)) {
            CONTROL.setPrefHeight(((DoubleProperty) property).get());
        } else if ("maxWidth".equals(key)) {
            CONTROL.setMaxWidth(((DoubleProperty) property).get());
        } else if ("maxHeight".equals(key)) {
            CONTROL.setMaxHeight(((DoubleProperty) property).get());
        } else if ("layoutX".equals(key)) {
            CONTROL.setLayoutX(((DoubleProperty) property).get());
        } else if ("layoutY".equals(key)) {
            CONTROL.setLayoutY(((DoubleProperty) property).get());
        } else if ("translateX".equals(key)) {
            CONTROL.setTranslateX(((DoubleProperty) property).get());
        } else if ("translateY".equals(key)) {
            CONTROL.setTranslateY(((DoubleProperty) property).get());
        } else if ("scaleX".equals(key)) {
            CONTROL.setScaleX(((DoubleProperty) property).get());
        } else if ("scaleY".equals(key)) {
            CONTROL.setScaleY(((DoubleProperty) property).get());
        } else if ("greenOn".equals(key)) {
            CONTROL.setGreenOn(((BooleanProperty) property).get());
        } else if ("yellowOn".equals(key)) {
            CONTROL.setYellowOn(((BooleanProperty) property).get());
        } else if ("redOn".equals(key)) {
            CONTROL.setRedOn(((BooleanProperty) property).get());
        }
    });
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) BooleanProperty(javafx.beans.property.BooleanProperty) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Dimension2D(javafx.geometry.Dimension2D) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty) DoubleProperty(javafx.beans.property.DoubleProperty)

Example 29 with Dimension2D

use of javafx.geometry.Dimension2D in project Board-Instrumentation-Framework by intel.

the class QlockTwoBuilder method build.

public final QlockTwo build() {
    final QlockTwo CONTROL = new QlockTwo();
    for (String key : properties.keySet()) {
        if ("prefSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("minSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("maxSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("prefWidth".equals(key)) {
            CONTROL.setPrefWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("prefHeight".equals(key)) {
            CONTROL.setPrefHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("minWidth".equals(key)) {
            CONTROL.setMinWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("minHeight".equals(key)) {
            CONTROL.setMinHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("maxWidth".equals(key)) {
            CONTROL.setMaxWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("maxHeight".equals(key)) {
            CONTROL.setMaxHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleX".equals(key)) {
            CONTROL.setScaleX(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleY".equals(key)) {
            CONTROL.setScaleY(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutX".equals(key)) {
            CONTROL.setLayoutX(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutY".equals(key)) {
            CONTROL.setLayoutY(((DoubleProperty) properties.get(key)).get());
        } else if ("translateX".equals(key)) {
            CONTROL.setTranslateX(((DoubleProperty) properties.get(key)).get());
        } else if ("translateY".equals(key)) {
            CONTROL.setTranslateY(((DoubleProperty) properties.get(key)).get());
        } else if ("ledColor".equals(key)) {
            CONTROL.setColor(((ObjectProperty<QlockTwo.QlockColor>) properties.get(key)).get());
        } else if ("language".equals(key)) {
            CONTROL.setLanguage(((ObjectProperty<QlockTwo.Language>) properties.get(key)).get());
        } else if ("secondsMode".equals(key)) {
            CONTROL.setSecondsMode(((BooleanProperty) properties.get(key)).get());
        } else if ("highlightVisible".equals(key)) {
            CONTROL.setHighlightVisible(((BooleanProperty) properties.get(key)).get());
        }
    }
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) BooleanProperty(javafx.beans.property.BooleanProperty) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Dimension2D(javafx.geometry.Dimension2D) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty) DoubleProperty(javafx.beans.property.DoubleProperty)

Example 30 with Dimension2D

use of javafx.geometry.Dimension2D in project Board-Instrumentation-Framework by intel.

the class IconSwitchBuilder method build.

public final IconSwitch build() {
    final IconSwitch CONTROL = new IconSwitch();
    for (String key : properties.keySet()) {
        if ("prefSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("minSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("maxSize".equals(key)) {
            Dimension2D dim = ((ObjectProperty<Dimension2D>) properties.get(key)).get();
            CONTROL.setPrefSize(dim.getWidth(), dim.getHeight());
        } else if ("prefWidth".equals(key)) {
            CONTROL.setPrefWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("prefHeight".equals(key)) {
            CONTROL.setPrefHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("minWidth".equals(key)) {
            CONTROL.setMinWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("minHeight".equals(key)) {
            CONTROL.setMinHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("maxWidth".equals(key)) {
            CONTROL.setMaxWidth(((DoubleProperty) properties.get(key)).get());
        } else if ("maxHeight".equals(key)) {
            CONTROL.setMaxHeight(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleX".equals(key)) {
            CONTROL.setScaleX(((DoubleProperty) properties.get(key)).get());
        } else if ("scaleY".equals(key)) {
            CONTROL.setScaleY(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutX".equals(key)) {
            CONTROL.setLayoutX(((DoubleProperty) properties.get(key)).get());
        } else if ("layoutY".equals(key)) {
            CONTROL.setLayoutY(((DoubleProperty) properties.get(key)).get());
        } else if ("translateX".equals(key)) {
            CONTROL.setTranslateX(((DoubleProperty) properties.get(key)).get());
        } else if ("translateY".equals(key)) {
            CONTROL.setTranslateY(((DoubleProperty) properties.get(key)).get());
        } else if ("styleClass".equals(key)) {
            CONTROL.getStyleClass().setAll("on-off-switch", ((StringProperty) properties.get(key)).get());
        } else if ("switchColor".equals(key)) {
            CONTROL.setSwitchColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("thumbColorOn".equals(key)) {
            CONTROL.setThumbColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("symbolColor".equals(key)) {
            CONTROL.setSymbolColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("symbolType".equals(key)) {
            CONTROL.setSymbolType(((ObjectProperty<SymbolType>) properties.get(key)).get());
        } else if ("text".equals(key)) {
            CONTROL.setText(((StringProperty) properties.get(key)).get());
        } else if ("on".equals(key)) {
            CONTROL.setSelected(((BooleanProperty) properties.get(key)).get());
        }
    }
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) BooleanProperty(javafx.beans.property.BooleanProperty) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) Dimension2D(javafx.geometry.Dimension2D) Color(javafx.scene.paint.Color) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) StringProperty(javafx.beans.property.StringProperty) DoubleProperty(javafx.beans.property.DoubleProperty) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty)

Aggregations

Dimension2D (javafx.geometry.Dimension2D)43 DoubleProperty (javafx.beans.property.DoubleProperty)32 ObjectProperty (javafx.beans.property.ObjectProperty)32 SimpleDoubleProperty (javafx.beans.property.SimpleDoubleProperty)32 SimpleObjectProperty (javafx.beans.property.SimpleObjectProperty)32 BooleanProperty (javafx.beans.property.BooleanProperty)24 SimpleBooleanProperty (javafx.beans.property.SimpleBooleanProperty)24 SimpleStringProperty (javafx.beans.property.SimpleStringProperty)23 StringProperty (javafx.beans.property.StringProperty)23 Color (javafx.scene.paint.Color)22 IntegerProperty (javafx.beans.property.IntegerProperty)12 SimpleIntegerProperty (javafx.beans.property.SimpleIntegerProperty)12 List (java.util.List)7 Section (eu.hansolo.enzo.common.Section)4 VisibleData (eu.hansolo.tilesfx.chart.SunburstChart.VisibleData)2 Orientation (javafx.geometry.Orientation)2 Point2D (javafx.geometry.Point2D)2 Image (javafx.scene.image.Image)2 Stop (javafx.scene.paint.Stop)2 ShapeType (com.almasb.fxgl.physics.box2d.collision.shapes.ShapeType)1