Package javafx.scene.text

Examples of javafx.scene.text.Text


       
        // SETTINGS
        VBox settings = new VBox();     
        settings.setSpacing(5);
       
        Text settingsTitle = new Text("Settings");
        Text settingsGamepad = new Text("Gamepad settings");
        Text settingsConnection = new Text("Connection settings");
        settingsTitle.setFont(Font.font("Arial", 18));
        settingsGamepad.setFont(Font.font("Arial", 13));
        settingsConnection.setFont(Font.font("Arial", 13));
       
        gamepadSelect = new ComboBox();
        connectButton = new Button("Connect");
       
        connectButton.setOnAction(new EventHandler<ActionEvent>() {
            @Override public void handle(ActionEvent e) {
                if(socketThread != null) {
                    if(socketThread.isAlive()) {
                        connectButton.setText("Connect");
                        try {
                            lujSocket.terminate();
                            socketThread.join();
                            console.appendText("Disconnected. Socket thread " + socketThread.toString() + " terminated successfully.\n");
                            socketThread = null;
                        } catch (InterruptedException ex) {
                            Logger.getLogger(LujKomandor.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                    } else {
                        if(lujSocket.connect())
                        {
                            connectButton.setText("Disconnect");
                            socketThread = new Thread(lujSocket);
                            lujSocket.start();
                            socketThread.start();
                            console.appendText("Connected successfully. Socket thread " + socketThread.toString() + " started.\n");
                        } else
                            console.appendText("Cannot connect to Luj Szperacz.\n");

                    }
            }
        });
        // CONTROL
        VBox control = new VBox();
        control.setSpacing(5);
       
        Text controlTitle = new Text("Control");
        controlTitle.setFont(Font.font("Arial", 18));
       
       
       
        // STATUS
        VBox status = new VBox();
        status.setSpacing(5);
       
        Text statusTitle = new Text("Status");
        statusTitle.setFont(Font.font("Arial", 18));
       
        Text statusPadXAxisCaption = new Text("Gamepad X Axis");
        Text statusPadYAxisCaption = new Text("Gamepad Y Axis");
        Text statusPiTempCaption = new Text("RPi CPU Temperature");
        Text statusOutsideTempCaption = new Text("Outside Temperature");
        Text statusBatteryVoltageCaption = new Text("Battery Voltage");
        statusPadXAxisCaption.setFont(Font.font("Arial", 14));
        statusPadYAxisCaption.setFont(Font.font("Arial", 14));
        statusPiTempCaption.setFont(Font.font("Arial", 14));
        statusOutsideTempCaption.setFont(Font.font("Arial", 14));
        statusBatteryVoltageCaption.setFont(Font.font("Arial", 14));
       
        Text statusPadXAxis = new Text("Settings");
        Text statusPadYAxis = new Text("Settings");
        Text statusPiTemp = new Text("Gamepad settings");
        Text statusOutsideTemp = new Text("Connection settings");
        Text statusBatteryVoltage = new Text("Connection settings");
       
        statusIndicators = new LinkedList<Text>();
       
        statusIndicators.add(statusPadXAxis);
        statusIndicators.add(statusPadYAxis);
View Full Code Here


   * @param jcgp
   */
  private void initialiseBaseParameters(JCGP jcgp) {
    baseParameterPane = new VBox(2);
   
    Text header = new Text("Base Parameters");
    header.setFont(Font.font("Arial", 14));
    header.setUnderline(true);
   
    baseParameterPane.getChildren().add(header);

    parameters.add(GUIParameter.create(jcgp.getResources().getRowsParameter(), this));
    parameters.add(GUIParameter.create(jcgp.getResources().getColumnsParameter(), this));
View Full Code Here

  }

  private void initialiseEAParameters(final JCGP jcgp) {
    eaPane = new VBox(2);
   
    Text header = new Text("Evolutionary Strategy");
    header.setFont(Font.font("Arial", 14));
    header.setUnderline(true);
   
    final ComboBox<EvolutionaryStrategy> esCBox = new ComboBox<EvolutionaryStrategy>();
    esCBox.getItems().addAll(jcgp.getEvolutionaryStrategies());
    esCBox.getSelectionModel().select(jcgp.getEvolutionaryStrategy());
    esCBox.prefWidthProperty().bind(mainContainer.widthProperty());
View Full Code Here

  }

  private void initialiseMutatorParameters(final JCGP jcgp) {
    mutatorPane = new VBox(2);
   
    Text header = new Text("Mutator");
    header.setFont(Font.font("Arial", 14));
    header.setUnderline(true);
   
    final ComboBox<Mutator> mutatorCBox = new ComboBox<Mutator>();
    mutatorCBox.getItems().addAll(jcgp.getMutators());
    mutatorCBox.getSelectionModel().select(jcgp.getMutator());
    mutatorCBox.prefWidthProperty().bind(mainContainer.widthProperty());
View Full Code Here

  private void initialiseProblemTypeParameters(final JCGP jcgp, final GUI gui) {
    updateArity();
   
    problemPane= new VBox(2);
   
    Text header = new Text("Problem Type");
    header.setFont(Font.font("Arial", 14));
    header.setUnderline(true);
   
    final ComboBox<Problem> problemCBox = new ComboBox<Problem>();
    problemCBox.getItems().addAll(jcgp.getProblems());
    problemCBox.getSelectionModel().select(jcgp.getProblem());
    problemCBox.prefWidthProperty().bind(mainContainer.widthProperty());
View Full Code Here

    });
    return b;
  }

  private void createControls(final GUI gui) {
    Text header = new Text("Experiment controls");
    header.setFont(Font.font("Arial", 14));
    header.setUnderline(true);
   
    final VBox controls = new VBox(2);
    controls.setFillWidth(true);
   
    final HBox flowButtons = new HBox(2);
View Full Code Here

        {
            TextInputControl textInput = ( TextInputControl )node;
            actualText = textInput.getText();
        }else
        {
            Text textInput = ( Text)node;
            actualText = textInput.getText();
        }
        return label.equals(actualText);
    }
View Full Code Here

        if (CONTROL.getPrefWidth() <= 0 || CONTROL.getPrefHeight() <= 0) {
            CONTROL.setPrefSize(PREFERRED_WIDTH, PREFERRED_HEIGHT);
        }

        button = new Group();
        text   = new Text(CONTROL.getText());

        mouseHandler = new EventHandler<MouseEvent>() {
            @Override public void handle(final MouseEvent event) {
                if (MouseEvent.MOUSE_PRESSED == event.getEventType()) {
                    buttonPressAction(button, event.getX(), event.getY());
View Full Code Here

    toolBar.getItems().add(pBox);
    VBox personBox = new VBox(10);
    personBox.setPadding(new Insets(10, 10, 10, 50));
    VBox beanPane = new VBox(10);
    beanPane.setPadding(new Insets(10, 10, 10, 10));
    final Text title = new Text(
        "Person POJO using auto-generated JavaFX properties. "
            + "Duplicate field controls exist to demo multiple control binding");
    title.setWrappingWidth(400d);
    HBox hobbyBox = beanTF("allHobbies", "hobbies", "name", Hobby.class, 0,
        ListView.class, null, HOBBY_OVERWRITE);
    HBox langBox = beanTF("allLanguages", "languages", null, String.class,
        0, ListView.class, null, shouldNeverAppear);
    final HBox stBox = beanTF("address.location.state", null, null, null,
        2, ComboBox.class, "[a-zA-z]", STATES);
    personBox.getChildren().addAll(
        beanTF("name", null, null, null, 50, null, "[a-zA-z0-9\\s]*"),
        beanTF("age", null, null, null, 100, Slider.class, null),
        beanTF("age", null, null, null, 100, null, "[0-9]"),
        beanTF("password", null, null, null, 100, PasswordField.class,
            "[a-zA-z0-9]"),
        beanTF("address.street", null, null, null, 50, null,
            "[a-zA-z0-9\\s]*"),
        stBox,
        beanTF("address.location.country", null, null, null, 10, null,
            "[0-9]"),
        beanTF("address.location.country", null, null, null, 2,
            ComboBox.class, "[0-9]", new Integer[] { 0, 1, 2, 3 }),
        beanTF("address.location.international", null, null, null, 0,
            CheckBox.class, null),
        beanTF("dob", null, null, null, 0, CalendarTextField.class,
            null),
        beanTF("role", null, null, null, 0, ListSpinner.class,
            null, ROLE1, ROLE2, null), langBox, hobbyBox);
    beanPane.getChildren().addAll(title, personBox);
    //personBox.getChildren().add(createRoleField("role"));

    final TextField pojoNameTF = new TextField();
    Button pojoNameBtn = new Button("Set Person's Name");
    pojoNameBtn.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent event) {
        personPA.getBean().setName(pojoNameTF.getText());
        dumpPojo(null, null, personPA);
      }
    });
    VBox pojoBox = new VBox(10);
    pojoBox.setPadding(new Insets(10, 10, 10, 10));
    Text lbl = new Text("Set selected person's field data via POJO "
        + "with unbound controls (not working because without "
        + "dependency injection instrumentation, java agent, or "
        + "byte-code manipulation this is not currently possible- "
        + "maybe a JavaFX life-cycle listener would work?):");
    lbl.setWrappingWidth(300d);
    pojoBox.getChildren().addAll(lbl, new Label("Name:"), pojoNameTF,
        pojoNameBtn, new Separator(),
        updateListView(langBox, "Language"),
        updateListView(hobbyBox, "Hobby"), new Separator(),
        new Label("POJO Dump:"), pojoTA);
View Full Code Here

      iv1=new ImageView();
        iv1.setImage(image)
      Group  root  =  new  Group();
          Label label1=new Label("Test label");
          Scene  scene  =  new  Scene(root);
          Text  text  =  new  Text();
          Text  text2  =  new  Text();
          text2.setText("Jafar\nAzad\nAdam\nSteve\nMr.B\nDavid\nArthur\nWEILONG");
          text2.setFont(Font.font ("Verdana", 40));
          //text.setLayoutX(10);
          //text.setLayoutY(10);
          text.setFont(Font.font ("Verdana", 40));
          text.setText("Brain");
          Label label = new Label("Test Label:");
View Full Code Here

TOP

Related Classes of javafx.scene.text.Text

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.