BasicEntityEditor.java 文件源码

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

项目:myWMS 作者:
protected PopupWindow createPopup() {
    ListView<BODTO<T>> listView = new ListView<>();
    listView.getStyleClass().addAll("combo-box-popup");
    listView.setItems(completionItems);
    listView.cellFactoryProperty().bind(control.cellFactoryProperty());
    listView.setOnKeyReleased(e -> { 
        if (e.getCode() == KeyCode.ENTER ) { select(listView); e.consume(); }
        if (e.getCode() == KeyCode.ESCAPE ) { hidePopup(); e.consume(); }
    });

    listView.setOnMouseClicked(e -> { if (e.getClickCount() == 1) select(listView); e.consume();});

    Popup popup = new Popup();
    control.showPopup.bind(popup.showingProperty());
    popup.getContent().add(listView);
    textInput.updateValue("");
    return popup;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号