@Override protected Node createUndecoratedEditor() { final CheckBox cbNull = new CheckBox(); final Node wrappedCb = ItemUtil.lockDecorator(cbNull, document, ItemUtil.DATABASE_RELATION_TOOLTIP); final Label label = new Label(IMPLEMENTATION_TITLE); final ChoiceBox<ImplementAs> cbImpl = new ChoiceBox<>( observableArrayList(ImplementAs.values()) ); cbImpl.setTooltip(new Tooltip(IMPLEMENTATION_TOOLTIP)); final HBox right = new HBox(label, cbImpl); final HBox left = new HBox(wrappedCb, right); left.setSpacing(16); right.setSpacing(8); right.setAlignment(Pos.CENTER); cbNull.selectedProperty().bindBidirectional(nullable); cbImpl.valueProperty().bindBidirectional(implementation); right.visibleProperty().bind(nullable); right.disableProperty().bind(nullable.not()); return left; }
errorContainer.visibleProperty().addListener((o, oldVal, newVal) -> {
public TableControlWidget<T> hide() { target.visibleProperty().set(false); return this; }
private void buildFilterToolbar() { filtersToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 16 16 16 64;" + "-fx-spacing:16;" + "-fx-border-color: -grey-color-300;" + "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 48;"); getChildren().add(filtersToolbar); NodeHelper.setHgrow(filtersToolbar); filtersToolbar.managedProperty().bind(filtersToolbar.visibleProperty()); final Hyperlink filterToolBarButton = new Hyperlink(); defaultToolbar.getChildren().add(filterToolBarButton); filterToolBarButton.setOnAction(e -> { filtersToolbar.visibleProperty().set(!filtersToolbar.visibleProperty().get()); }); filtersToolbar.setVisible(false); }
@Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { this.controller = (AbstractViewController) controller; if (configuration != null) { Optional<VLViewComponentXML> footer = configuration.getComponentById("Footer"); if (footer.isPresent()) { componentXML = footer.get(); List<IBuildable> buildables = ComponentUtils.resolveAndGenerate(this.controller, componentXML.getSubcomponents()); if (buildables.size() > 0) { display = new HBox(); display.managedProperty().bind(display.visibleProperty()); for(IBuildable e: buildables) { display.getChildren().add(e.getDisplay()); } NodeHelper.styleClassAddAll(display, componentXML, "styleClass", "ep-bloc-footer"); } } } }
/** * Build the modify button. */ private void buildModifyButton() { modifyButton.getStyleClass().addAll("table-toolbar-action", "ep-button"); modifyButton.setOnAction(e -> modifyClicked(controller)); modifyButton.setText(controller.getGLocalised("EDIT_LABEL").toUpperCase()); IconUtils.setFontIcon("gmi-more-horiz:18", modifyButton); allOverWrapper.getChildren().add(modifyButton); if (selectable.get()) { //thickButton.setOnAction(e -> thickClicked()); //modifyingActionsWrapper.getChildren().add(0, thickButton); } NodeHelper.setHgrow(modifyingActionsWrapper); modifyingActionsWrapper.visibleProperty().bind(((IModifiableToolbarHolder) toolbarHolder).modifyingProperty()); modifyingActionsWrapper.managedProperty().bind(modifyingActionsWrapper.visibleProperty()); rootContainer.getChildren().add(modifyingActionsWrapper); }
@Override public void initialize(URL location, ResourceBundle resources) { check("optInline", optInline); check("optFile", optFile); check("optUrl", optUrl); check("hboxInline", hboxInline); check("hboxFile", hboxFile); check("hboxUrl", hboxUrl); check("txtInline", txtInline); check("txtFile", txtFile); check("txtUrl", txtUrl); check("butFile", butFile); hboxInline.visibleProperty().bind(optInline.selectedProperty()); hboxFile.visibleProperty().bind(optFile.selectedProperty()); hboxUrl.visibleProperty().bind(optUrl.selectedProperty()); }
/** * Constructor */ public STVTopToolbar(AbstractViewController controller, VLViewComponentXML tableConfiguration) { super(); this.controller = controller; this.tableConfiguration = tableConfiguration; modifyingToolbar.managedProperty().bind(modifyingToolbar.visibleProperty()); defaultToolbar.managedProperty().bind(defaultToolbar.visibleProperty()); NodeHelper.setHgrow(modifyingToolbar); NodeHelper.setHgrow(defaultToolbar); defaultToolbar.setVisible(true); modifyingToolbar.setVisible(false); defaultToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 8 16 16 16;" + "-fx-spacing: 16;" + "-fx-border-color: -grey-color-300;" + "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 64;"); modifyingToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment: CENTER;" + "-fx-padding: 16;" + "-fx-spacing: 16;" + "-fx-border-color: -border-color;" + "-fx-border-width: 0.25 0 0 0;" + "-fx-pref-height: 64;"); }
private void buildSearchFilter() { searchToolbar.setStyle("-fx-background-color: white;" + "-fx-alignment:CENTER_LEFT;" + "-fx-padding: 8 16 8 64;" + "-fx-spacing:16;" + "-fx-border-color: -grey-color-300;" + "-fx-border-width: 0 0 1 0;" + "-fx-pref-height: 48;"); getChildren().addAll(searchToolbar); NodeHelper.setHgrow(searchToolbar); searchToolbar.managedProperty().bind(searchToolbar.visibleProperty()); final CustomTextField customTextField = new CustomTextField(); customTextField.setPrefWidth(350); final Button searchIconRight = new Button("Go"); searchIconRight.setFocusTraversable(false); searchIconRight.setOnAction(e -> { Method method = null; try { method = controller.getClass().getMethod("runSearch", Event.class); method.invoke(controller, e); } catch (final Exception e1) { e1.printStackTrace(); } }); final Hyperlink searchToolBarButton = new Hyperlink(); defaultToolbar.getChildren().add(searchToolBarButton); searchToolBarButton.setOnAction(e -> { searchToolbar.visibleProperty().set(!searchToolbar.visibleProperty().get()); }); searchToolbar.getChildren().addAll(NodeHelper.horizontalSpacer(), customTextField, searchIconRight, NodeHelper.horizontalSpacer()); searchToolbar.setVisible(false); }
@Override public void initialize() { LOG.debug("New tweet stage ready."); enableTweetLengthCheck(); Buttons.setOnClick(sendButton, this::send); Buttons.setOnClick(pickMediaButton, this::openMediaAttachmentsFilePicker); final BooleanBinding mediasNotEmpty = mediasToUpload.emptyProperty().not(); mediaPreviewBox.visibleProperty().bind(mediasNotEmpty); mediaPreviewBox.managedProperty().bind(mediasNotEmpty); inReplyStatus.addListener((o, prev, cur) -> prefillMentionsForReply()); sendOnControlEnter(); }
/** * @{inheritedDoc} */ @Override public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); layout.managedProperty().bind(layout.visibleProperty()); String position = configuration.getPropertyValue("position", "right"); if ("right".equals(position)) { layout.getChildren().add(2, NodeHelper.horizontalSpacer()); } else if ("left".equals(position)) { layout.getChildren().add(NodeHelper.horizontalSpacer()); } // center default else { layout.getChildren().add(2, NodeHelper.horizontalSpacer()); layout.getChildren().add(NodeHelper.horizontalSpacer()); } NodeHelper.styleClassSetAll(layout, configuration, "loadMoreLayoutStyleClass", "loadmore-pagination-bar"); NodeHelper.styleClassSetAll(nextButton, configuration, "loadMoreButtonStyleClass", "load-more-pagination-button"); NodeHelper.styleClassSetAll(previousButton, configuration, "loadLessButtonStyleClass", "load-more-pagination-button"); nextButton.setOnAction(e -> { direction = Direction.NEXT; pageable.nextPage(model); }); previousButton.setOnAction(e -> { direction = Direction.PREVIOUS; pageable.loadLess(model); }); }
public void buildFrom(IEmaginController controller, VLViewComponentXML configuration) { super.buildFrom(controller, configuration); layout.managedProperty().bind(layout.visibleProperty());
super.process(); headerBottomSectionHbox.managedProperty().bind(headerBottomSectionHbox.visibleProperty()); headerTopSectionHbox.managedProperty().bind(headerTopSectionHbox.visibleProperty());
allOverWrapper.visibleProperty().bind(Bindings.not(((IModifiableToolbarHolder) toolbarHolder).modifyingProperty())); allOverWrapper.managedProperty().bind(allOverWrapper.visibleProperty());
/** * Constructor */ public SingleLocationPrimaryMenuWithNavigationBar() { super(); IconUtils.setHeaderNavigationBack(backIcon); backIcon.setOnAction(e -> goBack()); backIcon.getStyleClass().remove("jfx-button"); backIcon.getStyleClass().remove("button"); backIcon.managedProperty().bind(backIcon.visibleProperty()); backIcon.setVisible(false); final HBox box = NodeHelper.wrapInHbox(backIcon); box.getStyleClass().add("ep-navbar-top-toolbar-back-icon-container"); topToolbar.getChildren().addAll(box, locationContainer); getChildren().addAll(topToolbar, bottomToolbar); topToolbar.getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar"); bottomToolbar.getStyleClass().add("ep-primary-menu-with-navbar-bottom-toolbar"); getStyleClass().add("ep-primary-menu-with-navbar-toolbar"); // location0.getStyleClass().add("current-location-item-label"); topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty()); topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty()); topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty()); bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty()); bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty()); bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty()); bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty()); NodeHelper.setHVGrow(topToolbar, bottomToolbar, this); bottomToolbar.setVisible(false); }
/** * Constructor */ public PrimaryMenuWithNavigationBar() { super(); IconUtils.setHeaderNavigationBack(backIcon); backIcon.setOnAction(e -> goBack()); backIcon.getStyleClass().addAll("app-header-button", "hand-hover"); backIcon.managedProperty().bind(backIcon.visibleProperty()); // TO DO HANDLE PREVIOUS AND CURRENT previousLocation.managedProperty().bind(previousLocation.visibleProperty()); previousLocation.setVisible(false); topToolbar.getChildren().addAll(backIcon, currentLocation); bottomToolbar.getChildren().add(previousLocation); getChildren().addAll(topToolbar, bottomToolbar); topToolbar.getStyleClass().add("ep-primary-menu-with-navbar-top-toolbar"); bottomToolbar.getStyleClass().add("ep-primary-menu-with-navbar-bottom-toolbar"); getStyleClass().add("ep-primary-menu-with-navbar-toolbar"); topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty()); // topToolbar.maxWidthProperty().bind(topToolbar.prefWidthProperty()); topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty()); topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty()); bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty()); // bottomToolbar.maxWidthProperty().bind(bottomToolbar.prefWidthProperty()); bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty()); bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty()); bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty()); NodeHelper.setHVGrow(topToolbar, bottomToolbar, this); bottomToolbar.setVisible(false); }
@Override protected Node createUndecoratedEditor() { final CheckBox cbNull = new CheckBox(); final Node wrappedCb = ItemUtil.lockDecorator(cbNull, document, ItemUtil.DATABASE_RELATION_TOOLTIP); final Label label = new Label(IMPLEMENTATION_TITLE); final ChoiceBox<ImplementAs> cbImpl = new ChoiceBox<>( observableArrayList(ImplementAs.values()) ); cbImpl.setTooltip(new Tooltip(IMPLEMENTATION_TOOLTIP)); final HBox right = new HBox(label, cbImpl); final HBox left = new HBox(wrappedCb, right); left.setSpacing(16); right.setSpacing(8); right.setAlignment(Pos.CENTER); cbNull.selectedProperty().bindBidirectional(nullable); cbImpl.valueProperty().bindBidirectional(implementation); right.visibleProperty().bind(nullable); right.disableProperty().bind(nullable.not()); return left; }
@Override public void initialize() { currentViewButton.addListener((o, prev, current) -> { if (prev != null) { prev.setDisable(false); prev.setOpacity(1.0); } current.setDisable(true); current.setOpacity(0.5); }); setUpTweetButton(); bindActionImageToLoadingView(timeline, TIMELINE); bindActionImageToLoadingView(mentions, MENTIONS); bindActionImageToLoadingView(directMessages, DIRECT_MESSAGES); credits.setOnMouseClicked(e -> openCreditsView()); sessionManager.isLoggedInProperty().addListener((o, prev, cur) -> handleLogStatusChange(prev, cur)); handleLogStatusChange(false, sessionManager.isLoggedInProperty().getValue()); loadCurrentAccountPanel(); update.managedProperty().bind(updateService.isUpdateAvailableProperty()); update.visibleProperty().bind(updateService.isUpdateAvailableProperty()); update.setOnMouseClicked(e -> openUpdatesScreen()); }
errorContainer.visibleProperty().addListener((o, oldVal, newVal) -> {
/** * Constructor */ public HeaderCenterToolBar() { super(); minWidthProperty().bind(prefWidthProperty()); maxWidthProperty().bind(prefWidthProperty()); getChildren().addAll(topToolbar, bottomToolbar); NodeHelper.setVgrow(topToolbar, bottomToolbar); topToolbar.minWidthProperty().bind(topToolbar.prefWidthProperty()); topToolbar.maxWidthProperty().bind(topToolbar.prefWidthProperty()); topToolbar.minHeightProperty().bind(topToolbar.prefHeightProperty()); topToolbar.maxHeightProperty().bind(topToolbar.prefHeightProperty()); bottomToolbar.minWidthProperty().bind(bottomToolbar.prefWidthProperty()); bottomToolbar.maxWidthProperty().bind(bottomToolbar.prefWidthProperty()); bottomToolbar.minHeightProperty().bind(bottomToolbar.prefHeightProperty()); bottomToolbar.maxHeightProperty().bind(bottomToolbar.prefHeightProperty()); bottomToolbar.managedProperty().bind(bottomToolbar.visibleProperty()); bottomToolbar.setVisible(false); }