diff options
Diffstat (limited to 'libjava/javax/swing/JRootPane.java')
-rw-r--r-- | libjava/javax/swing/JRootPane.java | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/libjava/javax/swing/JRootPane.java b/libjava/javax/swing/JRootPane.java index 34cd800..4f067c9 100644 --- a/libjava/javax/swing/JRootPane.java +++ b/libjava/javax/swing/JRootPane.java @@ -35,6 +35,7 @@ this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ + package javax.swing; import java.awt.BorderLayout; @@ -44,6 +45,7 @@ import java.awt.Dimension; import java.awt.LayoutManager; import java.awt.LayoutManager2; import java.io.Serializable; + import javax.accessibility.AccessibleRole; import javax.swing.plaf.RootPaneUI; @@ -62,7 +64,9 @@ public class JRootPane extends JComponent // The class used to obtain the accessible role for this object. protected static class AccessibleJRootPane { - /** DOCUMENT ME! */ + /** + * For compatability with Sun's JDK + */ private static final long serialVersionUID = 1082432482784468088L; /** @@ -306,6 +310,16 @@ public class JRootPane extends JComponent /** DOCUMENT ME! */ private static final long serialVersionUID = 8690748000348575668L; + public static final int NONE = 0; + public static final int FRAME = 1; + public static final int PLAIN_DIALOG = 2; + public static final int INFORMATION_DIALOG = 3; + public static final int ERROR_DIALOG = 4; + public static final int COLOR_CHOOSER_DIALOG = 5; + public static final int FILE_CHOOSER_DIALOG = 6; + public static final int QUESTION_DIALOG = 7; + public static final int WARNING_DIALOG = 8; + /** DOCUMENT ME! */ protected Component glassPane; @@ -318,6 +332,8 @@ public class JRootPane extends JComponent /** DOCUMENT ME! */ protected Container contentPane; + protected JButton defaultButton; + /** * DOCUMENT ME! * @@ -466,7 +482,7 @@ public class JRootPane extends JComponent * * @return DOCUMENT ME! */ - protected JComponent createContentPane() + protected Container createContentPane() { JPanel p = new JPanel(); p.setName(this.getName() + ".contentPane"); @@ -538,4 +554,19 @@ public class JRootPane extends JComponent { return "RootPaneUI"; } + + public JButton getDefaultButton() + { + return defaultButton; + } + + public void setDefaultButton(JButton newButton) + { + if (defaultButton == newButton) + return; + + JButton oldButton = defaultButton; + defaultButton = newButton; + firePropertyChange("defaultButton", oldButton, newButton); + } } |