Search in sources :

Example 31 with Dimension2D

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

the class OnOffSwitchBuilder method build.

public final OnOffSwitch build() {
    final OnOffSwitch CONTROL = new OnOffSwitch();
    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 ("textColorOn".equals(key)) {
            CONTROL.setTextColorOn(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("textColorOff".equals(key)) {
            CONTROL.setTextColorOff(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("thumbColor".equals(key)) {
            CONTROL.setThumbColor(((ObjectProperty<Color>) 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) Dimension2D(javafx.geometry.Dimension2D) Color(javafx.scene.paint.Color) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) StringProperty(javafx.beans.property.StringProperty) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty) DoubleProperty(javafx.beans.property.DoubleProperty)

Example 32 with Dimension2D

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

the class SixteenSegmentBuilder method build.

public final SixteenSegment build() {
    final SixteenSegment CONTROL = new SixteenSegment();
    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("sixteen-segment", ((StringProperty) properties.get(key)).get());
        } else if ("segmentStyle".equals(key)) {
            CONTROL.setSegmentStyle(((ObjectProperty<SixteenSegment.SegmentStyle>) properties.get(key)).get());
        } else if ("characterString".equals(key)) {
            CONTROL.setCharacter(((StringProperty) properties.get(key)).get());
        } else if ("characterChar".equals(key)) {
            CONTROL.setCharacter(((ObjectProperty<Character>) properties.get(key)).get());
        } else if ("characterInt".equals(key)) {
            CONTROL.setCharacter(((IntegerProperty) properties.get(key)).get());
        } else if ("dotOn".equals(key)) {
            CONTROL.setDotOn(((BooleanProperty) properties.get(key)).get());
        }
    }
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) IntegerProperty(javafx.beans.property.IntegerProperty) SimpleIntegerProperty(javafx.beans.property.SimpleIntegerProperty) Dimension2D(javafx.geometry.Dimension2D) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) StringProperty(javafx.beans.property.StringProperty) DoubleProperty(javafx.beans.property.DoubleProperty) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty)

Example 33 with Dimension2D

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

the class LcdBuilder method build.

public final Lcd build() {
    final Lcd CONTROL = new Lcd();
    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("lcd", ((StringProperty) properties.get(key)).get());
        } else if ("textMode".equals(key)) {
            CONTROL.setTextMode(((BooleanProperty) properties.get(key)).get());
        } else if ("text".equals(key)) {
            CONTROL.setText(((StringProperty) properties.get(key)).get());
        } else if ("value".equals(key)) {
            CONTROL.setValue(((DoubleProperty) properties.get(key)).get());
        } else if ("minValue".equals(key)) {
            CONTROL.setMinValue(((DoubleProperty) properties.get(key)).get());
        } else if ("maxValue".equals(key)) {
            CONTROL.setMaxValue(((DoubleProperty) properties.get(key)).get());
        } else if ("animated".equals(key)) {
            CONTROL.setAnimated(((BooleanProperty) properties.get(key)).get());
        } else if ("animationDuration".equals(key)) {
            CONTROL.setAnimationDuration(((DoubleProperty) properties.get(key)).get());
        } else if ("threshold".equals(key)) {
            CONTROL.setThreshold(((DoubleProperty) properties.get(key)).get());
        } else if ("decimals".equals(key)) {
            CONTROL.setDecimals(((IntegerProperty) properties.get(key)).get());
        } else if ("keepAspect".equals(key)) {
            CONTROL.setKeepAspect(((BooleanProperty) properties.get(key)).get());
        } else if ("noFrame".equals(key)) {
            CONTROL.setNoFrame(((BooleanProperty) properties.get(key)).get());
        } else if ("backgroundVisible".equals(key)) {
            CONTROL.setBackgroundVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("crystalOverlayVisible".equals(key)) {
            CONTROL.setCrystalOverlayVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("mainInnerShadowVisible".equals(key)) {
            CONTROL.setMainInnerShadowVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("foregroundShadowVisible".equals(key)) {
            CONTROL.setForegroundShadowVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("minMeasuredValueVisible".equals(key)) {
            CONTROL.setMinMeasuredValueVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("minMeasuredValueDecimals".equals(key)) {
            CONTROL.setMinMeasuredValueDecimals(((IntegerProperty) properties.get(key)).get());
        } else if ("maxMeasuredValueVisible".equals(key)) {
            CONTROL.setMaxMeasuredValueVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("maxMeasuredValueDecimals".equals(key)) {
            CONTROL.setMaxMeasuredValueDecimals(((IntegerProperty) properties.get(key)).get());
        } else if ("formerValueVisible".equals(key)) {
            CONTROL.setFormerValueVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("title".equals(key)) {
            CONTROL.setTitle(((StringProperty) properties.get(key)).get());
        } else if ("titleVisible".equals(key)) {
            CONTROL.setTitleVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("unit".equals(key)) {
            CONTROL.setUnit(((StringProperty) properties.get(key)).get());
        } else if ("unitVisible".equals(key)) {
            CONTROL.setUnitVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("lowerCenterText".equals(key)) {
            CONTROL.setLowerCenterText(((StringProperty) properties.get(key)).get());
        } else if ("lowerCenterTextVisible".equals(key)) {
            CONTROL.setLowerCenterTextVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("lowerRightText".equals(key)) {
            CONTROL.setLowerRightText(((StringProperty) properties.get(key)).get());
        } else if ("lowerRightTextVisible".equals(key)) {
            CONTROL.setLowerRightTextVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("upperLeftText".equals(key)) {
            CONTROL.setUpperLeftText(((StringProperty) properties.get(key)).get());
        } else if ("upperLeftTextVisible".equals(key)) {
            CONTROL.setUpperLeftTextVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("upperRightText".equals(key)) {
            CONTROL.setUpperRightText(((StringProperty) properties.get(key)).get());
        } else if ("upperRightTextVisible".equals(key)) {
            CONTROL.setUpperRightTextVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("trendVisible".equals(key)) {
            CONTROL.setTrendVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("trend".equals(key)) {
            CONTROL.setTrend(((ObjectProperty<Lcd.Trend>) properties.get(key)).get());
        } else if ("batteryCharge".equals(key)) {
            CONTROL.setBatteryCharge(((DoubleProperty) properties.get(key)).get());
        } else if ("batteryVisible".equals(key)) {
            CONTROL.setBatteryVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("signalStrength".equals(key)) {
            CONTROL.setSignalStrength(((DoubleProperty) properties.get(key)).get());
        } else if ("signalVisible".equals(key)) {
            CONTROL.setSignalVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("alarmVisible".equals(key)) {
            CONTROL.setAlarmVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("thresholdVisible".equals(key)) {
            CONTROL.setThresholdVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("thresholdBehaviorInverted".equals(key)) {
            CONTROL.setThresholdBehaviorInverted(((BooleanProperty) properties.get(key)).get());
        } else if ("numberSystem".equals(key)) {
            CONTROL.setNumberSystem(((ObjectProperty<Lcd.NumberSystem>) properties.get(key)).get());
        } else if ("numberSystemVisible".equals(key)) {
            CONTROL.setNumberSystemVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("unitFont".equals(key)) {
            CONTROL.setUnitFont(((StringProperty) properties.get(key)).get());
        } else if ("titleFont".equals(key)) {
            CONTROL.setTitleFont(((StringProperty) properties.get(key)).get());
        } else if ("valueFont".equals(key)) {
            CONTROL.setValueFont(((ObjectProperty<Lcd.LcdFont>) properties.get(key)).get());
        } else if ("smallFont".equals(key)) {
            CONTROL.setSmallFont(((StringProperty) properties.get(key)).get());
        } else if ("lcdDesign".equals(key)) {
            CONTROL.setLcdDesign(((ObjectProperty<LcdDesign>) 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)

Example 34 with Dimension2D

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

the class RadialBargraphBuilder method build.

public final RadialBargraph build() {
    final RadialBargraph CONTROL = new RadialBargraph();
    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("gauge");
            CONTROL.getStyleClass().addAll(((ObjectProperty<String[]>) properties.get(key)).get());
        } else if ("minValue".equals(key)) {
            CONTROL.setMinValue(((DoubleProperty) properties.get(key)).get());
        } else if ("maxValue".equals(key)) {
            CONTROL.setMaxValue(((DoubleProperty) properties.get(key)).get());
        } else if ("value".equals(key)) {
            CONTROL.setValue(((DoubleProperty) properties.get(key)).get());
        } else if ("threshold".equals(key)) {
            CONTROL.setThreshold(((DoubleProperty) 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());
        } else if ("markersArray".equals(key)) {
            CONTROL.setMarkers(((ObjectProperty<Marker[]>) properties.get(key)).get());
        } else if ("markersList".equals(key)) {
            CONTROL.setMarkers(((ObjectProperty<List<Marker>>) properties.get(key)).get());
        } else if ("decimals".equals(key)) {
            CONTROL.setDecimals(((IntegerProperty) properties.get(key)).get());
        } else if ("title".equals(key)) {
            CONTROL.setTitle(((StringProperty) properties.get(key)).get());
        } else if ("unit".equals(key)) {
            CONTROL.setUnit(((StringProperty) properties.get(key)).get());
        } else if ("animated".equals(key)) {
            CONTROL.setAnimated(((BooleanProperty) properties.get(key)).get());
        } else if ("animationDuration".equals(key)) {
            CONTROL.setAnimationDuration(((DoubleProperty) properties.get(key)).get());
        } else if ("minMeasuredValueVisible".equals(key)) {
            CONTROL.setMinMeasuredValueVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("maxMeasuredValueVisible".equals(key)) {
            CONTROL.setMaxMeasuredValueVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("thresholdVisible".equals(key)) {
            CONTROL.setThresholdVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("startAngle".equals(key)) {
            CONTROL.setStartAngle(((DoubleProperty) properties.get(key)).get());
        } else if ("angleRange".equals(key)) {
            CONTROL.setAngleRange(((DoubleProperty) properties.get(key)).get());
        } else if ("autoScale".equals(key)) {
            CONTROL.setAutoScale(((BooleanProperty) properties.get(key)).get());
        } else if ("barColor".equals(key)) {
            CONTROL.setBarColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("numberFormat".equals(key)) {
            CONTROL.setNumberFormat(((ObjectProperty<RadialBargraph.NumberFormat>) properties.get(key)).get());
        } else if ("minorTickSpace".equals(key)) {
            CONTROL.setMinorTickSpace(((DoubleProperty) properties.get(key)).get());
        } else if ("plainValue".equals(key)) {
            CONTROL.setPlainValue(((BooleanProperty) properties.get(key)).get());
        } else if ("sectionFill0".equals(key)) {
            CONTROL.setSectionFill0(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill1".equals(key)) {
            CONTROL.setSectionFill1(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill2".equals(key)) {
            CONTROL.setSectionFill2(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill3".equals(key)) {
            CONTROL.setSectionFill3(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill4".equals(key)) {
            CONTROL.setSectionFill4(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill5".equals(key)) {
            CONTROL.setSectionFill5(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill6".equals(key)) {
            CONTROL.setSectionFill6(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill7".equals(key)) {
            CONTROL.setSectionFill7(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill8".equals(key)) {
            CONTROL.setSectionFill8(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill9".equals(key)) {
            CONTROL.setSectionFill9(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("markerFill0".equals(key)) {
            CONTROL.setMarkerFill0(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("markerFill1".equals(key)) {
            CONTROL.setMarkerFill1(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("markerFill2".equals(key)) {
            CONTROL.setMarkerFill2(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("markerFill3".equals(key)) {
            CONTROL.setMarkerFill3(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("markerFill4".equals(key)) {
            CONTROL.setMarkerFill4(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionsVisible".equals(key)) {
            CONTROL.setSectionsVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("markersVisible".equals(key)) {
            CONTROL.setMarkersVisible(((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) Marker(eu.hansolo.enzo.common.Marker) DoubleProperty(javafx.beans.property.DoubleProperty) SimpleDoubleProperty(javafx.beans.property.SimpleDoubleProperty) Section(eu.hansolo.enzo.common.Section)

Example 35 with Dimension2D

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

the class RadialBuilder method build.

public final Radial build() {
    final Radial CONTROL = new Radial();
    // Make sure that sections and markers will be added first
    if (properties.keySet().contains("sectionsArray")) {
        CONTROL.setSections(((ObjectProperty<Section[]>) properties.get("sectionsArray")).get());
    }
    if (properties.keySet().contains("sectionsList")) {
        CONTROL.setSections(((ObjectProperty<List<Section>>) properties.get("sectionsList")).get());
    }
    if (properties.keySet().contains("areasArray")) {
        CONTROL.setAreas(((ObjectProperty<Section[]>) properties.get("areasArray")).get());
    }
    if (properties.keySet().contains("areasList")) {
        CONTROL.setAreas(((ObjectProperty<List<Section>>) properties.get("areasList")).get());
    }
    properties.forEach((key, property) -> {
        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("gauge");
            CONTROL.getStyleClass().addAll(((ObjectProperty<String[]>) properties.get(key)).get());
        } else if ("minValue".equals(key)) {
            CONTROL.setMinValue(((DoubleProperty) properties.get(key)).get());
        } else if ("maxValue".equals(key)) {
            CONTROL.setMaxValue(((DoubleProperty) properties.get(key)).get());
        } else if ("value".equals(key)) {
            CONTROL.setValue(((DoubleProperty) properties.get(key)).get());
        } else if ("decimals".equals(key)) {
            CONTROL.setDecimals(((IntegerProperty) properties.get(key)).get());
        } else if ("title".equals(key)) {
            CONTROL.setTitle(((StringProperty) properties.get(key)).get());
        } else if ("unit".equals(key)) {
            CONTROL.setUnit(((StringProperty) properties.get(key)).get());
        } else if ("animated".equals(key)) {
            CONTROL.setAnimated(((BooleanProperty) properties.get(key)).get());
        } else if ("animationDuration".equals(key)) {
            CONTROL.setAnimationDuration(((DoubleProperty) properties.get(key)).get());
        } else if ("startAngle".equals(key)) {
            CONTROL.setStartAngle(((DoubleProperty) properties.get(key)).get());
        } else if ("angleRange".equals(key)) {
            CONTROL.setAngleRange(((DoubleProperty) properties.get(key)).get());
        } else if ("autoScale".equals(key)) {
            CONTROL.setAutoScale(((BooleanProperty) properties.get(key)).get());
        } else if ("ledColor".equals(key)) {
            CONTROL.setLedColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("ledVisible".equals(key)) {
            CONTROL.setLedVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("lcdVisible".equals(key)) {
            CONTROL.setLcdVisible(((BooleanProperty) properties.get(key)).get());
        } else if ("needleColor".equals(key)) {
            CONTROL.setNeedleColor(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("tickLabelOrientation".equals(key)) {
            CONTROL.setTickLabelOrientation(((ObjectProperty<Radial.TickLabelOrientation>) properties.get(key)).get());
        } else if ("numberFormat".equals(key)) {
            CONTROL.setNumberFormat(((ObjectProperty<Radial.NumberFormat>) properties.get(key)).get());
        } else if ("majorTickSpace".equals(key)) {
            CONTROL.setMajorTickSpace(((DoubleProperty) properties.get(key)).get());
        } else if ("minorTickSpace".equals(key)) {
            CONTROL.setMinorTickSpace(((DoubleProperty) properties.get(key)).get());
        } else if ("tickLabelFill".equals(key)) {
            CONTROL.setTickLabelFill(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("tickMarkFill".equals(key)) {
            CONTROL.setTickMarkFill(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("style".equals(key)) {
            CONTROL.setStyle(((StringProperty) properties.get(key)).get());
        } else if ("frameSizeFactor".equals(key)) {
            CONTROL.setFrameSizeFactor(((DoubleProperty) properties.get(key)).get());
        } else if ("sectionFill0".equals(key)) {
            CONTROL.setSectionFill0(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill1".equals(key)) {
            CONTROL.setSectionFill1(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill2".equals(key)) {
            CONTROL.setSectionFill2(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill3".equals(key)) {
            CONTROL.setSectionFill3(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill4".equals(key)) {
            CONTROL.setSectionFill4(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill5".equals(key)) {
            CONTROL.setSectionFill5(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill6".equals(key)) {
            CONTROL.setSectionFill6(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill7".equals(key)) {
            CONTROL.setSectionFill7(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill8".equals(key)) {
            CONTROL.setSectionFill8(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("sectionFill9".equals(key)) {
            CONTROL.setSectionFill9(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill0".equals(key)) {
            CONTROL.setAreaFill0(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill1".equals(key)) {
            CONTROL.setAreaFill1(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill2".equals(key)) {
            CONTROL.setAreaFill2(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill3".equals(key)) {
            CONTROL.setAreaFill3(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill4".equals(key)) {
            CONTROL.setAreaFill4(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill5".equals(key)) {
            CONTROL.setAreaFill5(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill6".equals(key)) {
            CONTROL.setAreaFill6(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill7".equals(key)) {
            CONTROL.setAreaFill7(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill8".equals(key)) {
            CONTROL.setAreaFill8(((ObjectProperty<Color>) properties.get(key)).get());
        } else if ("areaFill9".equals(key)) {
            CONTROL.setAreaFill9(((ObjectProperty<Color>) properties.get(key)).get());
        }
    });
    return CONTROL;
}
Also used : ObjectProperty(javafx.beans.property.ObjectProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) IntegerProperty(javafx.beans.property.IntegerProperty) SimpleIntegerProperty(javafx.beans.property.SimpleIntegerProperty) 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) List(java.util.List) 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