diff options
author | Michael Koch <konqueror@gmx.de> | 2003-03-17 15:20:10 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-03-17 15:20:10 +0000 |
commit | 2ff04cc63aa8b683dd17f029e7579280ecd8f9c8 (patch) | |
tree | c6337dc64052b39b5098596e7d1904d54ccdddd7 /libjava/java/awt/Dialog.java | |
parent | 94833648ca3360caeee3cce775ff410468d43559 (diff) | |
download | gcc-2ff04cc63aa8b683dd17f029e7579280ecd8f9c8.zip gcc-2ff04cc63aa8b683dd17f029e7579280ecd8f9c8.tar.gz gcc-2ff04cc63aa8b683dd17f029e7579280ecd8f9c8.tar.bz2 |
2003-03-17 Michael Koch <konqueror@gmx.de>
* 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.
From-SVN: r64485
Diffstat (limited to 'libjava/java/awt/Dialog.java')
-rw-r--r-- | libjava/java/awt/Dialog.java | 63 |
1 files changed, 59 insertions, 4 deletions
diff --git a/libjava/java/awt/Dialog.java b/libjava/java/awt/Dialog.java index 9aa2ea6..e7c40b1 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 <true> if this dialog box is modal, <code>false</code> * 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 <code>Dialog</code> with the specified, + * parent, title, modality and <code>GraphicsConfiguration</code>, + * that is not resizable. + * + * @param parent The parent frame of this dialog box. + * @param title The title string for this dialog box. + * @param modal <true> if this dialog box is modal, <code>false</code> + * otherwise. + * @param gc The <code>GraphicsConfiguration</code> 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 <code>Dialog</code> 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 <code>Dialog</code> with the specified, + * parent, title, modality and <code>GraphicsConfiguration</code>, + * 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 ()); } |