intellij idea - JTree item non-text area click not triggered -


i writing intellij plugin , meeting issue. when click non-text area (right space of tree row), double-click callback not triggered.

here code:

private mouseadapter treeclick = new mouseadapter() {     @override     public void mouseclicked(mouseevent e) {         super.mouseclicked(e);         jtree tree = (jtree) e.getsource();         // selrow -1 when click right space (non-text) area.         int selrow = tree.getrowforlocation(e.getx(), e.gety());         treepath selpath = tree.getpathforlocation(e.getx(), e.gety());         if (selrow != -1 && e.getclickcount() == 2 && selpath != null) {             object selectednode = selpath.getlastpathcomponent();             if (callback != null) {                 callback.open(((defaultmutabletreenode) selectednode).getuserobject());             }         }     } }; 

i tried set wideselectiontreeui tree, has no change.

is there brief solution resolve this?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -