Package javafx.scene.control

Examples of javafx.scene.control.Label


    year = today.get(Calendar.YEAR);
    dateProperty = new SimpleObjectProperty<Date>((new GregorianCalendar()).getTime());
   
    // First block of the picker pane, which is constructed to show month and year and to change them by decreasing and increasing.
    HBox monthYearRow = new HBox();
    final Label monthYear = new Label(getMonthYear((new GregorianCalendar()).getTime()));
    monthYear.setMinHeight(CELL_HEIGHT * 1.5);
    monthYear.setMinWidth(CELL_WIDTH * 6.0);
    monthYear.setAlignment(Pos.CENTER);
    monthYearRow.getStyleClass().add(DATEPICKER_MONTHYEAR);
    Path decrementArrow = new Path();
    decrementArrow.setId(DATEPICKER_ARROW);
    decrementArrow.getElements().addAll(new MoveTo(0, ARROW_SIZE), new LineTo(0, -ARROW_SIZE),
        new LineTo(-ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE));
    decrementArrow.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        month--;
        if(month < 0) {
          month = Calendar.DECEMBER;
          year--;
        }
        monthYear.setText(getMonthYear((new GregorianCalendar(year, month, 1)).getTime()));
        setDayCells();
        me.consume();
      }
    });
    Path inreamentArrow = new Path();
    inreamentArrow.setId(DATEPICKER_ARROW);
    inreamentArrow.getElements().addAll(new MoveTo(0, ARROW_SIZE), new LineTo(0, -ARROW_SIZE),
        new LineTo(ARROW_SIZE, 0), new LineTo(0, ARROW_SIZE));
    inreamentArrow.setOnMouseClicked(new EventHandler<MouseEvent>() {
      @Override
      public void handle(MouseEvent me) {
        month++;
        if(month > Calendar.DECEMBER) {
          month = Calendar.JANUARY;
          year++;
        }
        monthYear.setText(getMonthYear((new GregorianCalendar(year, month, 1)).getTime()));
        setDayCells();
        me.consume();
      }
    });
    monthYearRow.getChildren().addAll(decrementArrow, monthYear, inreamentArrow);
    monthYearRow.setAlignment(Pos.CENTER);
   
    // Second block of the picker pane, which is constructed to show the first letter of names of days in the week.   
    HBox firstLetterOfDayRow = new HBox();
    firstLetterOfDayRow.getStyleClass().add(DATEPICKER_WEEKDAY);
    String[] weekDays = getFirstLettersOfDays();
    for (int i = 0; i < weekDays.length; i++) {
      Label cell = new Label(weekDays[i]);
      cell.setMinHeight(CELL_HEIGHT);
      cell.setMinWidth(CELL_WIDTH);
      cell.setAlignment(Pos.CENTER);
      firstLetterOfDayRow.getChildren().add(cell);
    }
    pickerBox.getChildren().addAll(monthYearRow, firstLetterOfDayRow);
   
    // Third block of the picker pane, which is constructed to show the days in a ROW_NUMBER by COLUMN_NUMBER matrix.
    // The matrix constitutes of DayCell class which extends Label class and holds date information.
    dayCells = new DayCell[COLUMN_NUMBER * ROW_NUMBER];
    int index = 0;
    for (int i = 0; i < ROW_NUMBER; i++) {
      HBox row = new HBox();
      for (int j = 0; j < COLUMN_NUMBER; j++) {
        DayCell cell = createCell(0, 0, 0);
        row.getChildren().add(cell);
        cell.setId(DATEPICKER_DAYCELL);
        dayCells[index++] = cell;
      }
      pickerBox.getChildren().add(row);
    }
   
View Full Code Here


    this.encryptResult = encryptResult;
    this.beanPathAdapter = beanPathAdapter;
    this.modelKey = modelKey;
    this.modelItemKey = modelItemKey;
    this.type = type;
    label = new Label();
    label.setText(labelText);
    if (toolTip != null && !toolTip.isEmpty()) {
      label.setTooltip(new Tooltip(toolTip));
    }
    this.numericStepperFormat = type != Type.NUMERIC_STEPPER ? null
View Full Code Here

        mainRec.setHeight(textViewBounds.getHeight());
        middleRec.setHeight(mainRec.getHeight());
      }
    });
     
        final Label onLabel = new Label();
        onLabel.setCache(true);
        onLabel.setCacheHint(CacheHint.SPEED);
        onLabel.setText(onText);
        onLabel.setTextFill(Color.WHITE);
        onLabel.setStyle("-fx-text-fill: #FFFFFF; -fx-font-size: 12pt; -fx-font-weight: bold;");
        final Label offLabel = new Label();
        offLabel.setCache(true);
        offLabel.setText(offText);
        offLabel.setStyle("-fx-text-fill: #333333; -fx-font-size: 12pt; -fx-font-weight: bold;");
        HBox.setMargin(onLabel, TEXT_INSETS);
        HBox.setMargin(offLabel, TEXT_INSETS);
    textView.getChildren().addAll(onLabel, offLabel);
   
      mainRec = new Rectangle();
View Full Code Here

    addNotificationOptionChildren(++ci, 0);
    addGateChildren(++ci, 0);
  }

  protected void addNotificationOptionChildren(final int columnIndex, final int rowIndex) {
    final Label soundLabel = createLabel(KEY.SERVICE_CMD_SOUNDS);
    final Label emailLabel = createLabel(KEY.MAIL_ALARM_NOTIFY);
    final Label imgResLabel = createLabel(KEY.CAM_RES);
    final Label syncResLabel = createLabel(KEY.WIRELESS_REMOTE_SYNC);

    soundsToggleSwitch = new UGateToggleSwitchBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.DEVICE_SOUNDS_ON,
        RS.IMG_SOUND_ON, RS.IMG_SOUND_OFF);
    controlBar.addHelpTextTrigger(soundsToggleSwitch, RS.rbLabel(KEY.SERVICE_CMD_SOUNDS_TOGGLE));
View Full Code Here

        imgResLabel, imgResToggleSwitch, syncResLabel, syncToggleSwitch);
    add(generalCell, columnIndex, rowIndex);
  }
 
  protected void addRemoteNodeSetupChildren(final int columnIndex, final int rowIndex) {
    final Label univRemoteLabel = createLabel(KEY.WIRELESS_REMOTE_UNIVERSAL);
    final Label nodeLabel = createLabel(KEY.WIRELESS_NODE_REMOTE_ADDY);
    nodeLabel.setPrefWidth(350d);
   
    remoteAddress = new UGateCtrlBox<>(controlBar.getRemoteNodePA(),
        RemoteNodeType.WIRELESS_ADDRESS, UGateCtrlBox.Type.TEXT,
        RS.rbLabel(KEY.WIRELESS_NODE_REMOTE_ADDY), null);
    remoteAddress.label.getStyleClass().add("dialog-normal");
View Full Code Here

        univRemoteLabel, universalRemoteAccessToggleSwitch, accessKeysContainer);
    add(setupCell, columnIndex, rowIndex);
  }
 
  protected void addGateChildren(final int columnIndex, final int rowIndex) {
    final Label gateHeader = createLabel(KEY.GATE_CONFIG);
    gateToggleSwitchView = new UGateToggleSwitchBox<>(
        controlBar.getRemoteNodePA(), RemoteNodeType.GATE_ACCESS_ON,
        RS.IMG_GATE_ON, RS.IMG_GATE_OFF);
    controlBar.addHelpTextTrigger(gateToggleSwitchView, RS.rbLabel(KEY.GATE_ACCESS_DESC));
    final Label gateCtrlHeader = createLabel(KEY.GATE_STATE);
    final ImageView gateToggleImgView = RS.imgView(RS.IMG_GATE_CLOSED);
    final Button gateToggleBtn = new Button();
    gateToggleBtn.setCursor(Cursor.HAND);
    gateToggleBtn.setGraphic(gateToggleImgView);
    controlBar.addHelpTextTrigger(gateToggleBtn, RS.rbLabel(KEY.GATE_TOGGLE_DESC));
View Full Code Here

   */
  public SensorReading(final ControlBar controlBar, final Orientation orientation) {
    super();
    this.cb = controlBar;
    this.sensorReadingsPropertyWrapper = new ReadOnlyObjectWrapper<RemoteNodeReading>();
    readDate = new Label();
    readDate.getStyleClass().add("readings-text");
    cb.addHelpTextTrigger(readDate, RS.rbLabel(KEY.WIRELESS_REMOTE_READINGS_TIME));
    final ImageView sonarReadingLabel = RS.imgView(RS.IMG_SONAR);
    sonarReading = new Digits(String.format(AlarmThresholds.FORMAT_SONAR, 0.0f),
        0.15f, GuiUtil.COLOR_SONAR, null);
View Full Code Here

  }

  protected boolean loadToolBar() {
    if (!ServiceProvider.IMPL.getWebService().isRunning()) {
      toolBar.getItems().clear();
      toolBar.getItems().add(new Label("Web server must be started to view/edit the web view"));
      return false;
    }
    return true;
  }
View Full Code Here

    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)),
          multiAlarmGroup);
    } else {
      multiAlarmGroup = GuiUtil.createBackgroundDisplay(PADDING_INSETS,
          CHILD_SPACING, 1, false, 0, 0, multiAlarmToggleSwitch);
      getChildren().addAll(multiAlarmGroup, offToggleSwitch);
View Full Code Here

        + "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);
    SplitPane pojoSplit = new SplitPane();
    pojoSplit.getItems().addAll(beanPane, pojoBox);
    VBox beanBox = new VBox(10);
    beanBox.getChildren().addAll(toolBar, pojoSplit);
    return beanBox;
View Full Code Here

TOP

Related Classes of javafx.scene.control.Label

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.