use of javafx.beans.property.IntegerProperty in project Board-Instrumentation-Framework by intel.
the class SimpleGaugeBuilder method build.
public final SimpleGauge build() {
final SimpleGauge CONTROL = new SimpleGauge();
// Make sure that sections will be added first
if (properties.keySet().contains("sectionsArray")) {
CONTROL.setSections(((ObjectProperty<Section[]>) properties.get("sectionsArray")).get());
} else if (properties.keySet().contains("sectionsList")) {
CONTROL.setSections(((ObjectProperty<List<Section>>) properties.get("sectionsList")).get());
}
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-gauge");
CONTROL.getStyleClass().addAll(((ObjectProperty<String[]>) properties.get(key)).get());
} else if ("maxValue".equals(key)) {
CONTROL.setMaxValue(((DoubleProperty) properties.get(key)).get());
} else if ("minValue".equals(key)) {
CONTROL.setMinValue(((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 ("sectionTextVisible".equals(key)) {
CONTROL.setSectionTextVisible(((BooleanProperty) properties.get(key)).get());
} else if ("sectionIconVisible".equals(key)) {
CONTROL.setSectionIconVisible(((BooleanProperty) 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 ("needleColor".equals(key)) {
CONTROL.setNeedleColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("borderColor".equals(key)) {
CONTROL.setBorderColor(((ObjectProperty<Color>) 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 ("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 ("valueTextColor".equals(key)) {
CONTROL.setValueTextColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("titleTextColor".equals(key)) {
CONTROL.setTitleTextColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("sectionTextColor".equals(key)) {
CONTROL.setSectionTextColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("measuredRangeVisible".equals(key)) {
CONTROL.setMeasuredRangeVisible(((BooleanProperty) properties.get(key)).get());
} else if ("rangeFill".equals(key)) {
CONTROL.setRangeFill(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("valueVisible".equals(key)) {
CONTROL.setValueVisible(((BooleanProperty) properties.get(key)).get());
} else if ("titleVisible".equals(key)) {
CONTROL.setTitleVisible(((BooleanProperty) properties.get(key)).get());
} else if ("customFontEnabled".equals(key)) {
CONTROL.setCustomFontEnabled(((BooleanProperty) properties.get(key)).get());
} else if ("customFont".equals(key)) {
CONTROL.setCustomFont(((ObjectProperty<Font>) properties.get(key)).get());
}
}
return CONTROL;
}
use of javafx.beans.property.IntegerProperty in project Board-Instrumentation-Framework by intel.
the class OneEightyGaugeBuilder method build.
public final OneEightyGauge build() {
final OneEightyGauge CONTROL = new OneEightyGauge();
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("one-eighty-gauge");
CONTROL.getStyleClass().addAll(((ObjectProperty<String[]>) properties.get(key)).get());
} else if ("maxValue".equals(key)) {
CONTROL.setMaxValue(((DoubleProperty) properties.get(key)).get());
} else if ("minValue".equals(key)) {
CONTROL.setMinValue(((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 ("shadowsEnabled".equals(key)) {
CONTROL.setShadowsEnabled(((BooleanProperty) 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 ("barBackgroundColor".equals(key)) {
CONTROL.setBarBackgroundColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("barColor".equals(key)) {
CONTROL.setBarColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("titleColor".equals(key)) {
CONTROL.setTitleColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("valueColor".equals(key)) {
CONTROL.setValueColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("unitColor".equals(key)) {
CONTROL.setUnitColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("minTextColor".equals(key)) {
CONTROL.setMinTextColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("maxTextColor".equals(key)) {
CONTROL.setMaxTextColor(((ObjectProperty<Color>) properties.get(key)).get());
} else if ("dynamicBarColor".equals(key)) {
CONTROL.setDynamicBarColor(((BooleanProperty) properties.get(key)).get());
} else if ("stopsArray".equals(key)) {
CONTROL.setStops(((ObjectProperty<Stop[]>) properties.get(key)).get());
} else if ("stopsList".equals(key)) {
CONTROL.setStops(((ObjectProperty<List<Stop>>) properties.get(key)).get());
} else if ("gradientLookup".equals(key)) {
CONTROL.setGradientLookup(((ObjectProperty<GradientLookup>) properties.get(key)).get());
}
}
return CONTROL;
}
use of javafx.beans.property.IntegerProperty in project Board-Instrumentation-Framework by intel.
the class LedBargraphBuilder method build.
public final LedBargraph build() {
final LedBargraph CONTROL = new LedBargraph();
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 ("noOfLeds".equals(key)) {
CONTROL.setNoOfLeds(((IntegerProperty) properties.get(key)).get());
} else if ("ledType".equals(key)) {
CONTROL.setLedType(((ObjectProperty<Led.LedType>) properties.get(key)).get());
} else if ("orientation".equals(key)) {
CONTROL.setOrientation(((ObjectProperty<Orientation>) properties.get(key)).get());
} else if ("peakValueVisible".equals(key)) {
CONTROL.setPeakValueVisible(((BooleanProperty) properties.get(key)).get());
} else if ("ledSize".equals(key)) {
CONTROL.setLedSize(((DoubleProperty) properties.get(key)).get());
} else if ("ledColorsArray".equals(key)) {
CONTROL.setLedColors(((ObjectProperty<Color[]>) properties.get(key)).get());
} else if ("ledColorsList".equals(key)) {
CONTROL.setLedColors(((ObjectProperty<LinkedList<Color>>) properties.get(key)).get());
} else if ("ledColor".equals(key)) {
CONTROL.setLedColor(((IntegerProperty) properties.get("ledColorIndex")).get(), ((ObjectProperty<Color>) properties.get(key)).get());
} else if ("value".equals(key)) {
CONTROL.setValue(((DoubleProperty) properties.get(key)).get());
}
}
return CONTROL;
}
use of javafx.beans.property.IntegerProperty in project JFoenix by jfoenixadmin.
the class TreeTableViewController method setupReadOnlyTableView.
private void setupReadOnlyTableView() {
setupCellValueFactory(firstNameColumn, Person::firstNameProperty);
setupCellValueFactory(lastNameColumn, Person::lastNameProperty);
setupCellValueFactory(ageColumn, p -> p.age.asObject());
ObservableList<Person> dummyData = generateDummyData(100);
treeTableView.setRoot(new RecursiveTreeItem<>(dummyData, RecursiveTreeObject::getChildren));
treeTableView.setShowRoot(false);
treeTableViewCount.textProperty().bind(Bindings.createStringBinding(() -> PREFIX + treeTableView.getCurrentItemsCount() + POSTFIX, treeTableView.currentItemsCountProperty()));
treeTableViewAdd.disableProperty().bind(Bindings.notEqual(-1, treeTableView.getSelectionModel().selectedIndexProperty()));
treeTableViewRemove.disableProperty().bind(Bindings.equal(-1, treeTableView.getSelectionModel().selectedIndexProperty()));
treeTableViewAdd.setOnMouseClicked((e) -> {
dummyData.add(createNewRandomPerson());
final IntegerProperty currCountProp = treeTableView.currentItemsCountProperty();
currCountProp.set(currCountProp.get() + 1);
});
treeTableViewRemove.setOnMouseClicked((e) -> {
dummyData.remove(treeTableView.getSelectionModel().selectedItemProperty().get().getValue());
final IntegerProperty currCountProp = treeTableView.currentItemsCountProperty();
currCountProp.set(currCountProp.get() - 1);
});
searchField.textProperty().addListener(setupSearchField(treeTableView));
}
use of javafx.beans.property.IntegerProperty in project trex-stateless-gui by cisco-system-traffic-generator.
the class UtilizationController method initCPUUtilTable.
private void initCPUUtilTable(List<UtilizationCPUModel> cpuUtilsModels) {
if (cpuUtilsModels.isEmpty()) {
return;
}
UtilizationCPUModel model = cpuUtilsModels.get(0);
TableColumn<UtilizationCPUModel, String> threadColumn = new TableColumn<>();
threadColumn.setText("Thread");
threadColumn.setCellValueFactory(cellData -> cellData.getValue().threadProperty());
TableColumn<UtilizationCPUModel, String> avgColumn = new TableColumn<>();
avgColumn.setText("Avg");
avgColumn.setCellValueFactory(cellData -> cellData.getValue().avgProperty().asString());
Iterator<IntegerProperty> iterator = model.getHistory().iterator();
iterator.next();
TableColumn<UtilizationCPUModel, String> latestColumn = new TableColumn<>();
latestColumn.setText("Latest");
latestColumn.setCellValueFactory(cellData -> cellData.getValue().getHistory(0).asString());
cpuUtilTable.getColumns().addAll(threadColumn, avgColumn, latestColumn);
for (int i = 1; i < model.getHistory().size(); i++) {
final int idx = i;
TableColumn<UtilizationCPUModel, String> historyColumn = new TableColumn<>();
historyColumn.setText(String.valueOf(-idx));
historyColumn.setCellValueFactory(cellData -> cellData.getValue().getHistory(idx).asString());
cpuUtilTable.getColumns().add(historyColumn);
}
}
Aggregations