From fa405edeaba4da430cc4036ecca8e38028098cd5 Mon Sep 17 00:00:00 2001 From: mkoch Date: Mon, 17 Mar 2003 15:20:10 +0000 Subject: 2003-03-17 Michael Koch * java/awt/Dialog.java (Dialog): New constructor, changed implementations, added documentation. * java/awt/ScrollPaneAdjustable.java (ScrollPaneAdjustable): Extends Object, implements Adjustable and Serializable. (serialVersionUID): New member variable. (sp): New member variable. (orientation): New member variable. (value): New member variable. (minimum): New member variable. (maximum): New member variable. (visibleAmount): New member variable. (unitIncrement): New member variable. (blockIncrement): New member variable. (AdjustmentListener): New member variable. (ScrollPaneAdjustable): New implementation. (addAdjustmentListener): New method. (removeAdjustmentListener): New method. (getAdjustmentListeners): New method. (getBlockIncrement): New method. (getMaximum): New method. (getMinimum): New method. (getOrientation): New method. (getUnitIncrement): New method. (getValue): New method. (getVisibleAmount): New method. (setBlockIncrement): New method. (setMaximum): Implemented. (setMinimum): Implemented. (setUnitIncrement): New method. (setValue): New method. (setVisibleAmount): Implemented. (paramString): New stubbed method. * java/awt/Window.java (show): Call setVisible(). (hide): Call setVisible(). (processEvent): Add cases for WINDOW_GAINED_FOCUS, WINDOW_LOST_FOCUS and WINDOW_STATE_CHANGED. (processWindowFocusEvent): New method. (processWindowStateEvent): New method. (postEvent): Deprecated. (applyResourceBundle): Deprecated. * java/awt/datatransfer/DataFlavor.java (DataFlavor): Doesn't thow ClassNotFoundException. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64485 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/java/awt/Dialog.java | 63 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 4 deletions(-) (limited to 'libjava/java/awt/Dialog.java') diff --git a/libjava/java/awt/Dialog.java b/libjava/java/awt/Dialog.java index 9aa2ea6f346..e7c40b14ae4 100644 --- a/libjava/java/awt/Dialog.java +++ b/libjava/java/awt/Dialog.java @@ -153,11 +153,37 @@ Dialog(Frame parent, String title) * @param title The title string for this dialog box. * @param modal if this dialog box is modal, false * otherwise. + * + * @exception IllegalArgumentException If owner is null or + * GraphicsEnvironment.isHeadless() returns true. */ public Dialog(Frame parent, String title, boolean modal) { - super(parent); + this (parent, title, modal, parent.getGraphicsConfiguration ()); +} + +/** + * Initializes a new instance of Dialog with the specified, + * parent, title, modality and GraphicsConfiguration, + * that is not resizable. + * + * @param parent The parent frame of this dialog box. + * @param title The title string for this dialog box. + * @param modal if this dialog box is modal, false + * otherwise. + * @param gc The GraphicsConfiguration object to use. + * + * @exception IllegalArgumentException If owner is null, the + * GraphicsConfiguration is not a screen device or + * GraphicsEnvironment.isHeadless() returns true. + * + * @since 1.4 + */ +public +Dialog (Frame parent, String title, boolean modal, GraphicsConfiguration gc) +{ + super (parent, gc); this.title = title; this.modal = modal; @@ -166,10 +192,19 @@ Dialog(Frame parent, String title, boolean modal) setLayout(new BorderLayout()); } +/** + * Initializes a new instance of Dialog with the specified, + * parent, that is not resizable. + * + * @exception IllegalArgumentException If parent is null. This exception is + * always thrown when GraphicsEnvironment.isHeadless() returns true. + * + * @since 1.2 + */ public Dialog (Dialog owner) { - this (owner, "", false); + this (owner, "", false, owner.getGraphicsConfiguration ()); } /** @@ -184,7 +219,7 @@ Dialog (Dialog owner) public Dialog (Dialog owner, String title) { - this (owner, title, false); + this (owner, title, false, owner.getGraphicsConfiguration ()); } /** @@ -199,9 +234,29 @@ Dialog (Dialog owner, String title) public Dialog (Dialog owner, String title, boolean modal) { - super (owner); + this (owner, title, modal, owner.getGraphicsConfiguration ()); +} + +/** + * Initializes a new instance of Dialog with the specified, + * parent, title, modality and GraphicsConfiguration, + * that is not resizable. + * + * @exception IllegalArgumentException If parent is null, the + * GraphicsConfiguration is not a screen device or + * GraphicsEnvironment.isHeadless() returns true. + * + * @since 1.4 + */ +public +Dialog (Dialog parent, String title, boolean modal, GraphicsConfiguration gc) +{ + super (parent, parent.getGraphicsConfiguration ()); + this.modal = modal; this.title = title; + resizable = false; + setLayout (new BorderLayout ()); } -- cgit v1.2.3