@Override public Node build() { leftButton = new JFXButton("Alert"); leftButton.setLayoutX(50); leftButton.setLayoutY(50); return new Group(leftButton); }
@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(); }
pane.setStyle("-fx-background-color:WHITE"); JFXButton button3D = new JFXButton("3D"); button3D.setOnMouseClicked(e -> list.depthProperty().set(++counter % 2)); JFXButton buttonExpand = new JFXButton("EXPAND"); buttonExpand.setOnMouseClicked(e -> { list.depthProperty().set(1); }); JFXButton buttonCollapse = new JFXButton("COLLAPSE"); buttonCollapse.setOnMouseClicked(e -> { list.depthProperty().set(1);
@Override public void start(Stage stage) { FlowPane content = new FlowPane(); JFXButton leftButton = new JFXButton(LEFT); JFXButton topButton = new JFXButton(TOP); JFXButton rightButton = new JFXButton(RIGHT); JFXButton bottomButton = new JFXButton(BOTTOM); content.getChildren().addAll(leftButton, topButton, rightButton, bottomButton); content.setMaxSize(200, 200); StackPane leftDrawerPane = new StackPane(); leftDrawerPane.getStyleClass().add("red-400"); leftDrawerPane.getChildren().add(new JFXButton("Left Content")); leftDrawer.setSidePane(leftDrawerPane); leftDrawer.setDefaultDrawerSize(150); StackPane bottomDrawerPane = new StackPane(); bottomDrawerPane.getStyleClass().add("deep-purple-400"); bottomDrawerPane.getChildren().add(new JFXButton("Bottom Content")); bottomDrawer.setDefaultDrawerSize(150); bottomDrawer.setDirection(DrawerDirection.BOTTOM); StackPane rightDrawerPane = new StackPane(); rightDrawerPane.getStyleClass().add("blue-400"); rightDrawerPane.getChildren().add(new JFXButton("Right Content")); rightDrawer.setDirection(DrawerDirection.RIGHT); rightDrawer.setDefaultDrawerSize(150); StackPane topDrawerPane = new StackPane(); topDrawerPane.getStyleClass().add("green-400");
Color.WHITE); close.setSize(12, 12); btnFull = new JFXButton(); btnFull.getStyleClass().add("jfx-decorator-button"); btnFull.setCursor(Cursor.HAND); btnFull.setRipplerFill(Color.WHITE); btnClose = new JFXButton(); btnClose.getStyleClass().add("jfx-decorator-button"); btnClose.setCursor(Cursor.HAND); btnClose.setRipplerFill(Color.WHITE); btnMin = new JFXButton(); btnMin.getStyleClass().add("jfx-decorator-button"); btnMin.setCursor(Cursor.HAND); btnMin.setRipplerFill(Color.WHITE); btnMax = new JFXButton(); btnMax.getStyleClass().add("jfx-decorator-button"); btnMax.setCursor(Cursor.HAND);
@Override public void start(Stage stage) { JFXButton ssbutton1 = new JFXButton(); Label sslabel = new Label("R1"); sslabel.setStyle(FX_TEXT_FILL_WHITE); JFXButton ssbutton2 = new JFXButton("R2"); ssbutton2.setTooltip(new Tooltip("Button R2")); ssbutton2.setButtonType(ButtonType.RAISED); ssbutton2.getStyleClass().addAll(ANIMATED_OPTION_BUTTON, ANIMATED_OPTION_SUB_BUTTON2); JFXButton ssbutton3 = new JFXButton("R3"); ssbutton3.setButtonType(ButtonType.RAISED); ssbutton3.getStyleClass().addAll(ANIMATED_OPTION_BUTTON, ANIMATED_OPTION_SUB_BUTTON2); JFXButton sbutton1 = new JFXButton(); Label slabel = new Label("B1"); slabel.setStyle(FX_TEXT_FILL_WHITE); JFXButton sbutton2 = new JFXButton("B2"); sbutton2.setTooltip(new Tooltip("Button B2")); sbutton2.setButtonType(ButtonType.RAISED); sbutton2.getStyleClass().addAll(ANIMATED_OPTION_BUTTON, ANIMATED_OPTION_SUB_BUTTON); JFXButton sbutton3 = new JFXButton("B3"); sbutton3.setButtonType(ButtonType.RAISED); sbutton3.getStyleClass().addAll(ANIMATED_OPTION_BUTTON, ANIMATED_OPTION_SUB_BUTTON); JFXButton button1 = new JFXButton(); Label label = new Label("G1");
public JFXDefaultChip(JFXChipView<T> view, T item) { super(view, item); JFXButton closeButton = new JFXButton(null, new SVGGlyph()); closeButton.getStyleClass().add("close-button"); closeButton.setOnAction((event) -> view.getChips().remove(item)); String tagString = null; if (getItem() instanceof String) { tagString = (String) getItem(); } else { tagString = view.getConverter().toString(getItem()); } Label label = new Label(tagString); label.setWrapText(true); root = new HBox(label, closeButton); getChildren().setAll(root); label.setMaxWidth(100); } }
private Button createIconButton(SVGGlyph glyph) { JFXButton button = new JFXButton(null, glyph); button.setPrefSize(30,30); button.setMinSize(30,30);
JFXButton groupButton = new JFXButton("Group"); groupButton.setOnAction((action) -> new Thread(() -> treeView.group(empColumn)).start()); main.getChildren().add(groupButton); JFXButton unGroupButton = new JFXButton("unGroup"); unGroupButton.setOnAction((action) -> treeView.unGroup(empColumn)); main.getChildren().add(unGroupButton);
selectionModel.select(1); JFXButton button = new JFXButton("New Tab"); button.setOnMouseClicked((o) -> { Tab temp = new Tab();
pane.setContent(container); JFXButton button = new JFXButton(""); SVGGlyph arrow = new SVGGlyph(0, "FULLSCREEN",
} else { if (count % 4 == 0) { JFXButton button = new JFXButton("CLOSE"); button.setOnAction(action -> snackbar.close()); snackbar.fireEvent(new SnackbarEvent(
rightChevron.setSize(6, 11); backMonthButton = new JFXButton(); backMonthButton.setMinSize(40, 40); backMonthButton.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT, backMonthButton.setOnAction(t -> forward(-1, MONTHS, false, true)); forwardMonthButton = new JFXButton(); forwardMonthButton.setMinSize(40, 40); forwardMonthButton.setBackground(new Background(new BackgroundFill(Color.TRANSPARENT,
action = new JFXButton(); action.setText(actionText); action.setOnAction(actionHandler);
JFXButton button = new JFXButton(""); button.setButtonType(ButtonType.RAISED); button.setStyle("-fx-background-radius: 40;-fx-background-color: " + getDefaultColor((int) ((Math.random() * 12) % 12)));
+ " aliqua. Utenim ad minim veniam, quis nostrud exercitation" + " ullamco laboris nisi ut aliquip ex ea commodo consequat.")); JFXButton closeButton = new JFXButton("ACCEPT"); closeButton.getStyleClass().add("dialog-accept"); closeButton.setOnAction(event -> alert.hideWithAnimation());
tabLabel.getStyleClass().setAll("tab-label"); closeButton = new JFXButton(null, new SVGGlyph()); closeButton.getStyleClass().add("tab-close-button"); closeButton.setOnAction(action->{
/** * Constructor */ public SimpleButton() { super(); button = new JFXButton(); button.addEventFilter(ActionEvent.ACTION, this::handle); button.setCursor(Cursor.HAND); button.getStyleClass().removeAll("button"); button.getStyleClass().add("ep-button"); }
public JFXDefaultChip(JFXChipView<T> view, T item) { super(view, item); JFXButton closeButton = new JFXButton(null, new SVGGlyph()); closeButton.getStyleClass().add("close-button"); closeButton.setOnAction((event) -> view.getChips().remove(item)); String tagString = null; if (getItem() instanceof String) { tagString = (String) getItem(); } else { tagString = view.getConverter().toString(getItem()); } Label label = new Label(tagString); label.setWrapText(true); root = new HBox(label, closeButton); getChildren().setAll(root); label.setMaxWidth(100); } }
protected ButtonBase build(VLViewComponentXML configuration) { if ("button".equals(type)) { Button buttonAction = new JFXButton(); buttonAction.getStyleClass().remove(0); buttonAction.getStyleClass().removeAll("jfx-button", "button"); buttonAction.managedProperty().bind(buttonAction.visibleProperty()); NodeHelper.setTitle(buttonAction, configuration, controller); IconUtils.setIcon(buttonAction, configuration); NodeHelper.setStyleClass(buttonAction, configuration, "styleClass", true); buttonAction.getStyleClass().add("ep-button"); String displayMode = configuration.getPropertyValue(XMLConstants.HYPERLINK_DISPLAY_MODE, "LEFT"); buttonAction.setContentDisplay(ContentDisplay.valueOf(displayMode)); boolean readOnly = configuration.getBooleanProperty("readOnly", false); buttonAction.setDisable(readOnly); buttonAction.addEventFilter(ActionEvent.ACTION, e -> onAction(buttonAction)); return buttonAction; } else { Hyperlink hyperlinkAction = new Hyperlink(); hyperlinkAction.managedProperty().bind(hyperlinkAction.visibleProperty()); NodeHelper.setTitle(hyperlinkAction, configuration, controller); NodeHelper.setStyleClass(hyperlinkAction, configuration, "styleClass", true); IconUtils.setIcon(hyperlinkAction, configuration); boolean readOnly = configuration.getBooleanProperty("readOnly", false); hyperlinkAction.setDisable(readOnly); hyperlinkAction.addEventFilter(ActionEvent.ACTION, e -> onAction(hyperlinkAction)); return hyperlinkAction; } }