aboutsummaryrefslogtreecommitdiff
path: root/libjava/classpath/javax/swing/event/InternalFrameEvent.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/javax/swing/event/InternalFrameEvent.java')
-rw-r--r--libjava/classpath/javax/swing/event/InternalFrameEvent.java67
1 files changed, 53 insertions, 14 deletions
diff --git a/libjava/classpath/javax/swing/event/InternalFrameEvent.java b/libjava/classpath/javax/swing/event/InternalFrameEvent.java
index badfa80..4e289bf 100644
--- a/libjava/classpath/javax/swing/event/InternalFrameEvent.java
+++ b/libjava/classpath/javax/swing/event/InternalFrameEvent.java
@@ -1,5 +1,5 @@
/* InternalFrameEvent.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,6 +43,8 @@ import java.awt.AWTEvent;
import javax.swing.JInternalFrame;
/**
+ * An event that indicates a change to a {@link JInternalFrame} component.
+ *
* @author Andrew Selkirk
*/
public class InternalFrameEvent extends AWTEvent
@@ -50,55 +52,59 @@ public class InternalFrameEvent extends AWTEvent
private static final long serialVersionUID = -5204823611874873183L;
/**
- * Internal frame activated event
+ * Internal frame activated event.
*/
public static final int INTERNAL_FRAME_ACTIVATED = 25554;
/**
- * Internal frame closed event
+ * Internal frame closed event.
*/
public static final int INTERNAL_FRAME_CLOSED = 25551;
/**
- * Internal frame closing event
+ * Internal frame closing event.
*/
public static final int INTERNAL_FRAME_CLOSING = 25550;
/**
- * Internal frame deactivated event
+ * Internal frame deactivated event.
*/
public static final int INTERNAL_FRAME_DEACTIVATED = 25555;
/**
- * Internal frame deiconifed event
+ * Internal frame deiconifed event.
*/
public static final int INTERNAL_FRAME_DEICONIFIED = 25553;
/**
- * Internal frame frame first event
+ * Internal frame frame first event.
*/
public static final int INTERNAL_FRAME_FIRST = 25549;
/**
- * Internal frame iconified event
+ * Internal frame iconified event.
*/
public static final int INTERNAL_FRAME_ICONIFIED = 25552;
/**
- * Internal frame last event
+ * Internal frame last event.
*/
public static final int INTERNAL_FRAME_LAST = 25555;
/**
- * Internal frame opened event
+ * Internal frame opened event.
*/
public static final int INTERNAL_FRAME_OPENED = 25549;
/**
- * Creates a <code>JInternalFrameEvent</code> object.
+ * Creates a new <code>JInternalFrameEvent</code> instance.
*
- * @param source The source of this event.
- * @param id Then event ID of this event.
+ * @param source the source of this event (<code>null</code> not permitted).
+ * @param id the event ID of this event (see the constants defined by this
+ * class).
+ *
+ * @throws IllegalArgumentException if <code>source</code> is
+ * <code>null</code>.
*/
public InternalFrameEvent(JInternalFrame source, int id)
{
@@ -106,10 +112,43 @@ public class InternalFrameEvent extends AWTEvent
}
/**
- * Returns the <code>JInternalFrame</code> object stored in this event.
+ * Returns the <code>JInternalFrame</code> component that is the source for
+ * this event.
+ *
+ * @return The source.
+ *
+ * @since 1.3
*/
public JInternalFrame getInternalFrame()
{
return (JInternalFrame) source;
}
+
+ /**
+ * Returns a string that indicates the event id. This is used by the
+ * {@link #toString()} method.
+ *
+ * @return A string that indicates the event id.
+ */
+ public String paramString()
+ {
+ switch (id) {
+ case INTERNAL_FRAME_ACTIVATED:
+ return "INTERNAL_FRAME_ACTIVATED";
+ case INTERNAL_FRAME_CLOSED:
+ return "INTERNAL_FRAME_CLOSED";
+ case INTERNAL_FRAME_CLOSING:
+ return "INTERNAL_FRAME_CLOSING";
+ case INTERNAL_FRAME_DEACTIVATED:
+ return "INTERNAL_FRAME_DEACTIVATED";
+ case INTERNAL_FRAME_DEICONIFIED:
+ return "INTERNAL_FRAME_DEICONIFIED";
+ case INTERNAL_FRAME_ICONIFIED:
+ return "INTERNAL_FRAME_ICONIFIED";
+ case INTERNAL_FRAME_OPENED:
+ return "INTERNAL_FRAME_OPENED";
+ default:
+ return "unknown type";
+ }
+ }
}