private void hideShowBehaviour(Node node){ node.visibleProperty().bind(enabled); node.managedProperty().bind(enabled); node.disableProperty().bind(Bindings.not(enabled)); }
/** * Constructor */ public AdvancedPaginationBar() { super(); previousButton.getStyleClass().add("advanced-pagination-button"); nextButton.getStyleClass().add("advanced-pagination-button"); firstButton.getStyleClass().add("advanced-pagination-button"); lastButton.getStyleClass().add("advanced-pagination-button"); nextButton.setTooltip(new Tooltip("Next")); nextButton.disableProperty().bind(Bindings.not(hasNext)); lastButton.setTooltip(new Tooltip("Last")); lastButton.disableProperty().bind(Bindings.not(hasNext)); previousButton.setTooltip(new Tooltip("Back")); previousButton.disableProperty().bind(Bindings.not(hasPrevious)); firstButton.setTooltip(new Tooltip("First")); firstButton.disableProperty().bind(Bindings.not(hasPrevious)); layout.getChildren().addAll(rowsPerPageLabel, rowsPerPageCombo, itemsCount, firstButton, previousButton, nextButton, lastButton); }
/** * Constructor */ public STVBottomToolbar() { super(); setStyle("-fx-background-color: white;" + "-fx-border-width: 0 0 0;" + "-fx-padding: 0 16 0 16;" + "-fx-min-height: 88;" + "-fx-alignment: CENTER_RIGHT;" + "-fx-spacing: 16;"); next.setTooltip(new Tooltip("Next")); next.disableProperty().bind(Bindings.not(hasNext)); back.setTooltip(new Tooltip("Back")); back.disableProperty().bind(Bindings.not(hasPrevious)); elementCount.setStyle("-fx-font-family: 'Roboto Regular';" + "-fx-font-size: 1.3em;" + "-fx-opacity: 0.87;" + "-fx-padding: 0 32 0 0;"); // add all getChildren().addAll(elementCount, NodeHelper.horizontalSpacer(), back, next); }
/** * Constructor */ public LoadMorePaginationBar() { super(); previousButton.getStyleClass().add("simple-pagination-button"); previousButton.setText("Less".toUpperCase()); previousButton.setTooltip(new Tooltip("Less")); previousButton.disableProperty().bind(Bindings.not(hasPrevious)); IconUtils.setFontIcon("fa-angle-up:18", previousButton); nextButton.setText("More".toUpperCase()); nextButton.setTooltip(new Tooltip("Load more data")); nextButton.disableProperty().bind(Bindings.not(hasNext)); IconUtils.setFontIcon("fa-angle-down:18", nextButton); if(AbstractApplicationRunner.isDesktop()) { layout.getChildren().addAll(NodeHelper.horizontalSpacer(),rowsPerPageLabel, itemsCount, rowsPerPageCombo, nextButton, NodeHelper.horizontalSpacer()); } else { layout.getChildren().addAll(NodeHelper.horizontalSpacer(), rowsPerPageLabel, nextButton); } }
private void buildNonFloatingRightActionsButton() { popOverFloatingPane.managedProperty().bind(popOverFloatingPane.visibleProperty()); showRightPaneButton.managedProperty().bind(showRightPaneButton.visibleProperty()); hideRightPaneButton.managedProperty().bind(hideRightPaneButton.visibleProperty()); showRightPaneButton.visibleProperty().bind(Bindings.not(hideRightPaneButton.visibleProperty())); IconUtils.setFontIcon("fa-angle-double-left:20", showRightPaneButton); showRightPaneButton.getGraphic().getStyleClass().add("grey-ikonli"); showRightPaneButton.getStyleClass().add("transparent-focus"); showRightPaneButton.setOnAction(e -> { openRightPane(); }); IconUtils.setFontIcon("fa-angle-double-right:20", hideRightPaneButton); hideRightPaneButton.getGraphic().getStyleClass().add("grey-ikonli"); hideRightPaneButton.getStyleClass().add("transparent-focus"); hideRightPaneButton.setOnAction(e -> { closeRightPane(); }); }
/** * Constructor */ public CheckboxInputView() { super(); StackedFontIcon fontIcon = new StackedFontIcon(); unselectedIcon = new FontIcon("fa-toggle-off:26"); selectedIcon = new FontIcon("fa-toggle-on:26"); fontIcon.getChildren().addAll(unselectedIcon, selectedIcon); theCheckbox.setGraphic(fontIcon); unselectedIcon.visibleProperty().bind(Bindings.not(selected)); selectedIcon.visibleProperty().bind(selected); }
/** * These buttons are showLeftPaneButton and hideLeftPaneButton. These actions button should be shown * only when the view is minimized. * <p> * When the view is minimized, the left pane is hidden and when clicking on the show button, the * content is poped up over the right pane. * <p> */ private void buildNonFloatingLeftActionsButton() { popOverFloatingPane.managedProperty().bind(popOverFloatingPane.visibleProperty()); showLeftPaneButton.managedProperty().bind(showLeftPaneButton.visibleProperty()); hideLeftPaneButton.managedProperty().bind(hideLeftPaneButton.visibleProperty()); IconUtils.setFontIcon("fa-angle-double-right:20", showLeftPaneButton); showLeftPaneButton.getGraphic().getStyleClass().add("grey-ikonli"); showLeftPaneButton.getStyleClass().add("transparent-focus"); showLeftPaneButton.setOnAction(e -> { openLeftPane(); }); IconUtils.setFontIcon("fa-angle-double-left:20", hideLeftPaneButton); hideLeftPaneButton.getGraphic().getStyleClass().add("grey-ikonli"); hideLeftPaneButton.getStyleClass().add("transparent-focus"); hideLeftPaneButton.setOnAction(e -> { closeLeftPane(); }); showLeftPaneButton.visibleProperty().bind(Bindings.not(hideLeftPaneButton.visibleProperty())); }
/** * Constructor */ public SimplePaginationBar() { super(); previousButton.getStyleClass().addAll("simple-pagination-button"); previousButton.setTooltip(new Tooltip("Back")); previousButton.disableProperty().bind(Bindings.not(hasPrevious)); IconUtils.setFontIcon("mdi-chevron-left:24", previousButton); nextButton.getStyleClass().addAll("simple-pagination-button"); nextButton.setTooltip(new Tooltip("Next")); nextButton.disableProperty().bind(Bindings.not(hasNext)); IconUtils.setFontIcon("mdi-chevron-right:24", nextButton); firstButton.getStyleClass().addAll("simple-pagination-button"); IconUtils.setFontIcon("mdi-chevron-double-left:24", firstButton); lastButton.getStyleClass().addAll("simple-pagination-button"); IconUtils.setFontIcon("mdi-chevron-double-right:24", lastButton); lastButton.setTooltip(new Tooltip("Last")); lastButton.disableProperty().bind(Bindings.not(hasNext)); firstButton.setTooltip(new Tooltip("First")); firstButton.disableProperty().bind(Bindings.not(hasPrevious)); // @formatter:off layout.setSpacing(10); layout.getChildren().addAll(rowsPerPageLabel, itemsCount, NodeHelper.horizontalSpacer(), rowsPerPageCombo, previousButton, nextButton); // @formatter:on }
/** * These buttons are showLeftPaneButton and hideLeftPaneButton. These actions button should be shown * only when the view is minimized. * <p> * When the view is minimized, the left pane is hidden and when clicking on the show button, the * content is poped up over the right pane. * <p> */ private void buildNonFloatingLeftActionsButton() { popOverFloatingPane.managedProperty().bind(popOverFloatingPane.visibleProperty()); showLeftPaneButton.managedProperty().bind(showLeftPaneButton.visibleProperty()); hideLeftPaneButton.managedProperty().bind(hideLeftPaneButton.visibleProperty()); IconUtils.setFontIcon("fa-angle-double-right:20", showLeftPaneButton); showLeftPaneButton.getStyleClass().add("ep-button"); showLeftPaneButton.setOnAction(e -> { openLeftPane(); }); IconUtils.setFontIcon("fa-angle-double-left:20", hideLeftPaneButton); hideLeftPaneButton.getStyleClass().add("ep-button"); hideLeftPaneButton.setOnAction(e -> { closeLeftPane(); }); showLeftPaneButton.visibleProperty().bind(Bindings.not(hideLeftPaneButton.visibleProperty())); }
((Button) e.getDisplay()).disableProperty().bind(Bindings.not(tableView.hasSelectedRowProperty())); e.getDisplay().getStyleClass().add("flat-action-button"); group.getChildren().add(e.getDisplay());
private void buildCollpaseExpandIndicator() { final boolean collapsible = blocConfig.booleanPropertyValueOf("collapsible").orElse(true); if (collapsible) { // action on the mouse event on the hbox only addEventFilter(MouseEvent.MOUSE_CLICKED, e -> onCollapseExpand()); buildCollapsedIcon(); buildExpandedcon(); final StackPane wrapper = new StackPane(); collpasedLabel.managedProperty().bind(Bindings.not(expanded)); collpasedLabel.getStyleClass().addAll(FORM_BLOC_TITLE_LABEL_COLLAPSE_ICON, "hand-hover"); collpasedLabel.visibleProperty().bind(collpasedLabel.managedProperty()); expandedLabel.managedProperty().bind(expanded); expandedLabel.getStyleClass().addAll(FORM_BLOC_TITLE_LABEL_COLLAPSE_ICON, "hand-hover"); expandedLabel.visibleProperty().bind(expandedLabel.managedProperty()); expanded.set(true); wrapper.getChildren().add(0, collpasedLabel); wrapper.getChildren().add(0, expandedLabel); wrapper.setStyle("-fx-max-width:28;-fx-min-width:28;"); internalLayout.getChildren().addAll( NodeHelper.horizontalSpacer(),wrapper); } }
deleteButton.disableProperty().bind(Bindings.not(engineInstalledProperty)); deleteButton.setOnMouseClicked(evt -> { try {
allOverWrapper.visibleProperty().bind(Bindings.not(((IModifiableToolbarHolder) toolbarHolder).modifyingProperty())); allOverWrapper.managedProperty().bind(allOverWrapper.visibleProperty());
protected void buildCollpaseExpand() { StackPane wrapper = new StackPane(); FontIcon collpasedLabelicon = new FontIcon("fa-arrow-right:20"); collpasedLabel.setGraphic(collpasedLabelicon); FontIcon expandedLabelicon = new FontIcon("fa-arrow-left:20"); expandedLabel.setGraphic(expandedLabelicon); collpasedLabel.managedProperty().bind(Bindings.not(collpased)); collpasedLabel.visibleProperty().bind(collpasedLabel.managedProperty()); expandedLabel.managedProperty().bind(collpased); expandedLabel.visibleProperty().bind(expandedLabel.managedProperty()); collpased.set(true); wrapper.getChildren().addAll(collpasedLabel, expandedLabel); wrapper.setStyle("-fx-max-width:48;-fx-min-width:48;"); collpasedLabel.addEventFilter(MouseEvent.MOUSE_CLICKED, e -> onCollapseExpand()); expandedLabel.addEventFilter(MouseEvent.MOUSE_CLICKED, e -> onCollapseExpand()); // !! should be las items // child class should handle this rootContainer.getChildren().add(wrapper); }
private void buildNonFloatingRightActionsButton() { popOverFloatingPane.managedProperty().bind(popOverFloatingPane.visibleProperty()); showRightPaneButton.managedProperty().bind(showRightPaneButton.visibleProperty()); hideRightPaneButton.managedProperty().bind(hideRightPaneButton.visibleProperty()); showRightPaneButton.visibleProperty().bind(Bindings.not(hideRightPaneButton.visibleProperty())); IconUtils.setFontIcon("fa-angle-double-left:20", showRightPaneButton); showRightPaneButton.setOnAction(e -> { openRightPane(); }); IconUtils.setFontIcon("fa-angle-double-right:20", hideRightPaneButton); hideRightPaneButton.setOnAction(e -> { closeRightPane(); }); }
maximize.visibleProperty().bind(Bindings.not(maximizeProperty));
/** * Setup of the binding between view model and the UI controls. */ private void setupBinding() { dpStart.valueProperty().bindBidirectional(filterViewModel.dateStart); dpEnd.valueProperty().bindBidirectional(filterViewModel.dateEnd); cbSportType.valueProperty().bindBidirectional(filterViewModel.sportType); cbSportSubtype.valueProperty().bindBidirectional(filterViewModel.sportSubtype); cbIntensity.valueProperty().bindBidirectional(filterViewModel.intensity); cbEquipment.valueProperty().bindBidirectional(filterViewModel.equipment); tfComment.textProperty().bindBidirectional(filterViewModel.commentSubString); cbRegExpression.selectedProperty().bindBidirectional(filterViewModel.regularExpressionMode); rbTypeExercise.setUserData(EntryFilter.EntryType.EXERCISE); rbTypeNote.setUserData(EntryFilter.EntryType.NOTE); rbTypeWeight.setUserData(EntryFilter.EntryType.WEIGHT); BindingUtils.bindToggleGroupToProperty(tgEntryType, filterViewModel.entryType); BooleanBinding entryTypeSelectionDisabled = Bindings.not(filterViewModel.entryTypeSelectable); rbTypeExercise.disableProperty().bind(entryTypeSelectionDisabled); rbTypeNote.disableProperty().bind(entryTypeSelectionDisabled); rbTypeWeight.disableProperty().bind(entryTypeSelectionDisabled); }
editLayout.getDisplay().visibleProperty().bind(Bindings.not(viewLayout.getDisplay().visibleProperty())); getChildren().addAll(viewLayout.getDisplay(), editLayout.getDisplay()); NodeHelper.setHgrow(viewLayout.getDisplay(), editLayout.getDisplay(), this);