home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 705 b | 37 lines |
- // Button.java
- // 29.03.96
- //
- // A logical, not graphical, button
-
- package cybcerone.utils;
-
- import java.awt.Rectangle;
-
- /**
- * Logical object to make handling mouse clicks and moves easier.
- */
- public class Button {
- private String statusText;
- private Object next;
- private Rectangle position;
-
- public Button (Object next, String statusText,
- int x, int y, int width, int height) {
- this.next = next;
- this.statusText = statusText;
- this.position = Scaler.scale (x, y, width, height);
- }
-
- public boolean inside (int x, int y) {
- return position.inside (x, y);
- }
-
- public Object getNext () {
- return next;
- }
-
- public String getStatusText () {
- return statusText;
- }
- }
-