< prev index next >

src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java

Print this page

        

*** 29,38 **** --- 29,39 ---- import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import java.awt.datatransfer.*; import java.beans.*; + import static java.lang.Boolean.TRUE; import java.util.Enumeration; import java.util.Hashtable; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator;
*** 4002,4011 **** --- 4003,4019 ---- // Preferably checkForClickInExpandControl could take // the Event to do this it self! if(SwingUtilities.isLeftMouseButton(e)) { checkForClickInExpandControl(pressedPath, e.getX(), e.getY()); + + if(tree.getClientProperty("Tree.enableDoubleClickOnExpandControl") == TRUE) + // without this return statement, when double click on + // the expand control, only the first click is processed. + // used by WindowsNavigationTree + if (isLocationInExpandControl(pressedPath, e.getX(), e.getY())) + return; } int x = e.getX(); // Perhaps they clicked the cell itself. If so,
< prev index next >