diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-25 22:18:58 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-11-25 22:18:58 +0000 |
commit | 7a5fe8ce23ac50450b804cf0183c773565ae7cef (patch) | |
tree | 220a38a6627619d1386897d42757a140b9de448f /java/gjt/ImageButtonEvent.java | |
parent | 87b0987cad99cf45cd5d9e03cd1cefbaaec4ef2a (diff) | |
download | ATCD-7a5fe8ce23ac50450b804cf0183c773565ae7cef.tar.gz |
This commit was manufactured by cvs2svn to create branch 'ACE-4_4'.ACE-4_4
Diffstat (limited to 'java/gjt/ImageButtonEvent.java')
-rw-r--r-- | java/gjt/ImageButtonEvent.java | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/java/gjt/ImageButtonEvent.java b/java/gjt/ImageButtonEvent.java deleted file mode 100644 index bb7f196698f..00000000000 --- a/java/gjt/ImageButtonEvent.java +++ /dev/null @@ -1,103 +0,0 @@ -package gjt; - -import java.awt.Event; - -/** - * An extension of java.awt.Event, specifically designed for - * ImageButton events.<p> - * - * ImageButtonEvents are constructed with 3 arguments: - * <dl> - * <dd> ImageButton in which the event occurred - * <dd> The AWT event that triggered the image button event - * <dd> The id of the event. - * </dl> - * - * An ImageButtonEvent's id (the constructor's 3rd argument), - * must be one of the following: - * - * <dl> - * <dd> ImageButtonEvent.ARM - * <dd> ImageButtonEvent.DISARM - * <dd> ImageButtonEvent.ACTIVATE - * </dl> - * - * ImageButtonEvent has only a constructor and a paramString() - * method. Containers that contain ImageButtons should check - * for ImageButtonEvents like so: <p> - * - * <pre> - * // handleEvent(Event) method of a container that - * // contains ImageButtons. - * - * public boolean handleEvent(Event event) { - * if(event instanceof ImageButtonEvent) { - * ImageButtonEvent ibevent = - * (ImageButtonEvent)event; - * - * if(ibevent.isArmed()) { - * // do something for arming - * } - * if(ibevent.isDisarmed()) { - * // do something for disarming - * } - * if(ibevent.isActivated()) { - * // do something for activation - * } - * } - * } - * </pre> - * - * ImageButtonController is the only GJT class that creates - * ImageButtonEvents. - * - * @version 1.0, Apr 1 1996 - * @author David Geary - * @see ImageButton - * @see ImageButtonController - * @see SpringyImageButtonController - * @see StickyImageButtonController - * @see gjt.test.ImageButtonTest - */ -public class ImageButtonEvent extends Event { - public static final int ARM = 1; - public static final int DISARM = 2; - public static final int ACTIVATE = 3; - - private int eventType; - - public ImageButtonEvent(ImageButton button, - Event event, - int type) { - super(button, event.when, event.id, event.x, event.y, - event.key, event.modifiers, event.arg); - - Assert.notFalse(type == ARM || - type == DISARM || - type == ACTIVATE); - - eventType = type; - id = -1; - } - public boolean isArmed() { - return eventType == ARM; - } - public boolean isDisarmed() { - return eventType == DISARM; - } - public boolean isActivated() { - return eventType == ACTIVATE; - } - protected String paramString() { - String str = new String(); - - if(eventType == ImageButtonEvent.ARM) - str = "ARM"; - else if(eventType == ImageButtonEvent.DISARM) - str = "DISARM"; - else if(eventType == ImageButtonEvent.ACTIVATE) - str = "ACTIVATE"; - - return super.paramString() + str; - } -} |