Package javafx.scene.control

Examples of javafx.scene.control.TextField


    public void setValueInClearPassword(char[] password) {
        clear();
        boolean prec_disa = isEditorDisable();
        hidden_field = null;
        pass_field = null;
        clear_field = new TextField();
        clear_field.setDisable(prec_disa);
        clear_field.setPrefWidth(pane.getPrefWidth());
        clear_field.setText(new String(password));
        pane.getChildren().add(clear_field);
        setTypeImageCombo((int) SensibleValueTypeListener.PASS_VALUE_TYPE);
View Full Code Here


    public void setValueInClear(String password) {
        clear();
        boolean prec_disa = isEditorDisable();
        hidden_field = null;
        pass_field = null;
        clear_field = new TextField();
        clear_field.setDisable(prec_disa);
        clear_field.setPrefWidth(pane.getPrefWidth());
        clear_field.setText(password);
        pane.getChildren().add(clear_field);
        setTypeImageCombo((int) SensibleValueTypeListener.CLEAR_VALUE_TYPE);
View Full Code Here

    public void setValueHidden() {
        clear();
        clear_field = null;
        pass_field = null;
        hidden_field = new TextField();
        hidden_field.setPrefWidth(pane.getPrefWidth());
        hidden_field.setEditable(false);
        hidden_field.setAlignment(Pos.CENTER);
        hidden_field.setFocusTraversable(false);
        hidden_field.setMouseTransparent(true);
View Full Code Here

            task_arrow_error = new Task<Void>() {
                @Override protected Void call() throws Exception {
                    try {
                        Platform.runLater(() -> {
                            if (node instanceof TextField) {
                                TextField text = (TextField) node;
                                text.setStyle("-fx-background-color: linear-gradient(#FF4000, #DF0101);");
                            }
                        });

                        Thread.currentThread().sleep(3000);

                        Platform.runLater(() -> {
                            if (node instanceof TextField) {
                                TextField text = (TextField) node;
                                text.setStyle("");
                            }
                        });
                    } catch (Exception ex) {
                        Logger.getLogger(EffectFX.class.getName()).log(Level.SEVERE, null, ex);
                    }
View Full Code Here

            }
        }

        private void createTextField()
        {
            textField = new TextField(getString());
            textField.setMinWidth(this.getWidth() - this.getGraphicTextGap() * 2);
            textField.focusedProperty().addListener(new ChangeListener<Boolean>()
            {
                @Override
                public void changed(ObservableValue<? extends Boolean> arg0,
View Full Code Here

    private static final String SPACE = " ";
    private TextField searchField;
    private  FilteredList<T> filteredList;

    public SimpleSearchBox() {
        searchField = new TextField();
        getChildren().add(searchField);
        searchField.textProperty().addListener((ov, oldValue, newValue) ->
                 filteredList.setPredicate(t -> {
                    String[] tokens = newValue.split(SPACE);
                    for(String token : tokens) {
View Full Code Here

        final ObservableList<Node> children = root.getChildrenUnmodifiable();
        // two VBoxes
        Assert.assertEquals(2, children.size());
        final Node tfMatchday = root.lookup("#idTfMatchday");
        Assert.assertNotNull(tfMatchday);
        final TextField matchday = (TextField) tfMatchday;
        final String date = "04.06.2012";
        matchday.setText(date);
        Assert.assertEquals(date, matchday.getText());
    }
View Full Code Here

  }

  @Override
  protected Control makeControl() {
    // this uses a text field
    textField = new TextField(String.valueOf(parameter.get()));
    textField.setStyle(Constants.VALID_PARAMETER_STYLE);
    textField.setAlignment(Pos.CENTER_RIGHT);
    textField.prefWidthProperty().bind(widthProperty().divide(2));
   
    return textField;
View Full Code Here

  @Override
  protected Control makeControl() {
    // we use a text field, and a formatting class to enforce decimals
    decimalFormat = new DecimalFormat();
    decimalFormat.setMaximumFractionDigits(10);
    textField = new TextField(decimalFormat.format(parameter.get().doubleValue()));
    textField.setStyle(Constants.VALID_PARAMETER_STYLE);
    textField.setAlignment(Pos.CENTER_RIGHT);
    textField.prefWidthProperty().bind(widthProperty().divide(2));
    return textField;
  }
View Full Code Here

    Label label = new Label("Enter your name Player " + (position + 1));
    label.setFont(Assets.getFont(Assets.FONT_COURIERNEW_BOLD_16));
    label.setTextFill(Color.LIGHTGRAY);

    final TextField name = new TextField();
    name.setPrefColumnCount(15);
    name.setText("Player " + (position + 1));
    name.setOnAction(new EventHandler<ActionEvent>() {
      @Override
      public void handle(ActionEvent e) {
        player.setName(name.getText());
        name.setDisable(true);
        genesia.askNextPlayerName(position + 1);
      }
    });

    vbox.getChildren().addAll(label, name);
View Full Code Here

TOP

Related Classes of javafx.scene.control.TextField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.