kit/src/main/java/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/FunctionalInterfaceEditor.java [66:106]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void initialize(List<String> suggestedMethods) {
        this.suggestedMethods = suggestedMethods;

        // text field events handling
        EventHandler<ActionEvent> onActionListener = event -> {
            String tfValue = getTextField().getText();
            if (tfValue == null || tfValue.isEmpty()) {
                userUpdateValueProperty(null);
                return;
            }
            if (methodNameMode) {
                // method name should be a java identifier
                if (!JavaLanguage.isIdentifier(tfValue)) {
                    System.err.println(I18N.getString("inspector.event.invalid.method", tfValue)); // Will go in message panel
                    handleInvalidValue(tfValue);
                    return;
                }
            }
            Object value = getValue();
            assert value instanceof String;
            userUpdateValueProperty((String) value);
            getTextField().selectAll();
        };
        setTextEditorBehavior(this, getTextField(), onActionListener);

        scriptMenuItem.setOnAction(e -> {
            getTextField().setText(null);
            userUpdateValueProperty(null);
            switchToScriptMode();
        });

        controllerMethodMenuItem.setOnAction(e -> {
            getTextField().setText(null);
            userUpdateValueProperty(null);
            switchToMethodNameMode();
        });
        getMenu().getItems().add(controllerMethodMenuItem);

        // methodeName mode by default
        switchToMethodNameMode();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



kit/src/main/java/com/oracle/javafx/scenebuilder/kit/editor/panel/inspector/editors/EventHandlerEditor.java [73:113]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void initialize(List<String> suggestedMethods) {
        this.suggestedMethods = suggestedMethods;

        // text field events handling
        EventHandler<ActionEvent> onActionListener = event -> {
            String tfValue = getTextField().getText();
            if (tfValue == null || tfValue.isEmpty()) {
                userUpdateValueProperty(null);
                return;
            }
            if (methodNameMode) {
                // method name should be a java identifier
                if (!JavaLanguage.isIdentifier(tfValue)) {
                    System.err.println(I18N.getString("inspector.event.invalid.method", tfValue)); // Will go in message panel
                    handleInvalidValue(tfValue);
                    return;
                }
            }
            Object value = getValue();
            assert value instanceof String;
            userUpdateValueProperty((String) value);
            getTextField().selectAll();
        };
        setTextEditorBehavior(this, getTextField(), onActionListener);

        scriptMenuItem.setOnAction(e -> {
            getTextField().setText(null);
            userUpdateValueProperty(null);
            switchToScriptMode();
        });

        controllerMethodMenuItem.setOnAction(e -> {
            getTextField().setText(null);
            userUpdateValueProperty(null);
            switchToMethodNameMode();
        });
        getMenu().getItems().add(controllerMethodMenuItem);

        // methodeName mode by default
        switchToMethodNameMode();
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



