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/ImageButtonController.java | |
parent | 87b0987cad99cf45cd5d9e03cd1cefbaaec4ef2a (diff) | |
download | ATCD-ACE-4_4.tar.gz |
This commit was manufactured by cvs2svn to create branch 'ACE-4_4'.ACE-4_4
Diffstat (limited to 'java/gjt/ImageButtonController.java')
-rw-r--r-- | java/gjt/ImageButtonController.java | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/java/gjt/ImageButtonController.java b/java/gjt/ImageButtonController.java deleted file mode 100644 index 0f6aa6f4add..00000000000 --- a/java/gjt/ImageButtonController.java +++ /dev/null @@ -1,79 +0,0 @@ -package gjt; -import java.awt.Event; - -/** - * A controller for an ImageButton, this abstract class - * establishes the association between itself and an ImageButton - * and delivers events to its ImageButton.<p> - * - * ImageButtonControllers must be constructed with an - * ImageButton; the ImageButton's controller gets set by - * ImageButtonController's constructor.<p> - * - * The ImageButton passed into the constructor must not be null; - * this is enforced by an assertion.<p> - * - * Methods defined in the MouseController interface are left - * for subclasses to implement. ImageButtonController defines - * mouseMove(), mouseEnter() and mouseExit() as no-ops, so - * that extensions of ImageButtonController only have to - * implement mouseDown(), mouseUp() and mouseDrag(). Note - * that extensions are still free to override mouseMove(), - * mouseEnter() and mouseExit() if desired.<p> - * - * Subclasses should also call the protected XXXButton(Event) - * methods below, where XXX is either arm, disarm, activate, or - * deactivate as appropriate. SpringyImageButtonController is - * a good example of this (so is StickyImageButtonController, - * but it is more complicated than it's springy sibling).<p> - * - * @version 1.0, Apr 1 1996 - * @author David Geary - * @see MouseController - * @see ImageButton - * @see ImageButtonEvent - * @see SpringyImageButtonController - * @see StickyImageButtonController - * @see gjt.test.ImageButtonTest - */ -public abstract class ImageButtonController - implements MouseController { - private ImageButton button; - - ImageButtonController(ImageButton button) { - Assert.notNull(button); - this.button = button; - button.setController(this); - } - public ImageButton getButton() { - return button; - } - public boolean mouseEnter(Event event, int x, int y) { - return false; - } - public boolean mouseExit (Event event, int x, int y) { - return false; - } - public boolean mouseMove (Event event, int x, int y) { - return false; - } - - protected void armButton(Event event) { - button.deliverEvent( - new ImageButtonEvent(button, - event, - ImageButtonEvent.ARM)); - } - protected void disarmButton(Event event) { - button.deliverEvent( - new ImageButtonEvent(button, - event, - ImageButtonEvent.DISARM)); - } - protected void activateButton(Event event) { - button.deliverEvent( - new ImageButtonEvent(button, - event, - ImageButtonEvent.ACTIVATE)); - } -} |