protected void updateMonthYearPane() { // update date labels YearMonth yearMonth = selectedYearMonth.get(); LocalDate value = datePicker.getValue(); value = value == null ? LocalDate.now() : value; selectedDateLabel.setText(DateTimeFormatter.ofPattern("EEE, MMM dd").format(value)); selectedYearLabel.setText(formatYear(yearMonth)); monthYearLabel.setText(formatMonth(yearMonth) + " " + formatYear(yearMonth)); Chronology chrono = datePicker.getChronology(); LocalDate firstDayOfMonth = yearMonth.atDay(1); backMonthButton.setDisable(!isValidDate(chrono, firstDayOfMonth, -1, DAYS)); forwardMonthButton.setDisable(!isValidDate(chrono, firstDayOfMonth, +1, MONTHS)); }
@Override public void start(Stage stage) { FlowPane main = new FlowPane(); main.setVgap(20); main.setHgap(20); main.getChildren().add(new Button("Java Button")); JFXButton jfoenixButton = new JFXButton("JFoenix Button"); main.getChildren().add(jfoenixButton); JFXButton button = new JFXButton("RAISED BUTTON"); button.getStyleClass().add("button-raised"); main.getChildren().add(button); JFXButton button1 = new JFXButton("DISABLED"); button1.setDisable(true); main.getChildren().add(button1); StackPane pane = new StackPane(); pane.getChildren().add(main); StackPane.setMargin(main, new Insets(100)); pane.setStyle("-fx-background-color:WHITE"); final Scene scene = new Scene(pane, 800, 200); scene.getStylesheets().add(ButtonDemo.class.getResource("/css/jfoenix-components.css").toExternalForm()); stage.setTitle("JFX Button Demo"); stage.setScene(scene); stage.show(); }
private void setDisabled() { this.startButton.setDisable(true); }
protected void updateMonthYearPane() { // update date labels YearMonth yearMonth = selectedYearMonth.get(); LocalDate value = datePicker.getValue(); value = value == null ? LocalDate.now() : value; selectedDateLabel.setText(DateTimeFormatter.ofPattern("EEE, MMM dd").format(value)); selectedYearLabel.setText(formatYear(yearMonth)); monthYearLabel.setText(formatMonth(yearMonth) + " " + formatYear(yearMonth)); Chronology chrono = datePicker.getChronology(); LocalDate firstDayOfMonth = yearMonth.atDay(1); backMonthButton.setDisable(!isValidDate(chrono, firstDayOfMonth, -1, DAYS)); forwardMonthButton.setDisable(!isValidDate(chrono, firstDayOfMonth, +1, MONTHS)); }
@Override public void loadUserProfile(final String name) { try { // Load the actual user this.recognizer.loadUserProfile(name); } catch (final IOException e1) { ViewUtilities.showNotificationPopup("User Dataset not found", "Regenerating it", Duration.MEDIUM, // NOPMD NotificationType.ERROR, t -> e1.printStackTrace()); } catch (final JsonSyntaxException e2) { ViewUtilities.showNotificationPopup("Json file changed by human!", "Please click to se exception", Duration.MEDIUM, // NOPMD NotificationType.ERROR, t -> e2.printStackTrace()); } // Set User name in scroll bar ((Label) this.userScrollPane.getBottomBar().getChildren().get(0)).setText(name); // Load user gestures ViewUtilities.showSnackBar((Pane) this.recorderPane.getCenter(), "Database loaded and Gesture updated!", Duration.MEDIUM, DimDialogs.SMALL, null); // Create the gesture tree representation. this.createGestureTreeView(this.recognizer.getUserName()); // Initialize the gesture length. this.gestureLength = this.recognizer.getUserGestureLength(); // Initialize Charts this.setChart(this.gestureLength.getFrameNumber(), this.gestureLength.getFrameNumber()); this.startButton.setDisable(false); }