home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.5 KB | 64 lines |
- // ManifPanel.java
- // 01.03.96
- //
- // the manifestations screen
-
- package cybcerone.manif;
-
- import java.util.Vector;
-
- import cybcerone.utils.Appletlike;
- import cybcerone.utils.SuperPanel;
- import cybcerone.utils.PaintableVector;
- import cybcerone.utils.Manif;
-
- /**
- * Access to events happening on campus.
- */
- public class ManifPanel extends SuperPanel {
- public static final String id = "manifPanel";
- public static final String imagePath = "manifestations/";
- public static final String dataPath = "events/";
- private static final String statusText = "";
- private static final String dataFile = dataPath + "live.online.events";
-
- private static ManifPaper thePaper;
- private static ManifKeypad theKeypad;
-
- public ManifPanel (Appletlike app) {
- super (id, statusText, app);
-
- add (thePaper = new ManifPaper (this));
- add (theKeypad = new ManifKeypad (this));
-
- getData (dataFile, new Manif (), this);
- }
-
- public void reset () {
- theKeypad.reset ();
- }
-
- public void update (Object updateVal) {
- if (updateVal instanceof Interval)
- update ((Interval)updateVal);
- else if (updateVal instanceof Fac)
- update ((Fac)updateVal);
- else
- super.update (updateVal);
- }
-
- /** Set the new interval */
- protected void update (Interval newInterval) {
- thePaper.update (newInterval);
- }
-
- protected void update (Fac newFac) {
- thePaper.update (newFac);
- }
-
- protected void update (Vector data) {
- thePaper.setData (new PaintableVector (data));
- }
-
- }
-