Re: [cp-patches] FYI: BasicTreeUI patch

2007-11-10 Thread Audrius Meskauskas

Roman Kennke wrote:

This removes a not used constant in BasicTreeUI. This was creating a
synthetic MouseEvent, which wouldn't work because the MouseEvent tries
to get the screen location of the source component, which fails because
the artificial component is not showing. 
The coordinates of that mouse event were never used. Apart constructor, 
the only other operation where it was involved was the direct comparison 
(==)  - to check if a mouse event under consideration is THE EVENT which 
must be handled in a specific way. Anyway, this is seems not important 
as the code is now rewritten differently and does not need this 
singleton instance.

Alas, the constant isn't used
anyway, so I remove it. This should fix the Mauve regression and should
also help with FindBugs, AFAICS.
  
Which exactly Mauve regression is fixed by removing that unused piece of 
code?

Audrius




[cp-patches] FYI: BasicTreeUI patch

2007-10-11 Thread Roman Kennke
This removes a not used constant in BasicTreeUI. This was creating a
synthetic MouseEvent, which wouldn't work because the MouseEvent tries
to get the screen location of the source component, which fails because
the artificial component is not showing. Alas, the constant isn't used
anyway, so I remove it. This should fix the Mauve regression and should
also help with FindBugs, AFAICS.

2007-10-11  Roman Kennke  [EMAIL PROTECTED]

* javax/swing/plaf/basic/BasicTreeUI.java
(EDIT): Removed obsolete constant.

/Roman

-- 
Dipl.-Inform. (FH) Roman Kennke, Software Engineer, http://kennke.org
aicas Allerton Interworks Computer Automated Systems GmbH
Haid-und-Neu-Straße 18 * D-76131 Karlsruhe * Germany
http://www.aicas.com   * Tel: +49-721-663 968-0
USt-Id: DE216375633, Handelsregister HRB 109481, AG Karlsruhe
Geschäftsführer: Dr. James J. Hunt
Index: javax/swing/plaf/basic/BasicTreeUI.java
===
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.157
diff -u -1 -0 -r1.157 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	3 Apr 2007 20:41:03 -	1.157
+++ javax/swing/plaf/basic/BasicTreeUI.java	11 Oct 2007 10:32:19 -
@@ -272,28 +272,20 @@
   TreeExpansionListener treeExpansionListener;
 
   TreeModelListener treeModelListener;
 
   /**
* The zero size icon, used for expand controls, if they are not visible.
*/
   static Icon nullIcon;
 
   /**
-   * The special value of the mouse event is sent indicating that this is not
-   * just the mouse click, but the mouse click on the selected node. Sending
-   * such event forces to start the cell editing session.
-   */
-  static final MouseEvent EDIT = new MouseEvent(new Label(), 7, 7, 7, 7, 7, 7,
-false);
-
-  /**
* Creates a new BasicTreeUI object.
*/
   public BasicTreeUI()
   {
 validCachedPreferredSize = false;
 drawingCache = new Hashtable();
 nodeDimensions = createNodeDimensions();
 configureLayoutCache();
 
 editingRow = - 1;