Package javafx.scene.control

Examples of javafx.scene.control.TextField


        goToNumber.setSelected(true);
        goToNumber.setToggleGroup(group);
        goToTime = new RadioButton("Go To Time:");
        goToTime.setToggleGroup(group);
       
        keyField = new TextField();
        hField = new TextField("00");
        mField = new TextField("00");
        sField = new TextField("00");
        msField = new TextField("000");
       
        Label separator1 = new Label(":");
        Label separator2 = new Label(":");
        Label msSeparator = new Label(",");
       
View Full Code Here


   
    @Override
    public void start(Stage primaryStage) {
        Label movieNameLabel = new Label("Movie Name:");
        Label languageLabel = new Label("Language:");
        movieNameField = new TextField();
        languageCombo = new ComboBox();
        searchButton = new Button("Search");
       
        initComboBox();

        languageCombo.setMaxWidth(Double.MAX_VALUE);
       
        GridPane.setHgrow(movieNameField, Priority.ALWAYS);
        GridPane.setHgrow(languageCombo, Priority.ALWAYS);
        GridPane topPane = new GridPane();
        topPane.setHgap(5);
        topPane.setVgap(10);
        topPane.setPadding(new Insets(10, 25, 15, 25));
        topPane.add(movieNameLabel, 1, 1);
        topPane.add(languageLabel, 1, 2);
        topPane.add(movieNameField, 2, 1, 2, 1);
        topPane.add(languageCombo, 2, 2);
        topPane.add(searchButton, 3, 2);
       
        HBox.setHgrow(topPane, Priority.ALWAYS);
        HBox topBox = new HBox();
        topBox.getChildren().add(topPane);
       
       
        table = new TableView<Subtitle>();
        table.setEditable(false);
        table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
        table.setItems(data);
       
        TableColumn idCol = new TableColumn("ID");
        idCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("id"));
        TableColumn titleCol = new TableColumn("Title");
        titleCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("name"));
        TableColumn uploadedCol = new TableColumn("Uploaded");
        uploadedCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("uploadedDate"));
        TableColumn yearReleasedCol = new TableColumn("Year Released");
        yearReleasedCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("year"));
        TableColumn kindCol = new TableColumn("Kind");
        kindCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("kind"));
        TableColumn seasonCol = new TableColumn("Season");
        seasonCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("season"));
        TableColumn episodeCol = new TableColumn("Episode");
        episodeCol.setCellValueFactory(new PropertyValueFactory<Subtitle, String>("episode"));
       
        table.getColumns().addAll(idCol, titleCol, uploadedCol, yearReleasedCol, kindCol, seasonCol, episodeCol);
       
       
        linkField = new TextField("Download Link");
        mountButton = new Button("Mount");
        downloadButton = new Button("Download");
       
        linkField.setEditable(false);
       
View Full Code Here

      }
    });

    // summary
    lMenuVBox.getChildren().add(new Text("Summary:"));
    TextField lSummaryTextField = new TextField();
    lSummaryTextField.setText(abstractAppointmentPane.appointment.getSummary());
    lSummaryTextField.textProperty().addListener(new ChangeListener<String>()
    {
      @Override
      public void changed(ObservableValue<? extends String> arg0, String oldValue, String newValue)
      {
        abstractAppointmentPane.appointment.setSummary(newValue);
        // refresh is done upon popup close
      }
    });
    lMenuVBox.getChildren().add(lSummaryTextField);

    // location
    lMenuVBox.getChildren().add(new Text("Location:"));
    TextField lLocationTextField = new TextField();
    lLocationTextField.setText( abstractAppointmentPane.appointment.getLocation() == null ? "" : abstractAppointmentPane.appointment.getLocation());
    lLocationTextField.textProperty().addListener(new ChangeListener<String>()
    {
      @Override
      public void changed(ObservableValue<? extends String> arg0, String oldValue, String newValue)
      {
        abstractAppointmentPane.appointment.setLocation(newValue);
View Full Code Here

   * construct the nodes
   */
  private void createNodes()
  {
    // the main textField
    textField = new TextField();
    textField.focusedProperty().addListener(new InvalidationListener()
    {     
      @Override
      public void invalidated(Observable arg0)
      {
View Full Code Here

    else
    {
      // use the textfield
      if (textField == null)
      {
        textField = new TextField();
        textField.getStyleClass().add("value");
        textField.getStyleClass().add("editable");
       
        // process text entry
        textField.focusedProperty().addListener(new InvalidationListener()
View Full Code Here

   * construct the nodes
   */
  private void createNodes()
  {
    // the main textField
    textField = new TextField();
    textField.setPrefColumnCount(20);
    textField.focusedProperty().addListener( (observable) -> {
      if (textField.isFocused() == false) {
        parse();
      }
View Full Code Here

    // show the correct tab
    click("#atributesAreSet2");
   
    // get the node
    CalendarTextField lCalendarTextField = (CalendarTextField)find(".CalendarTextField");
    TextField lTextField = (TextField)find(".CalendarTextField .text-field");
   
    // check properties
    Assert.assertEquals("2013-01-01 22:33:44", lCalendarTextField.getDateFormat().format(new GregorianCalendar(2013, 1-1, 1, 22, 33, 44).getTime()));
   
    // type value
    click(".CalendarTextField .text-field");
    type("2010");
    click(".button"); //just to move the focus
    Assert.assertEquals("2010-01-01T00:00:00.000", TestUtil.quickFormatCalendarAsDateTime(lCalendarTextField.getCalendar()) );
    TestUtil.runThenWaitForPaintPulse( () -> {
      lTextField.clear();
    });
   
    // type value
    click(".CalendarTextField .text-field");
    type("2010-06");
    click(".button"); //just to move the focus
    Assert.assertEquals("2010-06-01T00:00:00.000", TestUtil.quickFormatCalendarAsDateTime(lCalendarTextField.getCalendar()) );
    TestUtil.runThenWaitForPaintPulse( () -> {
      lTextField.clear();
    });
   
    // type value
    click(".CalendarTextField .text-field");
    type("2010-06-12");
    click(".button"); //just to move the focus
    Assert.assertEquals("2010-06-12T00:00:00.000", TestUtil.quickFormatCalendarAsDateTime(lCalendarTextField.getCalendar()) );
    TestUtil.runThenWaitForPaintPulse( () -> {
      lTextField.clear();
    });
  }
View Full Code Here

    // show the correct tab
    click("#atributesAreSet3");
   
    // get the node
    CalendarTextField lCalendarTextField = (CalendarTextField)find(".CalendarTextField");   
    TextField lTextField = (TextField)find(".CalendarTextField .text-field");
   
    // check properties
    Assert.assertEquals("de", lCalendarTextField.getLocale().toString());
    Assert.assertEquals("locale set", lTextField.getPromptText());
  }
View Full Code Here

        ListSpinner<String> lSpinner = new ListSpinner<String>("a", "b", "c")
          .withCyclic(true)
          ;
        lGridPane.add(lSpinner, 1, lRowIdx);
       
        final TextField lValueTextField = new TextField();
        lValueTextField.textProperty().bind(lSpinner.valueProperty());
        lGridPane.add(lValueTextField, 2, lRowIdx++);
      }
      {
        lGridPane.add(new Label("Cyclic list with null"), 0, lRowIdx);
        ListSpinner<String> lSpinner = new ListSpinner<String>( "a", "b", "c", null )
View Full Code Here

        Label masterpwd_lbl = (Label) getFromCacheNode("masterpwd_lbl");

        EffectFX.neonEffect(username_lbl, Color.WHITE);
        EffectFX.neonEffect(masterpwd_lbl, Color.WHITE);

        /**
         * Se e' possibile per default il campo username e' impostato con il
         * valore della property "user.name".
         */
        final TextField USER_TXT = (TextField) getFromCacheNode("user_txt");

        String def_user = "";
        try {
            def_user = System.getProperty("user.name");
            if (def_user == null || def_user.length() == 0) {
                def_user = "";
            }
        } catch (Exception exc) {
        }
        USER_TXT.setText(def_user);

        /**
         * Carico i vari vaori del login, ed imposto gli eventi da gestire.
         */
        final PasswordField PASS_TXT = (PasswordField) getFromCacheNode("pass_txt");

        PASS_TXT.setText("");
        PASS_TXT.requestFocus();

        if (DEBUG) {
            PASS_TXT.setText("1234567890");
        }

        btn_exit = (Button) getFromCacheNode("exit_btn");
        btn_exit.setFocusTraversable(false);
        btn_exit.setOnAction((ActionEvent e) -> {
            __sysExit(__EXIT_NO_ERROR__);
        });

        login_btn = (Button) getFromCacheNode("login_btn");
        login_btn.setFocusTraversable(false);

        EventHandler<ActionEvent> eh = (ActionEvent event) -> {
            try {
                checkLogin(USER_TXT, PASS_TXT);
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        };

        login_btn.setOnAction(eh);
        USER_TXT.setOnAction(eh);
        PASS_TXT.setOnAction(eh);

        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
        //--------------------------------------------------------------------//
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.