• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DialogTransition类的典型用法和代码示例

java 2次浏览

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

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

示例1: WizardDialog

点赞 2

import com.jfoenix.controls.JFXDialog.DialogTransition; //导入依赖的package包/类
/**
 * Wizard dialog constructor
 *
 * @param root
 *            the root component from which the wizard will appear. Use a
 *            {@link StackPane}
 */
public WizardDialog(final String name, final StackPane root)
{
    this.stepper = new WizardStepper(this);
    this.steps = Lists.newArrayList();
    this.region = new BorderPane();
    this.dialog = new JFXDialog(root, this.region, DialogTransition.CENTER);
    this.title = name;
    this.initWizard();
}
 

开发者ID:Leviathan-Studio,
项目名称:MineIDE,
代码行数:17,
代码来源:WizardDialog.java

示例2: init

点赞 2

import com.jfoenix.controls.JFXDialog.DialogTransition; //导入依赖的package包/类
/**
 * 只允许三种修改操作:
 * 1. 激活或取消激活某一行
 * 2. 删除一行
 * 3. 添加一行
 */
@PostConstruct
public void init() {
    this.profile.setText(this.title);
    //TODO 行可以放Label,label可以设置Graphic
    SVGGlyph restGlyph = GlyphSet.getGlyph("download", Color.WHITE);
    restGlyph.setSize(20, 20);

    backup.setGraphic(restGlyph);
    SVGGlyph saveGlyph = GlyphSet.getGlyph("save", Color.WHITE);
    saveGlyph.setSize(20, 20);
    save.setGraphic(saveGlyph);
    SVGGlyph labelGlyph = GlyphSet.getGlyph("test", Color.BLACK);
    labelGlyph.setSize(20, 20);
    dialogLabel.setText("");
    dialogLabel.setGraphic(labelGlyph);
    setupEditableTableView();
    save.setOnMouseClicked((e) -> {
        //获取当前列表中的元素并提交保存
        Map<String, Host> hostMap = new HashMap<>();
        for (int i = 0; i < Integer.parseInt(StringUtils.substringBetween(hostsCount.getText(), PREFIX, POSTFIX)); i++) {
            FXHost fxHost = hostDomainName.getTreeTableView().getTreeItem(i).getValue();
            Host host = new Host();
            host.setEnable(fxHost.enable.getValue());
            host.setIpAddress(fxHost.ipAddress.getValue());
            host.setDomainName(fxHost.domainName.getValue());
            hostMap.put(fxHost.getId(),host);
        }
        this.fileService.writeToHostFile(hostMap);
        dialog.setTransitionType(DialogTransition.TOP);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });
    backup.setOnMouseClicked((e) -> {
        fileService.backupHostsFile();
        dialog.setTransitionType(DialogTransition.TOP);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });
    acceptButton.setOnMouseClicked((e) -> dialog.close());
}
 

开发者ID:b3log,
项目名称:JHosts,
代码行数:45,
代码来源:HostController.java

示例3: init

点赞 2

import com.jfoenix.controls.JFXDialog.DialogTransition; //导入依赖的package包/类
/**
 * init fxml when loaded.
 */
@PostConstruct
public void init() {
    root.getChildren().remove(dialog);

    centerButton.setOnMouseClicked((e) -> {
        dialog.setTransitionType(DialogTransition.CENTER);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });

    topButton.setOnMouseClicked((e) -> {
        dialog.setTransitionType(DialogTransition.TOP);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });

    rightButton.setOnMouseClicked((e) -> {
        dialog.setTransitionType(DialogTransition.RIGHT);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });

    bottomButton.setOnMouseClicked((e) -> {
        dialog.setTransitionType(DialogTransition.BOTTOM);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });

    leftButton.setOnMouseClicked((e) -> {
        dialog.setTransitionType(DialogTransition.LEFT);
        dialog.show((StackPane) context.getRegisteredObject(CONTENT_PANE));
    });

    acceptButton.setOnMouseClicked((e) -> dialog.close());
}
 

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

示例4: convert

点赞 2

import com.jfoenix.controls.JFXDialog.DialogTransition; //导入依赖的package包/类
@Override
public DialogTransition convert(ParsedValue<String, DialogTransition> value, Font not_used) {
    String string = value.getValue();
    try {
        return DialogTransition.valueOf(string);
    } catch (IllegalArgumentException | NullPointerException exception) {
        return DialogTransition.CENTER;
    }
}
 

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

示例5: showDialog

点赞 2

import com.jfoenix.controls.JFXDialog.DialogTransition; //导入依赖的package包/类
@Override
public void showDialog(DialogType dialogType, String title, String message, List<Item> items) {
	JFXDialogLayout content = new JFXDialogLayout();
	content.setHeading(new Text(title));
	content.setBody(new Text(message));
	JFXDialog dialog = new JFXDialog(mainWindow, content, DialogTransition.CENTER, true);
	dialog.setLayoutX(mainWindow.getWidth()/2);
	dialog.setLayoutY(mainWindow.getHeight()/2);
	
	dialog.show(mainWindow);
}
 

开发者ID:ntenhoeve,
项目名称:Introspect-Framework,
代码行数:12,
代码来源:RfxUserinterfaceController.java

示例6: getInstance

点赞 2

import com.jfoenix.controls.JFXDialog.DialogTransition; //导入依赖的package包/类
public static StyleConverter<String, DialogTransition> getInstance() {
    return Holder.INSTANCE;
}
 

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


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)