当前位置: 首页>>代码示例>>Java>>正文


Java JFXToggleButton类代码示例

本文整理汇总了Java中com.jfoenix.controls.JFXToggleButton的典型用法代码示例。如果您正苦于以下问题:Java JFXToggleButton类的具体用法?Java JFXToggleButton怎么用?Java JFXToggleButton使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JFXToggleButton类属于com.jfoenix.controls包,在下文中一共展示了JFXToggleButton类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
@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();
    final GlyphIcon heartIcon = GlyphsBuilder.create(FontAwesomeIconView.class)
        .glyph(FontAwesomeIcon.HEART)
        .build();
    heartIcon.setStyle("-fx-padding: 10");
    node.setGraphic(heartIcon);

    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();


}
 
开发者ID:jfoenixadmin,项目名称:JFoenix,代码行数:35,代码来源:ToggleButtonDemo.java

示例2: updateToggleTransition

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
private void updateToggleTransition() {
    transition = new Timeline(
        new KeyFrame(
            Duration.ZERO,
            new KeyValue(circleContainer.translateXProperty(),
                -(line.getLayoutBounds().getWidth() / 2) + circleRadius,
                Interpolator.EASE_BOTH),
            new KeyValue(line.strokeProperty(),
                ((JFXToggleButton) getSkinnable()).getUnToggleLineColor(),
                Interpolator.EASE_BOTH),
            new KeyValue(circle.fillProperty(),
                ((JFXToggleButton) getSkinnable()).getUnToggleColor(),
                Interpolator.EASE_BOTH)
        ),
        new KeyFrame(
            Duration.millis(100),
            new KeyValue(circleContainer.translateXProperty(),
                (line.getLayoutBounds().getWidth() / 2) - circleRadius,
                Interpolator.EASE_BOTH),
            new KeyValue(line.strokeProperty(),
                ((JFXToggleButton) getSkinnable()).getToggleLineColor(),
                Interpolator.EASE_BOTH),
            new KeyValue(circle.fillProperty(),
                ((JFXToggleButton) getSkinnable()).getToggleColor(),
                Interpolator.EASE_BOTH)
        )

    );
}
 
开发者ID:jfoenixadmin,项目名称:JFoenix,代码行数:30,代码来源:JFXToggleButtonSkin.java

示例3: flipToggleAction

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
@FXML
protected void flipToggleAction(ActionEvent ev)
{
    flipActive = ((JFXToggleButton)ev.getSource()).isSelected();
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:6,代码来源:Controller.java

示例4: renderMainAction

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
@FXML
protected void renderMainAction(ActionEvent e) {
    renderMainActive = ((JFXToggleButton)e.getSource()).isSelected();
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:5,代码来源:Controller.java

示例5: renderAlphaAction

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
@FXML
protected void renderAlphaAction(ActionEvent e) {
    renderAlphaActive = ((JFXToggleButton)e.getSource()).isSelected();
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:5,代码来源:Controller.java

示例6: renderBetaAction

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
@FXML
protected void renderBetaAction(ActionEvent e) {
    renderBetaActive = ((JFXToggleButton)e.getSource()).isSelected();
}
 
开发者ID:Plasmoxy,项目名称:AquamarineLake,代码行数:5,代码来源:Controller.java

示例7: getOrientation

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
/**
 * @return the orientation
 */
public JFXToggleButton getOrientation() {
	return orientation;
}
 
开发者ID:goxr3plus,项目名称:XR3Capture,代码行数:7,代码来源:SettingsWindowController.java

示例8: setOrientation

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
/**
 * @param orientation the orientation to set
 */
public void setOrientation(JFXToggleButton orientation) {
	this.orientation = orientation;
}
 
开发者ID:goxr3plus,项目名称:XR3Capture,代码行数:7,代码来源:SettingsWindowController.java

示例9: setMarryttsToggle

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
/**
 * @param marryttsToggle the marryttsToggle to set
 */
public void setMarryttsToggle(JFXToggleButton marryttsToggle) {
	this.marryttsToggle = marryttsToggle;
}
 
开发者ID:goxr3plus,项目名称:XR3Capture,代码行数:7,代码来源:SettingsWindowController.java

示例10: setStylesheet

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
public void setStylesheet(JFXToggleButton b, String cssFile) {
	b.getStylesheets().clear();
	b.getStylesheets().add(getClass().getResource(cssFile).toExternalForm());
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:5,代码来源:MainScene.java

示例11: updateCircle

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
private void updateCircle() {
    circle.setFill(getSkinnable().isSelected() ? ((JFXToggleButton) getSkinnable()).getToggleColor() : ((JFXToggleButton) getSkinnable())
        .getUnToggleColor());
}
 
开发者ID:jfoenixadmin,项目名称:JFoenix,代码行数:5,代码来源:JFXToggleButtonSkin.java

示例12: updateLine

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
private void updateLine() {
    line.setStroke(getSkinnable().isSelected() ? ((JFXToggleButton) getSkinnable()).getToggleLineColor() : ((JFXToggleButton) getSkinnable())
        .getUnToggleLineColor());

}
 
开发者ID:jfoenixadmin,项目名称:JFoenix,代码行数:6,代码来源:JFXToggleButtonSkin.java

示例13: getMarryTTSToggle

import com.jfoenix.controls.JFXToggleButton; //导入依赖的package包/类
/**
 * Gets the marry TTS toggle.
 *
 * @return The toggle which is for enabling/disabling text to speech
 *         recognition
 */
public JFXToggleButton getMarryTTSToggle() {
	return marryttsToggle;
}
 
开发者ID:goxr3plus,项目名称:XR3Capture,代码行数:10,代码来源:SettingsWindowController.java


注:本文中的com.jfoenix.controls.JFXToggleButton类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。