FxMediaTags.java 文件源码

java
阅读 31 收藏 0 点赞 0 评论 0

项目:fx-media-tags 作者:
public FxMediaTags() {
    getDialogPane().getButtonTypes().addAll(ButtonType.OK, ButtonType.CANCEL);
    getDialogPane().setContent(createForm());
    getDialogPane().setPrefWidth(RESOLUTION.getWidth() / 4);
    getDialogPane().setPrefHeight(RESOLUTION.getHeight());
    setResultConverter(createResultConverter());
    //
    titleProperty().bind(MODEL.dialogTitleProperty());
    //
    TAGS_TABLE.setItems(new SortedList<>(MODEL.tagsProperty(), (a,b) -> a.compareTo(b)));
    TAGS_TABLE.setContextMenu(createContextMenu());
    TAGS_TABLE.setOnMousePressed(event -> {
        if (event.isPrimaryButtonDown() && event.getClickCount() == 2) {
            final Button okButton = ((Button)getDialogPane().lookupButton(ButtonType.OK));
            if (null != okButton) {
                okButton.fire();
            }
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号