summaryrefslogtreecommitdiff
path: root/java/gjt/StateButton.java
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-09 07:08:18 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-03-09 07:08:18 +0000
commit957681064207962c8e33263c7ebebbb4a83f7af0 (patch)
treed28e87f0be723cf1eed7e0f52298d8153fc8f4cd /java/gjt/StateButton.java
parent1eeb03769ad41dd4bc5ac7d438cc98680ef55059 (diff)
downloadATCD-ACE-4_6_27.tar.gz
This commit was manufactured by cvs2svn to create tag 'ACE-4_6_27'.ACE-4_6_27
Diffstat (limited to 'java/gjt/StateButton.java')
-rw-r--r--java/gjt/StateButton.java45
1 files changed, 0 insertions, 45 deletions
diff --git a/java/gjt/StateButton.java b/java/gjt/StateButton.java
deleted file mode 100644
index 6de20a76f98..00000000000
--- a/java/gjt/StateButton.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package gjt;
-
-import java.awt.Image;
-
-/**
- * An ImageButton that cycles through a series of images. The
- * image advances to the next image in the series every time
- * the button is activated.<p>
- *
- * Note that the cycling is actually performed by the buttons'
- * controller - a StateButtonController.<p>
- *
- * @version 1.0, Apr 1 1996
- * @author David Geary
- * @see ImageButton
- * @see StateButtonController
- * @see gjt.test.StateButtonTest
- */
-public class StateButton extends ImageButton {
- private Image[] images;
- private int state = 0;
- private int numStates;
-
- public StateButton(Image[] images) {
- super(images[0]);
-
- this.images = images;
- numStates = images.length;
- setController(new StateButtonController(this));
- waitForImages();
- }
- public Image nextImage() {
- if(state + 1 < numStates) state++;
- else state = 0;
-
- return images[state];
- }
- public int state() {
- return state;
- }
- private void waitForImages() {
- for(int i=0; i < images.length; ++i)
- Util.waitForImage(this, images[i]);
- }
-}