home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.6 KB | 59 lines |
- // PreorientPanel.java
- // 28.02.96
- //
- // before the orientation screen
-
- package cybcerone.orient;
-
- import java.awt.Event;
-
- import cybcerone.utils.Appletlike;
- import cybcerone.utils.SuperPanel;
- import cybcerone.unite.UnitePanel;
-
- /**
- * Before you orient, preorient. This page gives you a choice between
- * going directly to the mapping module or looking up a room in the
- * main building.
- */
- public class PreorientPanel extends SuperPanel {
- public static final String id = "preorient";
- public static final String imagePath = "orientation/";
-
- private static final String statusText = "Maps and orientation";
- private static final String bgFile = imagePath + "fond_preorientation.gif";
-
- Button orientButton;
- Button thisBuildingButton;
-
- public PreorientPanel (Appletlike app) {
- super (id, statusText, app);
- setBackground (bgFile, 4);
-
- orientButton = new Button (OrientPanel.id, 170, 190, 180, 180);
- thisBuildingButton = new Button (UnitePanel.id, 670, 190, 190, 180);
- }
-
- public boolean mouseDown (Event evt, int x, int y) {
- if (orientButton.inside (x, y)) {
- app.update (orientButton.getNext ());
- return true;
- } else if (thisBuildingButton.inside (x, y)) {
- app.update (thisBuildingButton.getNext ());
- return true;
- } else
- return super.mouseDown (evt, x, y);
- }
-
- public boolean mouseMove (Event evt, int x, int y) {
- if (orientButton.inside (x, y)) {
- app.showStatus ("Maps of the campus and surrounding area");
- } else if (thisBuildingButton.inside (x, y)) {
- app.showStatus ("Search for a room in the main building");
- } else
- app.showStatus (statusText);
- return true;
- }
-
- }
-