Edit right click pop up on appointment JFXtras

时间:2019-01-15 18:19:20

标签: java javafx jfxtras

i want to edit this pop up that appears when i perform right click on appointment, so that i can add more textField to get some more informations. I use Agenda from JFXtras library and i do not know how to edit the pop up.

2 个答案:

答案 0 :(得分:1)

您阅读过议程的JavaDoc吗?

http://jfxtras.org/doc/8.0/jfxtras-agenda/jfxtras/scene/control/agenda/Agenda.html

议程有一个默认弹出窗口,允许您编辑约会的主要属性,但也许您想自己做些事情。如果是这样,则需要注册到editAppointmentCallback,然后打开自己的弹出窗口。由于议程并未在约会的执行中规定事件/回调机制,因此无法通知约会的更改。因此,完成自定义编辑后,请通过调用refresh()确保更新议程。

答案 1 :(得分:0)

我找到了方法,我刚刚添加了以下代码:

agenda.setEditAppointmentCallback( (appointment) -> {
        editPopUp();
        return null;
    });

在议程初始化和editPopUp()上调用一个函数,该函数创建我想显示的弹出窗口