From 1579e98d4171414e28630d85c6986b9ae760e5a4 Mon Sep 17 00:00:00 2001 From: mkoch Date: Fri, 24 Dec 2004 11:50:46 +0000 Subject: [PATCH] 2004-12-24 Michael Koch * javax/swing/JRootPane.java (windowDecorationStyle): New field. (setMenuBar): New method. (getMenuBar): Likewise. (getWindowDecorationStyle): Likewise. (setWindowDecorationStyle): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/java-gui-branch@92591 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 9 ++++++++ libjava/javax/swing/JRootPane.java | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 650d4816a0a..f9134f8e9d4 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,14 @@ 2004-12-24 Michael Koch + * javax/swing/JRootPane.java + (windowDecorationStyle): New field. + (setMenuBar): New method. + (getMenuBar): Likewise. + (getWindowDecorationStyle): Likewise. + (setWindowDecorationStyle): Likewise. + +2004-12-24 Michael Koch + * javax/swing/DefaultListSelectionModel.java (leadAnchorNotificationEnabled): Made protected. diff --git a/libjava/javax/swing/JRootPane.java b/libjava/javax/swing/JRootPane.java index 54047491462..65311e12c57 100644 --- a/libjava/javax/swing/JRootPane.java +++ b/libjava/javax/swing/JRootPane.java @@ -333,6 +333,11 @@ public class JRootPane extends JComponent protected Container contentPane; protected JButton defaultButton; + + /** + * @since 1.4 + */ + private int windowDecorationStyle = NONE; /** * DOCUMENT ME! @@ -345,6 +350,11 @@ public class JRootPane extends JComponent getLayeredPane().add(menuBar, JLayeredPane.FRAME_CONTENT_LAYER); } + public void setMenuBar(JMenuBar m) + { + setJMenuBar(m); + } + /** * DOCUMENT ME! * @@ -355,6 +365,11 @@ public class JRootPane extends JComponent return menuBar; } + public JMenuBar getMenuBar() + { + return getJMenuBar(); + } + /** * DOCUMENT ME! * @@ -569,4 +584,32 @@ public class JRootPane extends JComponent defaultButton = newButton; firePropertyChange("defaultButton", oldButton, newButton); } + + /** + * @since 1.4 + */ + public int getWindowDecorationStyle() + { + return windowDecorationStyle; + } + + /** + * @since 1.4 + */ + public void setWindowDecorationStyle(int style) + { + if (style != NONE + && style != FRAME + && style != INFORMATION_DIALOG + && style != ERROR_DIALOG + && style != COLOR_CHOOSER_DIALOG + && style != FILE_CHOOSER_DIALOG + && style != QUESTION_DIALOG + && style != WARNING_DIALOG) + throw new IllegalArgumentException("invalid style"); + + int oldStyle = windowDecorationStyle; + windowDecorationStyle = style; + firePropertyChange("windowDecorationStyle", oldStyle, style); + } } -- 2.11.4.GIT