Search in sources :

Example 56 with Region

use of javafx.scene.layout.Region in project Gargoyle by callakrsos.

the class ColorAnalysisExam method start.

/*
	 * (non-Javadoc)
	 * 
	 * @see javafx.application.Application#start(javafx.stage.Stage)
	 */
@Override
public void start(Stage primaryStage) throws Exception {
    BorderPane root = new BorderPane();
    ColorPicker value = new ColorPicker();
    root.setTop(value);
    List<Label> arrayList = new ArrayList<>();
    for (int i = 0; i < 7; i++) {
        Label region = new Label();
        region.setPrefWidth(100);
        region.setPrefHeight(100);
        String text = "";
        switch(i) {
            case 0:
                text = "Default";
                break;
            case 1:
                text = "Brigher";
                break;
            case 2:
                text = "darker";
                break;
            case 3:
                text = "desaturate";
                break;
            case 4:
                text = "grayscale";
                break;
            case 5:
                text = "invert";
                break;
            case 6:
                text = "saturate";
                break;
        }
        region.setText(text);
        arrayList.add(region);
    }
    Region region2 = new Region();
    region2.setPrefWidth(100);
    region2.setPrefHeight(100);
    value.valueProperty().addListener((oba, o, n) -> {
        arrayList.get(0).setBackground(new Background(new BackgroundFill(n, CornerRadii.EMPTY, new Insets(0))));
        arrayList.get(1).setBackground(new Background(new BackgroundFill(n.brighter(), CornerRadii.EMPTY, new Insets(0))));
        arrayList.get(2).setBackground(new Background(new BackgroundFill(n.darker(), CornerRadii.EMPTY, new Insets(0))));
        arrayList.get(3).setBackground(new Background(new BackgroundFill(n.desaturate(), CornerRadii.EMPTY, new Insets(0))));
        arrayList.get(4).setBackground(new Background(new BackgroundFill(n.grayscale(), CornerRadii.EMPTY, new Insets(0))));
        arrayList.get(5).setBackground(new Background(new BackgroundFill(n.invert(), CornerRadii.EMPTY, new Insets(0))));
        arrayList.get(6).setBackground(new Background(new BackgroundFill(n.saturate(), CornerRadii.EMPTY, new Insets(0))));
    });
    HBox value2 = new HBox();
    value2.getChildren().addAll(arrayList);
    root.setCenter(value2);
    primaryStage.setScene(new Scene(root));
    primaryStage.show();
}
Also used : BorderPane(javafx.scene.layout.BorderPane) HBox(jfxtras.scene.layout.HBox) Insets(javafx.geometry.Insets) Background(javafx.scene.layout.Background) ColorPicker(javafx.scene.control.ColorPicker) BackgroundFill(javafx.scene.layout.BackgroundFill) ArrayList(java.util.ArrayList) Label(javafx.scene.control.Label) Scene(javafx.scene.Scene) Region(javafx.scene.layout.Region)

Example 57 with Region

use of javafx.scene.layout.Region in project blue by kunstmusik.

the class BSBGroupView method addBSBObject.

protected void addBSBObject(BSBObject bsbObj) {
    try {
        Region objectView = BSBObjectEditorFactory.getView(bsbObj);
        // FIXME
        // BooleanProperty editEnabledProperty = allowEditing ? bsbInterface.editEnabledProperty() : null;
        BSBObjectViewHolder viewHolder = new BSBObjectViewHolder(editEnabledProperty, selection, groupsList, objectView);
        if (objectView instanceof EditModeOnly) {
            if (editEnabledProperty != null) {
                viewHolder.visibleProperty().bind(editEnabledProperty);
            } else {
                viewHolder.setVisible(false);
            }
        }
        if (bsbObj instanceof BSBGroup) {
            BSBGroupView bsbGroupView = (BSBGroupView) objectView;
            bsbGroupView.initialize(editEnabledProperty, selection, groupsList);
        }
        editorPane.getChildren().add(viewHolder);
    } catch (Exception e) {
        Exceptions.printStackTrace(e);
    }
}
Also used : Region(javafx.scene.layout.Region) EditModeOnly(blue.orchestra.editor.blueSynthBuilder.EditModeOnly) BSBGroup(blue.orchestra.blueSynthBuilder.BSBGroup)

Example 58 with Region

use of javafx.scene.layout.Region in project org.csstudio.display.builder by kasemir.

the class RulesDialog method createContent.

private SplitPane createContent() {
    final Node rules = createRulesTable();
    final HBox pvs = createPVsTable();
    final HBox exprs = createExpressionsTable();
    // Display PVs of currently selected rule
    rules_table.getSelectionModel().selectedItemProperty().addListener((prop, old, selected) -> {
        selected_rule_item = selected;
        if (selected == null) {
            pvs.setDisable(true);
            exprs.setDisable(true);
            btn_remove_rule.setDisable(true);
            btn_dup_rule.setDisable(true);
            btn_move_rule_up.setDisable(true);
            btn_move_rule_down.setDisable(true);
            btn_show_script.setDisable(true);
            propComboBox.setDisable(true);
            propComboBox.getSelectionModel().select(null);
            valExpBox.setDisable(true);
            pv_items.clear();
            expression_items.clear();
        } else {
            pvs.setDisable(false);
            exprs.setDisable(false);
            final TableViewSelectionModel<RuleItem> model = rules_table.getSelectionModel();
            btn_remove_rule.setDisable(false);
            btn_dup_rule.setDisable(false);
            btn_move_rule_up.setDisable(model.getSelectedIndex() == 0);
            btn_move_rule_down.setDisable(model.getSelectedIndex() == rule_items.size() - 1);
            btn_show_script.setDisable(false);
            propComboBox.setDisable(false);
            propComboBox.getSelectionModel().select(getPropLongString(selected));
            valExpBox.setDisable(false);
            valExpBox.selectedProperty().set(selected.prop_as_expr.get());
            pv_items.setAll(selected.pvs);
            expression_items.setAll(selected.expressions);
            fixupPVs(0);
        }
    });
    // Update PVs of selected rule from PVs table
    final ListChangeListener<PVTableItem> pll = change -> {
        final RuleItem selected = rules_table.getSelectionModel().getSelectedItem();
        if (selected != null)
            selected.pvs = new ArrayList<>(change.getList());
    };
    pv_items.addListener(pll);
    // Update buttons for currently selected PV
    pvs_table.getSelectionModel().selectedItemProperty().addListener((prop, old, selected) -> {
        if (selected == null) {
            btn_rm_pv.setDisable(true);
            btn_move_pv_up.setDisable(true);
            btn_move_pv_down.setDisable(true);
        } else {
            final TableViewSelectionModel<PVTableItem> model = pvs_table.getSelectionModel();
            btn_rm_pv.setDisable(false);
            btn_move_pv_up.setDisable(model.getSelectedIndex() == 0);
            btn_move_pv_down.setDisable(model.getSelectedIndex() == pv_items.size() - 1);
        }
    });
    // Update Expressions of selected rule from Expressions table
    final ListChangeListener<ExprItem<?>> ell = change -> {
        final RuleItem selected = rules_table.getSelectionModel().getSelectedItem();
        if (selected != null)
            selected.expressions = new ArrayList<>(change.getList());
    };
    expression_items.addListener(ell);
    // Update buttons for currently selected expression
    expressions_table.getSelectionModel().selectedItemProperty().addListener((prop, old, selected) -> {
        if (selected == null) {
            btn_rm_exp.setDisable(true);
            btn_move_exp_up.setDisable(true);
            btn_move_exp_down.setDisable(true);
        } else {
            final TableViewSelectionModel<ExprItem<?>> model = expressions_table.getSelectionModel();
            btn_rm_exp.setDisable(false);
            btn_move_exp_up.setDisable(model.getSelectedIndex() == 0);
            btn_move_exp_down.setDisable(model.getSelectedIndex() == expression_items.size() - 1);
        }
    });
    // What is the property id option we are using?
    final Label propLabel = new Label("Property ID:");
    // Show each property with current value
    final ObservableList<String> prop_id_opts = FXCollections.observableArrayList();
    for (PropInfo pi : propinfo_ls) {
        // Property _value_ can be long, ex. points of a polyline
        // Truncate the value that's shown in the combo box
        // to prevent combo from using all screen width.
        String prop_opt = pi.toString();
        if (prop_opt.length() > MAX_PROP_LENGTH)
            prop_opt = prop_opt.substring(0, MAX_PROP_LENGTH) + "...";
        prop_id_opts.add(prop_opt);
    }
    propComboBox = new ComboBox<String>(prop_id_opts);
    propComboBox.setDisable(true);
    propComboBox.getSelectionModel().selectedIndexProperty().addListener((p, o, index) -> {
        // Select property info based on index within combo.
        final int idx = index.intValue();
        if (idx >= 0) {
            final PropInfo prop = propinfo_ls.get(idx);
            if (selected_rule_item.tryUpdatePropID(undo, prop.getPropID()))
                expression_items.setAll(selected_rule_item.expressions);
        }
    });
    propComboBox.setMinHeight(27);
    propComboBox.setMaxWidth(Double.MAX_VALUE);
    HBox.setHgrow(propComboBox, Priority.ALWAYS);
    // TODO: change this to actually manipulate expression objects in the rule
    valExpBox = new CheckBox("Value as Expression");
    valExpBox.setDisable(true);
    valExpBox.selectedProperty().addListener((ov, old_val, new_val) -> {
        if (!selected_rule_item.tryTogglePropAsExpr(undo, new_val))
            logger.log(Level.FINE, "Did not update rule property as expression flag to " + new_val);
        else
            expression_items.setAll(selected_rule_item.expressions);
    });
    final Region spring = new Region();
    HBox.setHgrow(spring, Priority.ALWAYS);
    final HBox props = new HBox(10, propLabel, propComboBox, spring, valExpBox);
    props.setAlignment(Pos.CENTER);
    pvs.setPadding(new Insets(0, 10, 0, 0));
    exprs.setPadding(new Insets(0, 0, 0, 10));
    HBox.setHgrow(pvs, Priority.ALWAYS);
    HBox.setHgrow(exprs, Priority.ALWAYS);
    final Preferences pref = Preferences.userNodeForPackage(RulesDialog.class);
    final double prefRSPDividerPosition = pref.getDouble("rule.content.divider.position", 0.5);
    ruleSplitPane = new SplitPane(pvs, exprs);
    ruleSplitPane.setOrientation(Orientation.HORIZONTAL);
    ruleSplitPane.setDividerPositions(prefRSPDividerPosition);
    ruleSplitPane.setStyle("-fx-background-insets: 0, 0;");
    VBox.setVgrow(ruleSplitPane, Priority.ALWAYS);
    final VBox subitems = new VBox(10, props, ruleSplitPane);
    final VBox rulebox = new VBox(10, rules);
    rulebox.setPadding(new Insets(0, 10, 0, 0));
    subitems.setPadding(new Insets(0, 0, 0, 10));
    VBox.setVgrow(rules, Priority.ALWAYS);
    HBox.setHgrow(subitems, Priority.ALWAYS);
    final double prefWidth = pref.getDouble("content.width", -1);
    final double prefHeight = pref.getDouble("content.height", -1);
    final double prefDividerPosition = pref.getDouble("content.divider.position", 0.3);
    final SplitPane splitPane = new SplitPane(rulebox, subitems);
    splitPane.setOrientation(Orientation.HORIZONTAL);
    splitPane.setDividerPositions(prefDividerPosition);
    if (prefWidth > 0 && prefHeight > 0)
        splitPane.setPrefSize(prefWidth, prefHeight);
    // Select the first rule
    if (!rules_table.getItems().isEmpty()) {
        Platform.runLater(() -> {
            rules_table.getSelectionModel().select(0);
            rules_table.requestFocus();
        });
    } else
        Platform.runLater(() -> btn_add_rule.requestFocus());
    return splitPane;
}
Also used : Button(javafx.scene.control.Button) Pos(javafx.geometry.Pos) UndoableActionManager(org.csstudio.display.builder.util.undo.UndoableActionManager) ScriptPV(org.csstudio.display.builder.model.properties.ScriptPV) LineNumberTableCellFactory(org.csstudio.javafx.LineNumberTableCellFactory) VBox(javafx.scene.layout.VBox) AutoCompletedTableCell(org.csstudio.display.builder.representation.javafx.PVTableItem.AutoCompletedTableCell) RuleInfo(org.csstudio.display.builder.model.rules.RuleInfo) TableHelper(org.csstudio.javafx.TableHelper) ListChangeListener(javafx.collections.ListChangeListener) ComboBox(javafx.scene.control.ComboBox) WidgetProperty(org.csstudio.display.builder.model.WidgetProperty) TableView(javafx.scene.control.TableView) ModelThreadPool(org.csstudio.display.builder.model.util.ModelThreadPool) Pane(javafx.scene.layout.Pane) Orientation(javafx.geometry.Orientation) HBox(javafx.scene.layout.HBox) PVTableItem(org.csstudio.display.builder.representation.javafx.PVTableItem) SplitPane(javafx.scene.control.SplitPane) TextField(javafx.scene.control.TextField) Language(org.csstudio.javafx.SyntaxHighlightedMultiLineInputDialog.Language) PropertyValueFactory(javafx.scene.control.cell.PropertyValueFactory) Collectors(java.util.stream.Collectors) CommonWidgetProperties(org.csstudio.display.builder.model.properties.CommonWidgetProperties) Platform(javafx.application.Platform) Priority(javafx.scene.layout.Priority) List(java.util.List) BooleanProperty(javafx.beans.property.BooleanProperty) Region(javafx.scene.layout.Region) CheckBoxTableCell(javafx.scene.control.cell.CheckBoxTableCell) AutocompleteMenu(org.csstudio.display.builder.representation.javafx.AutocompleteMenu) JFXUtil(org.csstudio.display.builder.representation.javafx.JFXUtil) ObservableList(javafx.collections.ObservableList) DefaultStringConverter(javafx.util.converter.DefaultStringConverter) ExprInfoString(org.csstudio.display.builder.model.rules.RuleInfo.ExprInfoString) StringProperty(javafx.beans.property.StringProperty) ExpressionInfo(org.csstudio.display.builder.model.rules.RuleInfo.ExpressionInfo) TableViewSelectionModel(javafx.scene.control.TableView.TableViewSelectionModel) SyntaxHighlightedMultiLineInputDialog(org.csstudio.javafx.SyntaxHighlightedMultiLineInputDialog) ExprInfoValue(org.csstudio.display.builder.model.rules.RuleInfo.ExprInfoValue) Plugin.logger(org.csstudio.display.builder.editor.Plugin.logger) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) ButtonType(javafx.scene.control.ButtonType) JFXBaseRepresentation(org.csstudio.display.builder.representation.javafx.widgets.JFXBaseRepresentation) FXCollections(javafx.collections.FXCollections) BackingStoreException(java.util.prefs.BackingStoreException) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) TableColumn(javafx.scene.control.TableColumn) RulesWidgetProperty(org.csstudio.display.builder.model.properties.RulesWidgetProperty) Messages(org.csstudio.display.builder.representation.javafx.Messages) TableCell(javafx.scene.control.TableCell) Insets(javafx.geometry.Insets) Tooltip(javafx.scene.control.Tooltip) Dialog(javafx.scene.control.Dialog) Label(javafx.scene.control.Label) Node(javafx.scene.Node) CheckBox(javafx.scene.control.CheckBox) Preferences(java.util.prefs.Preferences) TimeUnit(java.util.concurrent.TimeUnit) SimpleBooleanProperty(javafx.beans.property.SimpleBooleanProperty) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) ScriptsDialog(org.csstudio.display.builder.representation.javafx.ScriptsDialog) DialogHelper(org.csstudio.javafx.DialogHelper) Widget(org.csstudio.display.builder.model.Widget) ChangeListener(javafx.beans.value.ChangeListener) PropInfo(org.csstudio.display.builder.model.rules.RuleInfo.PropInfo) HBox(javafx.scene.layout.HBox) Insets(javafx.geometry.Insets) Node(javafx.scene.Node) Label(javafx.scene.control.Label) PropInfo(org.csstudio.display.builder.model.rules.RuleInfo.PropInfo) ExprInfoString(org.csstudio.display.builder.model.rules.RuleInfo.ExprInfoString) SplitPane(javafx.scene.control.SplitPane) PVTableItem(org.csstudio.display.builder.representation.javafx.PVTableItem) Preferences(java.util.prefs.Preferences) CheckBox(javafx.scene.control.CheckBox) Region(javafx.scene.layout.Region) VBox(javafx.scene.layout.VBox)

Example 59 with Region

use of javafx.scene.layout.Region in project org.csstudio.display.builder by kasemir.

the class ColorMapDialog method createContent.

private Node createContent() {
    // Table for selecting a predefined color map
    predefined_table = new TableView<>();
    final TableColumn<PredefinedColorMaps.Predefined, String> name_column = new TableColumn<>(Messages.ColorMapDialog_PredefinedMap);
    name_column.setCellValueFactory(param -> new SimpleStringProperty(param.getValue().getDescription()));
    predefined_table.getColumns().add(name_column);
    predefined_table.getItems().addAll(PredefinedColorMaps.PREDEFINED);
    predefined_table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
    // Table for viewing/editing color sections
    sections_table = new TableView<>();
    // Value of color section
    final TableColumn<ColorSection, String> value_column = new TableColumn<>(Messages.ColorMapDialog_Value);
    value_column.setCellValueFactory(param -> new SimpleStringProperty(Integer.toString(param.getValue().value)));
    value_column.setCellFactory(TextFieldTableCell.forTableColumn());
    value_column.setOnEditCommit(event -> {
        final int index = event.getTablePosition().getRow();
        try {
            final int value = Math.max(0, Math.min(255, Integer.parseInt(event.getNewValue().trim())));
            color_sections.set(index, new ColorSection(value, color_sections.get(index).color));
            color_sections.sort((sec1, sec2) -> sec1.value - sec2.value);
            updateMapFromSections();
        } catch (NumberFormatException ex) {
        // Ignore, field will reset to original value
        }
    });
    // Color of color section
    final TableColumn<ColorSection, ColorPicker> color_column = new TableColumn<>(Messages.ColorMapDialog_Color);
    color_column.setCellValueFactory(param -> {
        final ColorSection segment = param.getValue();
        return new SimpleObjectProperty<ColorPicker>(createColorPicker(segment));
    });
    color_column.setCellFactory(column -> new ColorTableCell());
    sections_table.getColumns().add(value_column);
    sections_table.getColumns().add(color_column);
    sections_table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
    sections_table.setItems(color_sections);
    sections_table.setEditable(true);
    add = new Button(Messages.ColorMapDialog_Add, JFXUtil.getIcon("add.png"));
    add.setMaxWidth(Double.MAX_VALUE);
    remove = new Button(Messages.ColorMapDialog_Remove, JFXUtil.getIcon("delete.png"));
    remove.setMaxWidth(Double.MAX_VALUE);
    final VBox buttons = new VBox(10, add, remove);
    // Upper section with tables
    final HBox tables_and_buttons = new HBox(10, predefined_table, sections_table, buttons);
    HBox.setHgrow(predefined_table, Priority.ALWAYS);
    HBox.setHgrow(sections_table, Priority.ALWAYS);
    // Lower section with resulting color map
    final Region fill1 = new Region(), fill2 = new Region(), fill3 = new Region();
    HBox.setHgrow(fill1, Priority.ALWAYS);
    HBox.setHgrow(fill2, Priority.ALWAYS);
    HBox.setHgrow(fill3, Priority.ALWAYS);
    final HBox color_title = new HBox(fill1, new Label(Messages.ColorMapDialog_Result), fill2);
    color_bar = new Region();
    color_bar.setMinHeight(COLOR_BAR_HEIGHT);
    color_bar.setMaxHeight(COLOR_BAR_HEIGHT);
    color_bar.setPrefHeight(COLOR_BAR_HEIGHT);
    final HBox color_legend = new HBox(new Label("0"), fill3, new Label("255"));
    final VBox box = new VBox(10, tables_and_buttons, new Separator(), color_title, color_bar, color_legend);
    VBox.setVgrow(tables_and_buttons, Priority.ALWAYS);
    return box;
}
Also used : HBox(javafx.scene.layout.HBox) ColorPicker(javafx.scene.control.ColorPicker) Label(javafx.scene.control.Label) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) TableColumn(javafx.scene.control.TableColumn) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) Button(javafx.scene.control.Button) Region(javafx.scene.layout.Region) VBox(javafx.scene.layout.VBox) Separator(javafx.scene.control.Separator)

Example 60 with Region

use of javafx.scene.layout.Region in project org.csstudio.display.builder by kasemir.

the class ScriptsDialog method createContent.

private SplitPane createContent() {
    final Region scripts = createScriptsTable();
    final Region pvs = createPVsTable();
    // Display PVs of currently selected script
    scripts_table.getSelectionModel().selectedItemProperty().addListener((prop, old, selected) -> {
        selected_script_item = selected;
        if (selected == null) {
            btn_script_remove.setDisable(true);
            btn_edit.setDisable(true);
            pvs.setDisable(true);
            pv_items.clear();
        } else {
            btn_script_remove.setDisable(false);
            btn_edit.setDisable(false);
            pvs.setDisable(false);
            btn_check_connections.setSelected(selected.check_connections);
            pv_items.setAll(selected.pvs);
            fixupPVs(0);
            if (ScriptInfo.isEmbedded(selected.getScriptInfo().getPath())) {
                scripts_table.setEditable(false);
                btn_edit.setText(Messages.Edit);
                btn_edit.setGraphic(JFXUtil.getIcon("edit.png"));
                if (ScriptInfo.isJython(selected.getScriptInfo().getPath())) {
                    convertToFileMenuItem.setDisable(false);
                    convertToEmbeddedPythonMenuItem.setDisable(true);
                    convertToEmbeddedJavaScriptMenuItem.setDisable(false);
                } else if (ScriptInfo.isJavaScript(selected.getScriptInfo().getPath())) {
                    convertToFileMenuItem.setDisable(false);
                    convertToEmbeddedPythonMenuItem.setDisable(false);
                    convertToEmbeddedJavaScriptMenuItem.setDisable(true);
                } else {
                    convertToFileMenuItem.setDisable(true);
                    convertToEmbeddedPythonMenuItem.setDisable(true);
                    convertToEmbeddedJavaScriptMenuItem.setDisable(true);
                }
            } else {
                scripts_table.setEditable(true);
                btn_edit.setText(Messages.Select);
                btn_edit.setGraphic(JFXUtil.getIcon("select-file.png"));
                convertToFileMenuItem.setDisable(true);
                convertToEmbeddedPythonMenuItem.setDisable(false);
                convertToEmbeddedJavaScriptMenuItem.setDisable(false);
            }
        }
    });
    // Update PVs of selected script from PVs table
    final ListChangeListener<PVTableItem> ll = change -> {
        final ScriptItem selected = scripts_table.getSelectionModel().getSelectedItem();
        if (selected != null)
            selected.pvs = new ArrayList<>(change.getList());
    };
    pv_items.addListener(ll);
    // Update buttons for currently selected PV
    pvs_table.getSelectionModel().selectedItemProperty().addListener((prop, old, selected) -> {
        if (selected == null) {
            btn_pv_remove.setDisable(true);
            btn_pv_up.setDisable(true);
            btn_py_down.setDisable(true);
        } else {
            final TableViewSelectionModel<PVTableItem> model = pvs_table.getSelectionModel();
            btn_pv_remove.setDisable(false);
            btn_pv_up.setDisable(model.getSelectedIndex() == 0);
            btn_py_down.setDisable(model.getSelectedIndex() == pv_items.size() - 1);
        }
    });
    scripts.setPadding(new Insets(0, 10, 0, 0));
    pvs.setPadding(new Insets(0, 0, 0, 10));
    final Preferences pref = Preferences.userNodeForPackage(ScriptsDialog.class);
    double prefWidth = pref.getDouble("content.width", -1);
    double prefHeight = pref.getDouble("content.height", -1);
    double prefDividerPosition = pref.getDouble("content.divider.position", 0.5);
    final SplitPane splitPane = new SplitPane(scripts, pvs);
    splitPane.setDividerPositions(prefDividerPosition);
    if (prefWidth > 0 && prefHeight > 0)
        splitPane.setPrefSize(prefWidth, prefHeight);
    // Select the first script
    if (!scripts_table.getItems().isEmpty()) {
        Platform.runLater(() -> {
            scripts_table.getSelectionModel().select(0);
            scripts_table.requestFocus();
        });
    } else
        Platform.runLater(() -> addMenuButton.requestFocus());
    return splitPane;
}
Also used : Button(javafx.scene.control.Button) Pos(javafx.geometry.Pos) ScriptPV(org.csstudio.display.builder.model.properties.ScriptPV) LineNumberTableCellFactory(org.csstudio.javafx.LineNumberTableCellFactory) VBox(javafx.scene.layout.VBox) AutoCompletedTableCell(org.csstudio.display.builder.representation.javafx.PVTableItem.AutoCompletedTableCell) TableHelper(org.csstudio.javafx.TableHelper) ListChangeListener(javafx.collections.ListChangeListener) TableView(javafx.scene.control.TableView) ModelThreadPool(org.csstudio.display.builder.model.util.ModelThreadPool) HBox(javafx.scene.layout.HBox) SplitPane(javafx.scene.control.SplitPane) TextField(javafx.scene.control.TextField) MenuItem(javafx.scene.control.MenuItem) Language(org.csstudio.javafx.SyntaxHighlightedMultiLineInputDialog.Language) PropertyValueFactory(javafx.scene.control.cell.PropertyValueFactory) Collectors(java.util.stream.Collectors) Platform(javafx.application.Platform) SeparatorMenuItem(javafx.scene.control.SeparatorMenuItem) Priority(javafx.scene.layout.Priority) List(java.util.List) Region(javafx.scene.layout.Region) CheckBoxTableCell(javafx.scene.control.cell.CheckBoxTableCell) MenuButton(javafx.scene.control.MenuButton) ObservableList(javafx.collections.ObservableList) DefaultStringConverter(javafx.util.converter.DefaultStringConverter) StringProperty(javafx.beans.property.StringProperty) TableViewSelectionModel(javafx.scene.control.TableView.TableViewSelectionModel) SyntaxHighlightedMultiLineInputDialog(org.csstudio.javafx.SyntaxHighlightedMultiLineInputDialog) SimpleStringProperty(javafx.beans.property.SimpleStringProperty) ButtonType(javafx.scene.control.ButtonType) JFXBaseRepresentation(org.csstudio.display.builder.representation.javafx.widgets.JFXBaseRepresentation) FXCollections(javafx.collections.FXCollections) BackingStoreException(java.util.prefs.BackingStoreException) TextFieldTableCell(javafx.scene.control.cell.TextFieldTableCell) Bindings(javafx.beans.binding.Bindings) ArrayList(java.util.ArrayList) Level(java.util.logging.Level) TableColumn(javafx.scene.control.TableColumn) TableCell(javafx.scene.control.TableCell) Insets(javafx.geometry.Insets) Tooltip(javafx.scene.control.Tooltip) ScriptInfo(org.csstudio.display.builder.model.properties.ScriptInfo) Dialog(javafx.scene.control.Dialog) Label(javafx.scene.control.Label) SplitMenuButton(javafx.scene.control.SplitMenuButton) Node(javafx.scene.Node) CheckBox(javafx.scene.control.CheckBox) Preferences(java.util.prefs.Preferences) ToolkitRepresentation.logger(org.csstudio.display.builder.representation.ToolkitRepresentation.logger) TimeUnit(java.util.concurrent.TimeUnit) SimpleObjectProperty(javafx.beans.property.SimpleObjectProperty) ImageView(javafx.scene.image.ImageView) DialogHelper(org.csstudio.javafx.DialogHelper) Widget(org.csstudio.display.builder.model.Widget) ChangeListener(javafx.beans.value.ChangeListener) Insets(javafx.geometry.Insets) Region(javafx.scene.layout.Region) SplitPane(javafx.scene.control.SplitPane) Preferences(java.util.prefs.Preferences)

Aggregations

Region (javafx.scene.layout.Region)106 Text (javafx.scene.text.Text)25 VBox (javafx.scene.layout.VBox)22 Label (javafx.scene.control.Label)21 Pane (javafx.scene.layout.Pane)21 Button (javafx.scene.control.Button)18 InnerShadow (javafx.scene.effect.InnerShadow)17 Scene (javafx.scene.Scene)16 Node (javafx.scene.Node)15 Insets (javafx.geometry.Insets)14 HBox (javafx.scene.layout.HBox)14 DropShadow (javafx.scene.effect.DropShadow)13 ArrayList (java.util.ArrayList)12 StackPane (javafx.scene.layout.StackPane)12 Canvas (javafx.scene.canvas.Canvas)11 Color (javafx.scene.paint.Color)11 GridPane (javafx.scene.layout.GridPane)10 Group (javafx.scene.Group)9 Background (javafx.scene.layout.Background)8 BackgroundFill (javafx.scene.layout.BackgroundFill)8