summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Kennke <roman@kennke.org>2006-01-27 10:26:34 +0000
committerRoman Kennke <roman@kennke.org>2006-01-27 10:26:34 +0000
commitb9c71c621763df74a56aebbdc023010ae851e317 (patch)
treee0de6baba3c04c42ed1cce0c5f4c5a7f41569d37
parent9a7907870f97cd0a13766bcd3a5a255a2ba81f1e (diff)
downloadclasspath-b9c71c621763df74a56aebbdc023010ae851e317.tar.gz
2006-01-27 Roman Kennke <kennke@aicas.com>
* javax/swing/plaf/basic/BasicInternalFrameUI.java (InternalFramePropertyChangeListener): Don't implement VetoableChangeListener. (InternalFramePropertyChangeListener.vetoableChange): Removed. (internalFrameVetoableChangeListener): Removed unneeded field. (installListeners): Don't install vetoableChangeListener. * javax/swing/event/DocumentEvent.java (EventType): Made class final.
-rw-r--r--ChangeLog11
-rw-r--r--javax/swing/event/DocumentEvent.java2
-rw-r--r--javax/swing/plaf/basic/BasicInternalFrameUI.java41
3 files changed, 14 insertions, 40 deletions
diff --git a/ChangeLog b/ChangeLog
index 8392bb444..1e58c465d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2006-01-27 Roman Kennke <kennke@aicas.com>
+ * javax/swing/plaf/basic/BasicInternalFrameUI.java
+ (InternalFramePropertyChangeListener): Don't implement
+ VetoableChangeListener.
+ (InternalFramePropertyChangeListener.vetoableChange): Removed.
+ (internalFrameVetoableChangeListener): Removed unneeded field.
+ (installListeners): Don't install vetoableChangeListener.
+ * javax/swing/event/DocumentEvent.java
+ (EventType): Made class final.
+
+2006-01-27 Roman Kennke <kennke@aicas.com>
+
* javax/swing/SwingUtilities.java
(calculateInsetArea): Removed unneeded method. The method
calculateInnerArea has the same purpose and is actually specified.
diff --git a/javax/swing/event/DocumentEvent.java b/javax/swing/event/DocumentEvent.java
index 6cd8e61fe..c17b24254 100644
--- a/javax/swing/event/DocumentEvent.java
+++ b/javax/swing/event/DocumentEvent.java
@@ -81,7 +81,7 @@ public interface DocumentEvent
/**
* EventType
*/
- class EventType
+ final class EventType
{
/**
* INSERT
diff --git a/javax/swing/plaf/basic/BasicInternalFrameUI.java b/javax/swing/plaf/basic/BasicInternalFrameUI.java
index f9653bd2e..d077a42aa 100644
--- a/javax/swing/plaf/basic/BasicInternalFrameUI.java
+++ b/javax/swing/plaf/basic/BasicInternalFrameUI.java
@@ -891,40 +891,12 @@ public class BasicInternalFrameUI extends InternalFrameUI
* This helper class listens for PropertyChangeEvents from the
* JInternalFrame.
*/
- public class InternalFramePropertyChangeListener implements
- PropertyChangeListener, VetoableChangeListener
+ public class InternalFramePropertyChangeListener
+ implements PropertyChangeListener
{
/**
* This method is called when one of the JInternalFrame's properties change.
- * This method is to allow JInternalFrame to veto an attempt to close the
- * internal frame. This allows JInternalFrame to honour its
- * defaultCloseOperation if that is DO_NOTHING_ON_CLOSE.
- */
- public void vetoableChange(PropertyChangeEvent e)
- throws PropertyVetoException
- {
- if (e.getPropertyName().equals(JInternalFrame.IS_CLOSED_PROPERTY))
- {
- if (frame.getDefaultCloseOperation() == JInternalFrame.HIDE_ON_CLOSE)
- {
- frame.setVisible(false);
- frame.getDesktopPane().repaint();
- throw new PropertyVetoException(
- "close operation is HIDE_ON_CLOSE\n",
- e);
- }
- else if (frame.getDefaultCloseOperation() == JInternalFrame.DISPOSE_ON_CLOSE)
- closeFrame(frame);
- else
- throw new PropertyVetoException(
- "close operation is DO_NOTHING_ON_CLOSE\n",
- e);
- }
- }
-
- /**
- * This method is called when one of the JInternalFrame's properties change.
*
* @param evt
* The PropertyChangeEvent.
@@ -1091,13 +1063,6 @@ public class BasicInternalFrameUI extends InternalFrameUI
*/
protected PropertyChangeListener propertyChangeListener;
- /**
- * The VetoableChangeListener. Listens to PropertyChangeEvents
- * from the JInternalFrame and allows the JInternalFrame to
- * veto attempts to close it.
- */
- private VetoableChangeListener internalFrameVetoableChangeListener;
-
/** The InternalFrameListener that listens to the JInternalFrame. */
private transient BasicInternalFrameListener internalFrameListener;
@@ -1238,13 +1203,11 @@ public class BasicInternalFrameUI extends InternalFrameUI
borderListener = createBorderListener(frame);
componentListener = createComponentListener();
propertyChangeListener = createPropertyChangeListener();
- internalFrameVetoableChangeListener = new InternalFramePropertyChangeListener();
frame.addMouseListener(borderListener);
frame.addMouseMotionListener(borderListener);
frame.addInternalFrameListener(internalFrameListener);
frame.addPropertyChangeListener(propertyChangeListener);
- frame.addVetoableChangeListener(internalFrameVetoableChangeListener);
frame.getRootPane().getGlassPane().addMouseListener(glassPaneDispatcher);
frame.getRootPane().getGlassPane().addMouseMotionListener(glassPaneDispatcher);
}