How to add a double-click listener to my GEF editor?

后端 未结 3 1318
生来不讨喜
生来不讨喜 2021-01-12 05:32

I\'m using GEF. I have a graphical editor with some \"boxes\" implemented. Now, I want to add a double-click listener to each box (Rectangle). I tried to add a listener to t

3条回答
  •  旧巷少年郎
    2021-01-12 06:14

    viewer.getControl().addListener(SWT.MouseDoubleClick, new Listener() {
    
            @Override
            public void handleEvent(Event event) {
            //write the double click action
        });
    

提交回复
热议问题