Search in sources :

Example 1 with JFXToggleButton

use of com.jfoenix.controls.JFXToggleButton in project jphp by jphp-compiler.

the class UXMaterialToggleButton method __construct.

@Override
@Reflection.Signature
public void __construct(String text) {
    __wrappedObject = new JFXToggleButton();
    getWrappedObject().setText(text);
}
Also used : JFXToggleButton(com.jfoenix.controls.JFXToggleButton)

Example 2 with JFXToggleButton

use of com.jfoenix.controls.JFXToggleButton in project JFoenix by jfoenixadmin.

the class ToggleButtonDemo method start.

@Override
public void start(Stage stage) throws Exception {
    final VBox pane = new VBox();
    pane.setSpacing(30);
    pane.setStyle("-fx-background-color:#EEE; -fx-padding: 40;");
    ToggleButton button = new ToggleButton("JavaFx Toggle");
    pane.getChildren().add(button);
    JFXToggleButton toggleButton = new JFXToggleButton();
    toggleButton.setText("New Skin");
    pane.getChildren().add(toggleButton);
    JFXToggleNode node = new JFXToggleNode();
    node.setStyle("-fx-padding: 10");
    node.setGraphic(new FontIcon(FontAwesomeSolid.HEART));
    pane.getChildren().add(node);
    final Scene scene = new Scene(pane, 600, 400, Color.valueOf("#EEE"));
    stage.setTitle("JFX Toggle Button Demo ");
    scene.getStylesheets().add(ToggleButtonDemo.class.getResource("/css/jfoenix-components.css").toExternalForm());
    stage.setScene(scene);
    stage.setResizable(false);
    stage.show();
}
Also used : ToggleButton(javafx.scene.control.ToggleButton) JFXToggleButton(com.jfoenix.controls.JFXToggleButton) JFXToggleButton(com.jfoenix.controls.JFXToggleButton) JFXToggleNode(com.jfoenix.controls.JFXToggleNode) FontIcon(org.kordamp.ikonli.javafx.FontIcon) Scene(javafx.scene.Scene) VBox(javafx.scene.layout.VBox)

Aggregations

JFXToggleButton (com.jfoenix.controls.JFXToggleButton)2 JFXToggleNode (com.jfoenix.controls.JFXToggleNode)1 Scene (javafx.scene.Scene)1 ToggleButton (javafx.scene.control.ToggleButton)1 VBox (javafx.scene.layout.VBox)1 FontIcon (org.kordamp.ikonli.javafx.FontIcon)1