summaryrefslogtreecommitdiff
path: root/javax/swing/JInternalFrame.java
diff options
context:
space:
mode:
authorAnthony Balkissoon <abalkiss@redhat.com>2005-06-22 15:09:40 +0000
committerAnthony Balkissoon <abalkiss@redhat.com>2005-06-22 15:09:40 +0000
commit3311d2abaa9c034d16f9e5839fccf380d7be3611 (patch)
tree33c68c7a8906991505b264e20750eb7aa746d9aa /javax/swing/JInternalFrame.java
parentddd1d9e57690d3bdd600912f198cf59266643aa1 (diff)
downloadclasspath-3311d2abaa9c034d16f9e5839fccf380d7be3611.tar.gz
2005-06-22 Anthony Balkissoon <abalkiss@redhat.com>
* javax/swing/JDialog.java: (setDefaultCloseOperation): Removed validity check for operation code. Validity is handled in processWindowEvent. * javax/swing/JFrame.java: (setDefaultCloseOperation): Changed error message to be more descriptive and similar to reference implementation. * javax/swing/JInternalFrame.java: (setDefaultCloseOperation): Removed validity check for operation code. * javax/swing/plaf/basic/BasicInternalFrameUI.java: (InternalFramePropertyListener): Added implementation of VetoableChangeListener. (InternalFramePropertyListener.vetoableChange): New method. (InternalFramePropertyListener.propertyChange): Removed check for JInternalFrame.IS_CLOSED_PROPERTY. This is now handled in vetoableChange. (getDesktopManager): Added a check for null pointer from JInternalFrame.getDesktopPane().
Diffstat (limited to 'javax/swing/JInternalFrame.java')
-rw-r--r--javax/swing/JInternalFrame.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/javax/swing/JInternalFrame.java b/javax/swing/JInternalFrame.java
index 19e0a11ff..3bd2ae26a 100644
--- a/javax/swing/JInternalFrame.java
+++ b/javax/swing/JInternalFrame.java
@@ -1305,10 +1305,10 @@ public class JInternalFrame extends JComponent implements Accessible,
*/
public void setDefaultCloseOperation(int operation)
{
- if (operation != DO_NOTHING_ON_CLOSE
- && operation != HIDE_ON_CLOSE
- && operation != DISPOSE_ON_CLOSE)
- throw new Error("Close operation must be one of DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE");
+ /* Reference implementation allows invalid operations to be specified.
+ In that case, behaviour defaults to DO_NOTHING_ON_CLOSE.
+ processWindowEvent handles the behaviour. getDefaultCloseOperation
+ must return the invalid operator code. */
defaultCloseOperation = operation;
}