[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.32, 1.3
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-08-09 18:12:21
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv339/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Now the right click on menus work on windows machines, on windows the isPopuptrigger only works on mouseRelease ???? Wierd but it works Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** GenericTreeView.java 31 Jul 2006 17:10:33 -0000 1.32 --- GenericTreeView.java 9 Aug 2006 18:12:09 -0000 1.33 *************** *** 281,285 **** */ public JPopupMenu menu() { ! return null; } } --- 281,285 ---- */ public JPopupMenu menu() { ! return new JPopupMenu("Test"); } } *************** *** 1022,1025 **** --- 1022,1041 ---- */ public void mousePressed(MouseEvent e) { + react(e); + } + + /** + * Mouse releashed + * @param e MouseEvent + */ + public void mouseReleased(MouseEvent e) { + react(e); + } + + /** + * Do the thing + * @param e the MouseEvent + */ + private void react(MouseEvent e) { TreePath path = getPathForLocation(e.getX(), e.getY()); if (path != null) { *************** *** 1035,1039 **** } } ! } } --- 1051,1055 ---- } } ! } } |