[Patch][gui] little swing cleanups
Michael Koch
konqueror@gmx.de
Mon Oct 25 15:42:00 GMT 2004
Hi list,
I just commited the attached patch to simplify JMenuBar.updateUI() and
to reorganize imports in DefaultTreeSelectionModel.
Michael
2004-10-25 Michael Koch <konqueror@gmx.de>
* javax/swing/JMenuBar.java
(updateUI): Simplified.
* javax/swing/tree/DefaultTreeSelectionModel.java:
Reorganized import statements.
-------------- next part --------------
Index: javax/swing/JMenuBar.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JMenuBar.java,v
retrieving revision 1.2.18.7
diff -u -r1.2.18.7 JMenuBar.java
--- javax/swing/JMenuBar.java 22 Oct 2004 12:41:14 -0000 1.2.18.7
+++ javax/swing/JMenuBar.java 25 Oct 2004 15:39:49 -0000
@@ -463,8 +463,7 @@
*/
public void updateUI()
{
- MenuBarUI ui = ((MenuBarUI) UIManager.getUI(this));
- setUI(ui);
+ setUI((MenuBarUI) UIManager.getUI(this));
invalidate();
}
}
Index: javax/swing/tree/DefaultTreeSelectionModel.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/tree/DefaultTreeSelectionModel.java,v
retrieving revision 1.3.18.3
diff -u -r1.3.18.3 DefaultTreeSelectionModel.java
--- javax/swing/tree/DefaultTreeSelectionModel.java 24 Oct 2004 09:20:48 -0000 1.3.18.3
+++ javax/swing/tree/DefaultTreeSelectionModel.java 25 Oct 2004 15:39:49 -0000
@@ -35,6 +35,7 @@
obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */
+
package javax.swing.tree;
import java.beans.PropertyChangeListener;
@@ -44,13 +45,13 @@
import java.io.Serializable;
import java.util.EventListener;
import java.util.Vector;
+
import javax.swing.DefaultListSelectionModel;
import javax.swing.event.EventListenerList;
import javax.swing.event.SwingPropertyChangeSupport;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener;
-
/**
* DefaultTreeSelectionModel
* @author Andrew Selkirk
More information about the Java-patches
mailing list