This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[GUI] Patch: javax.swing.JRootPane
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Fri, 11 Jun 2004 09:15:39 +0200
- Subject: [GUI] Patch: javax.swing.JRootPane
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
I just commited the attached patch to make javax.swing.JRootPane a
little bit more conform to the official API.
Michael
2004-06-11 Michael Koch <konqueror@gmx.de>
* javax/swing/JRootPane.java
(AccessibleJRootPane.serialVersionUID): New field.
(AccessibleJRootPane.AccessibleJRootPane): New constructor.
(AccessibleJRootPane.getAccessibleRole): New method.
(RootLayout): Implements Serializable.
(RootLayout.serialVersionUID): New field.
(RootLayout.RootLayout): New constructor.
(setJMenuBar): Made public.
(getJMenuBar): Likewise.
(JRootPane): Likewise.
(createContentPane): Likewise.
(createGlassPane): Likewise.
(createLayeredPane): Likewise.
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAyVwbWSOgCCdjSDsRAmOGAJ9st8Wf1eI26icrDdD4FpHOzLloPwCeL5mD
jKRN+1RuVsPfw7B6+we1n2k=
=rzzE
-----END PGP SIGNATURE-----
Index: javax/swing/JRootPane.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JRootPane.java,v
retrieving revision 1.4.2.4
diff -u -b -B -r1.4.2.4 JRootPane.java
--- javax/swing/JRootPane.java 10 Jun 2004 08:49:07 -0000 1.4.2.4
+++ javax/swing/JRootPane.java 11 Jun 2004 07:12:33 -0000
@@ -67,13 +67,28 @@
// The class used to obtain the accessible role for this object.
protected static class AccessibleJRootPane
{
+ private static final long serialVersionUID = 1082432482784468088L;
+
+ protected AccessibleJRootPane()
+ {
+ }
+
+ public AccessibleRole getAccessibleRole()
+ {
+ return AccessibleRole.ROOT_PANE;
+ }
}
// Custom Layout Manager for JRootPane. It positions contentPane and
// menuBar withing its layeredPane.
- protected class RootLayout extends Object
- implements LayoutManager2
+ protected class RootLayout implements LayoutManager2, Serializable
+ {
+ private static final long serialVersionUID = -4100116998559815027L;
+
+ protected RootLayout()
{
+ }
+
public void addLayoutComponent(Component comp, Object constraints)
{
}
@@ -213,13 +228,13 @@
protected JMenuBar menuBar;
protected Container contentPane;
- void setJMenuBar(JMenuBar m)
+ public void setJMenuBar(JMenuBar m)
{
menuBar = m;
getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER);
}
- JMenuBar getJMenuBar()
+ public JMenuBar getJMenuBar()
{
return menuBar;
}
@@ -281,7 +296,7 @@
add(f, -1);
}
- JRootPane()
+ public JRootPane()
{
setLayout(createRootLayout());
getGlassPane();
@@ -296,7 +311,7 @@
return new RootLayout();
}
- JComponent createContentPane()
+ protected JComponent createContentPane()
{
JPanel p = new JPanel();
p.setName(this.getName() + ".contentPane");
@@ -304,7 +319,7 @@
return p;
}
- Component createGlassPane()
+ protected Component createGlassPane()
{
JPanel p = new JPanel();
p.setName(this.getName() + ".glassPane");
@@ -313,7 +328,7 @@
return p;
}
- JLayeredPane createLayeredPane()
+ protected JLayeredPane createLayeredPane()
{
JLayeredPane l = new JLayeredPane();
l.setLayout(null);