Examples of GridPane


Examples of javafx.scene.layout.GridPane

        if (GuiUtil.isPrimaryPress(event)) {
          selectOrRemove(textField.getText(), true);
        }
      }
    });
    final GridPane editMenu = new GridPane();
    editMenu.setAlignment(Pos.BOTTOM_RIGHT);
    editMenu.setPadding(new Insets(7d, 0, 0, 0));
    editMenu.setHgap(2d);
    editMenu.setVgap(5d);
    editMenu.add(menuNewItemButton, 0, 0);
    editMenu.add(menuRemoveItemButton, 0, 1);
    editMenu.setMaxSize(MENU_BUTTON_WIDTH, MENU_BUTTON_HEIGHT);
    GridPane.setVgrow(menuNewItemButton, Priority.ALWAYS);
    GridPane.setVgrow(menuRemoveItemButton, Priority.NEVER);
    final StackPane textStack = new StackPane();
    textStack.setAlignment(Pos.BOTTOM_RIGHT);
    textStack.getChildren().addAll(textField, menuButton);
View Full Code Here

Examples of javafx.scene.layout.GridPane

    cb.addServiceBehavior(emailConnectBtn, null,
        ServiceProvider.Type.EMAIL, KEY.MAIL_CONNECT_DESC);
    emailBtnView.getChildren()
        .addAll(emailConnectBtn, emailOnAtStartSwitch);

    final GridPane grid = new GridPane();
    grid.setHgap(10d);
    grid.setVgap(30d);

    final VBox toggleView = new VBox(10d);
    toggleView.getChildren().addAll(emailIcon);

    final GridPane connectionGrid = new GridPane();
    connectionGrid.setPadding(new Insets(20d, 5, 5, 5));
    connectionGrid.setHgap(15d);
    connectionGrid.setVgap(15d);
    connectionGrid.add(smtpHost, 0, 0);
    connectionGrid.add(smtpPort, 1, 0);
    connectionGrid.add(imapHost, 0, 1);
    connectionGrid.add(imapPort, 1, 1);
    connectionGrid.add(username, 0, 2);
    connectionGrid.add(password, 1, 2);
    connectionGrid.add(inboxFolder, 0, 3, 2, 1);
    connectionGrid.add(encryptBox, 0, 4, 2, 1);
    connectionGrid.add(recipients, 0, 5, 2, 1);
    connectionGrid.add(recipientFuncBox, 0, 6, 2, 1);

    grid.add(toggleView, 0, 0);
    grid.add(connectionGrid, 1, 0);
    grid.add(emailBtnView, 1, 1, 2, 1);
    getChildren().add(grid);
View Full Code Here

Examples of javafx.scene.layout.GridPane

    addColumn2();
    addColumn3();
  }

  protected void addColumn1() {
    final GridPane grid = new GridPane();
    grid.setHgap(0d);
    grid.setVgap(0d);
    // cam pan
    final Label panHeader = createLabel(KEY.CAM_PAN);
    grid.add(panHeader, 0, 0);
    final UGateGaugeBox<RemoteNode> camPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.CAM_ANGLE_PAN,
        null, IndicatorType.KNOB, KNOB_SIZE_SCALE, 10d, 0, 0d, 180d,
        19, 0, FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_CAM);
    controlBar.addHelpTextTrigger(camPanGauge, RS.rbLabel(KEY.CAM_PAN_DESC));
    grid.add(camPanGauge, 0, 1);
    // cam tilt
    final Label tiltHeader = createLabel(KEY.CAM_TILT);
    grid.add(tiltHeader, 1, 0);
    final ImageView tiltImgView = RS.imgView(camPanGauge.imageView.getImage(), false);
    tiltImgView.setRotate(90d);
    final UGateGaugeBox<RemoteNode> camTiltGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.CAM_ANGLE_TILT,
        null, IndicatorType.KNOB, KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19,
        0, FORMAT_ANGLE, tiltImgView, GuiUtil.COLOR_CAM);
    controlBar.addHelpTextTrigger(camTiltGauge, RS.rbLabel(KEY.CAM_TILT));
    grid.add(camTiltGauge, 1, 1);
    // sonar/pir pan
    final Label sonarPirPanHeader = createLabel(KEY.SONAR_PIR_PAN);
    grid.add(sonarPirPanHeader, 0, 2);
    final UGateGaugeBox<RemoteNode> sonarPirPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.SONAR_PIR_ANGLE_PAN, null, IndicatorType.KNOB,
        KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19, 0, FORMAT_ANGLE,
        RS.IMG_PAN, GuiUtil.COLOR_MULTI);
    controlBar.addHelpTextTrigger(sonarPirPanGauge, RS.rbLabel(KEY.SONAR_PIR_PAN_DESC));
    grid.add(sonarPirPanGauge, 0, 3);
    // sonar/pir tilt
    final Label sonarPirTiltHeader = createLabel(KEY.SONAR_PIR_TILT);
    grid.add(sonarPirTiltHeader, 1, 2);
    final ImageView sonarPirTiltImgView = RS.imgView(sonarPirPanGauge.imageView.getImage(), false);
    sonarPirTiltImgView.setRotate(90d);
    final UGateGaugeBox<RemoteNode> sonarPirTiltGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.SONAR_PIR_ANGLE_TILT, null, IndicatorType.KNOB,
        KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19, 0, FORMAT_ANGLE,
        sonarPirTiltImgView, GuiUtil.COLOR_MULTI);
    controlBar.addHelpTextTrigger(sonarPirTiltGauge, RS.rbLabel(KEY.SONAR_PIR_TILT_DESC));
    grid.add(sonarPirTiltGauge, 1, 3);
    // microwave pan
    final Label headerMW = createLabel(KEY.MW_PAN);
    grid.add(headerMW, 0, 4);
    final UGateGaugeBox<RemoteNode> mwPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.MW_ANGLE_PAN,
        null, IndicatorType.KNOB, KNOB_SIZE_SCALE, 10d, 0, 0, 180d, 19,
        0, FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_MW);
    controlBar.addHelpTextTrigger(mwPanGauge, RS.rbLabel(KEY.MW_PAN_DESC));
    grid.add(mwPanGauge, 0, 5);
    // laser calibration
    final Label headerLaser = createLabel(KEY.LASER_CALIBRATION);
    grid.add(headerLaser, 1, 4);
      final Button laserCalibrate = new Button(); //new Button(RS.rbLabel("laser.calibration"));
      laserCalibrate.setGraphic(RS.imgView(RS.IMG_LASER_CALIBRATE));
      laserCalibrate.setMaxWidth(125d);
      laserCalibrate.setWrapText(true);
      laserCalibrate.addEventHandler(MouseEvent.MOUSE_PRESSED, new EventHandler<MouseEvent>() {
      @Override
      public void handle(final MouseEvent event) {
        if (GuiUtil.isPrimaryPress(event)) {
          controlBar.createCommandService(Command.SERVO_LASER_CALIBRATE, true);
        }
      }
    });
    controlBar.addHelpTextTrigger(laserCalibrate, RS.rbLabel(KEY.LASER_CALIBRATION_DESC));
    grid.add(laserCalibrate, 1, 5);
   
    final Parent camCell = createCell(grid);
    add(camCell, 0, 0);
  }
View Full Code Here

Examples of javafx.scene.layout.GridPane

    final Parent camCell = createCell(grid);
    add(camCell, 0, 0);
  }
 
  protected void addColumn2() {
    final GridPane grid = new GridPane();
    //####### Sonar #######
    sonarAnglePriority = new UGateCtrlBox<>(controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_SONAR_TRIP_ANGLE_PRIORITY, PRIORITY_FORMAT,
        GuiUtil.COLOR_SONAR, MIN_SENSOR_INDEX, MAX_SENSOR_INDEX,
        RS.rbLabel(KEY.CAM_SONAR_TRIP_ANGLE_PRIORITY), null);
    controlBar.addHelpTextTrigger(sonarAnglePriority, RS.rbLabel(KEY.CAM_TRIP_ANGLE_PRIORITY_DESC,
        RS.rbLabel(KEY.CAM_SONAR_TRIP_ANGLE_PRIORITY)));
    addPriorityValueListener(sonarAnglePriority);
    grid.add(sonarAnglePriority, 0, 0, 2, 1);
    // cam sonar pan
    final Label camSonarPanHeader = createLabel(KEY.CAM_PAN_SONAR);
    grid.add(camSonarPanHeader, 0, 1);
    final UGateGaugeBox<RemoteNode> camSonarPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_SONAR_TRIP_ANGLE_PAN, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_SONAR);
    controlBar.addHelpTextTrigger(camSonarPanGauge, RS.rbLabel(KEY.CAM_PAN_SONAR_DESC));
    grid.add(camSonarPanGauge, 0, 2);
    // cam sonar tilt
    final ImageView camSonarTiltImgView = RS.imgView(camSonarPanGauge.imageView.getImage(), false);
    camSonarTiltImgView.setRotate(90d);
    final Label camSonarTiltHeader = createLabel(KEY.CAM_TILT_SONAR);
    grid.add(camSonarTiltHeader, 1, 1);
    final UGateGaugeBox<RemoteNode> camSonarTiltGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_SONAR_TRIP_ANGLE_TILT, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, camSonarTiltImgView, GuiUtil.COLOR_SONAR);
    controlBar.addHelpTextTrigger(camSonarTiltGauge, RS.rbLabel(KEY.CAM_TILT_SONAR_DESC));
    grid.add(camSonarTiltGauge, 1, 2);
    //####### PIR #######
    pirAnglePriority = new UGateCtrlBox<>(controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_PIR_TRIP_ANGLE_PRIORITY, PRIORITY_FORMAT,
        GuiUtil.COLOR_PIR, MIN_SENSOR_INDEX, MAX_SENSOR_INDEX,
        RS.rbLabel(KEY.CAM_PIR_TRIP_ANGLE_PRIORITY), null);
    controlBar.addHelpTextTrigger(pirAnglePriority, RS.rbLabel(KEY.CAM_TRIP_ANGLE_PRIORITY_DESC,
        RS.rbLabel(KEY.CAM_PIR_TRIP_ANGLE_PRIORITY)));
    addPriorityValueListener(pirAnglePriority);
    grid.add(pirAnglePriority, 0, 3, 2, 1);
    // cam PIR pan
    final Label pirPanHeader = createLabel(KEY.CAM_PAN_PIR);
    grid.add(pirPanHeader, 0, 4);
    final UGateGaugeBox<RemoteNode> pirPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_PIR_TRIP_ANGLE_PAN, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_PIR);
    controlBar.addHelpTextTrigger(pirPanGauge, RS.rbLabel(KEY.CAM_PAN_PIR_DESC));
    grid.add(pirPanGauge, 0, 5);
    // cam PIR tilt
    final Label pirTiltHeader = createLabel(KEY.CAM_TILT_PIR);
    grid.add(pirTiltHeader, 1, 4);
    final UGateGaugeBox<RemoteNode> pirTiltGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_PIR_TRIP_ANGLE_TILT, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_PIR);
    controlBar.addHelpTextTrigger(pirTiltGauge, RS.rbLabel(KEY.CAM_TILT_PIR_DESC));
    grid.add(pirTiltGauge, 1, 5);
   
    final Parent cell = createCell(grid);
    add(cell, 1, 0);
  }
View Full Code Here

Examples of javafx.scene.layout.GridPane

    final Parent cell = createCell(grid);
    add(cell, 1, 0);
  }
 
  protected void addColumn3() {
    final GridPane grid = new GridPane();
    //####### Microwave #######
    mwAnglePriority = new UGateCtrlBox<>(controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_MW_TRIP_ANGLE_PRIORITY, PRIORITY_FORMAT,
        GuiUtil.COLOR_MW, MIN_SENSOR_INDEX, MAX_SENSOR_INDEX,
        RS.rbLabel(KEY.CAM_MW_TRIP_ANGLE_PRIORITY), null);
    controlBar.addHelpTextTrigger(mwAnglePriority, RS.rbLabel(KEY.CAM_TRIP_ANGLE_PRIORITY_DESC,
        RS.rbLabel(KEY.CAM_MW_TRIP_ANGLE_PRIORITY)));
    addPriorityValueListener(mwAnglePriority);
    grid.add(mwAnglePriority, 0, 0, 2, 1);
    // cam microwave pan
    final Label mwPanHeader = createLabel(KEY.CAM_PAN_MW);
    grid.add(mwPanHeader, 0, 1);
    final UGateGaugeBox<RemoteNode> mwPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_MW_TRIP_ANGLE_PAN, null, IndicatorType.KNOB,
        KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0, FORMAT_ANGLE,
        RS.IMG_PAN, GuiUtil.COLOR_MW);
    controlBar.addHelpTextTrigger(mwPanGauge, RS.rbLabel(KEY.CAM_PAN_MW_DESC));
    grid.add(mwPanGauge, 0, 2);
    // cam microwave tilt
    final Label mwTiltHeader = createLabel(KEY.CAM_TILT_MW);
    grid.add(mwTiltHeader, 1, 1);
    final UGateGaugeBox<RemoteNode> mwTiltGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_MW_TRIP_ANGLE_TILT, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_MW);
    controlBar.addHelpTextTrigger(mwTiltGauge, RS.rbLabel(KEY.CAM_TILT_MW_DESC));
    grid.add(mwTiltGauge, 1, 2);
    //####### Laser #######
    laserAnglePriority = new UGateCtrlBox<>(controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_LASER_TRIP_ANGLE_PRIORITY, PRIORITY_FORMAT,
        GuiUtil.COLOR_LASER, MIN_SENSOR_INDEX, MAX_SENSOR_INDEX,
        RS.rbLabel(KEY.CAM_LASER_TRIP_ANGLE_PRIORITY), null);
    controlBar.addHelpTextTrigger(laserAnglePriority, RS.rbLabel(KEY.CAM_TRIP_ANGLE_PRIORITY_DESC,
        RS.rbLabel(KEY.CAM_LASER_TRIP_ANGLE_PRIORITY)));
    addPriorityValueListener(laserAnglePriority);
    grid.add(laserAnglePriority, 0, 3, 2, 1);
    // cam laser pan
    final Label laserPanHeader = createLabel(KEY.CAM_PAN_LASER);
    grid.add(laserPanHeader, 0, 4);
    final UGateGaugeBox<RemoteNode> laserPanGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_LASER_TRIP_ANGLE_PAN, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_LASER);
    controlBar.addHelpTextTrigger(laserPanGauge, RS.rbLabel(KEY.CAM_PAN_LASER_DESC));
    grid.add(laserPanGauge, 0, 5);
    // cam laser tilt
    final Label laserTiltHeader = createLabel(KEY.CAM_TILT_LASER);
    grid.add(laserTiltHeader, 1, 4);
    final UGateGaugeBox<RemoteNode> laserTiltGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.CAM_LASER_TRIP_ANGLE_TILT, null,
        IndicatorType.KNOB, KNOB_SIZE_SCALE, 10.7d, 0, 0, 180d, 18, 0,
        FORMAT_ANGLE, RS.IMG_PAN, GuiUtil.COLOR_LASER);
    controlBar.addHelpTextTrigger(laserTiltGauge, RS.rbLabel(KEY.CAM_TILT_LASER_DESC));
    grid.add(laserTiltGauge, 1, 5);
   
    final Parent cell = createCell(grid);
    add(cell, 2, 0);
  }
View Full Code Here

Examples of javafx.scene.layout.GridPane

        0.15f, GuiUtil.COLOR_LASER, null);
    cb.addHelpTextTrigger(laserReading, RS.rbLabel(KEY.WIRELESS_REMOTE_READINGS_SENSOR));
    reportReadings = new UGateToggleSwitchBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.REPORT_READINGS);
    cb.addHelpTextTrigger(reportReadings, RS.rbLabel(KEY.WIRELESS_REMOTE_READINGS_REPORT));
    final GridPane readingsGroup = GuiUtil.createBackgroundDisplay(PADDING_INSETS, CHILD_SPACING,
        orientation == Orientation.HORIZONTAL ? 10 : 1, true,
        0, 0, readDate, sonarReadingLabel, sonarReading, pirReadingLabel, pirReading,
        mwReadingLabel, mwReading, laserReadingLabel, laserReading, reportReadings);
    // show a visual indication that the settings need updated
    UGateKeeper.DEFAULT.addListener(new UGateListener() {
View Full Code Here

Examples of javafx.scene.layout.GridPane

  protected GridPane createIconGrid(final StatusIcon icon, final Node... nodes) {
      final VBox iconNodes = new VBox(10d);
      iconNodes.setPadding(new Insets(30d, 0, 0, 0));
      iconNodes.getChildren().addAll(nodes);
     
      final GridPane iconGrid = new GridPane();
      //iconGrid.setPadding(new Insets(20d, 0, 0, 0));
    iconGrid.setHgap(5d);
    iconGrid.setVgap(15d);
    iconGrid.add(icon, 0, 0);
      iconGrid.add(iconNodes, 1, 0);
     
      return iconGrid;
  }
View Full Code Here

Examples of javafx.scene.layout.GridPane

            RS.IMG_MICROWAVE_ALARM_OFF, RS.IMG_MICROWAVE_ALARM_ANY, null, false),
        new UGateToggleSwitchBox.ToggleItem(RS.IMG_LASER_ALARM_MULTI,
            RS.IMG_LASER_ALARM_OFF, RS.IMG_LASER_ALARM_ANY, null, false));
    final UGateToggleSwitchBox<RemoteNode> offToggleSwitch = new UGateToggleSwitchBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.ALARMS_ON);
    GridPane multiAlarmGroup;
    if (orientation == Orientation.HORIZONTAL) {
      multiAlarmGroup = GuiUtil.createBackgroundDisplay(PADDING_INSETS,
          CHILD_SPACING, 10, false, 0, 0, multiAlarmToggleSwitch,
          offToggleSwitch);
      getChildren().addAll(new Label(RS.rbLabel(KEY.SENSOR_TRIP_MULTI)),
View Full Code Here

Examples of javafx.scene.layout.GridPane

    final Label label = new Label();
    vbox.getChildren().add(label);
    final HBox yearMonthChooser = createYearMonthChooser();
    vbox.getChildren().add(yearMonthChooser);
   
        final GridPane gridPane = new GridPane();
        vbox.getChildren().add(gridPane);
        updateDayInMonthChooser(gridPane);
        VBox.setMargin(gridPane, new Insets(3));
        final HBox timeChooser = createTimeChooser();
    vbox.getChildren().add(timeChooser);

        model.addChangeListener(new ChangeListener<Integer>() {
            @Override
            public void changed(ObservableValue<? extends Integer> observable, Integer oldValue, Integer newValue) {
                if (!model.isNull()){
                    label.setText(dateFormat.format(model.getDate()));
                } else {
                    label.setText("");
                }

                updateDayInMonthChooser(gridPane);
                gridPane.setDisable(model.isNull());
                timeChooser.setDisable(model.isNull());
                yearMonthChooser.setDisable(model.isNull());
            }
        });
    return vbox;
View Full Code Here

Examples of javafx.scene.layout.GridPane

        vbox.getChildren().addAll(createGridPane(), hbox);
        return vbox;
    }
           
    private GridPane createGridPane(){
        GridPane gridpane= new GridPane();
        gridpane.setHgap(10);
        gridpane.setVgap(10);
        scoreLabel= new Label();
        nameTf= new TextField();       
        gridpane.add(new Label("Score"), 0, 0);
        gridpane.add(scoreLabel, 1, 0);
        gridpane.add(new Label("Name"), 0, 1);
        gridpane.add(nameTf, 1, 1);
        return gridpane;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.