home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.6 KB | 73 lines |
- // UnitePanel.java
- // 18.03.96
- //
- // the screen to select a room number
-
- package cybcerone.unite;
-
- import java.awt.Event;
- import java.util.Vector;
-
- import cybcerone.utils.Appletlike;
- import cybcerone.utils.SuperPanel;
- import cybcerone.utils.PaintableVector;
- import cybcerone.utils.Unite;
-
- /**
- * The panel for finding a room at BFSH2, the main building.
- */
- public class UnitePanel extends SuperPanel {
- public static final String id = "UnitePanel";
- public static final String imagePath = "unite/";
- public static final String dataPath = "unite/";
- private static final String statusText = "";
- private static final String dataFile = dataPath + "liste";
-
- private static UnitePaper thePaper;
- private static UniteKeypad theKeypad;
-
- public UnitePanel (Appletlike app) {
- super (id, statusText, app);
-
- add (thePaper = new UnitePaper (this));
- add (theKeypad = new UniteKeypad (this));
-
- getData (dataFile, new Unite (), this);
- }
-
- public void reset () {
- theKeypad.reset ();
- }
-
- /**
- * This is the name we want to search for.
- */
- protected void update (String name) {
- thePaper.update (name);
- }
-
- /**
- * This is the data for the paper.
- */
- protected void update (Vector data) {
- thePaper.setData (new PaintableVector (data));
- }
-
- /**
- * I want the keypad to accept keystrokes even when the mouse is
- * anywhere in the person screen.
- */
- public boolean keyDown (Event evt, int key) {
- return theKeypad.keyDown (evt, key);
- }
-
- /**
- * Ditto on the above.
- */
- public boolean keyUp (Event evt, int key) {
- return theKeypad.keyUp (evt, key);
- }
-
- }
-
-