home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.9 KB | 85 lines |
- // FacultePanel.java
- // 01.03.96
- //
- // the faculte screen
-
- package cybcerone.faculte;
-
- import java.util.Vector;
-
- import cybcerone.utils.Appletlike;
- import cybcerone.utils.SuperPanel;
- import cybcerone.utils.PaintableVector;
- import cybcerone.utils.Faculte;
-
- /**
- * The facultes screen.
- */
- public class FacultePanel extends SuperPanel {
- public static final String id = "facultePanel";
- public static final String imagePath = "facultes/";
- public static final String dataPath = "facultes/";
- private static final String statusText = "";
- private static final String dataFile = dataPath + "listfac";
-
- private static final String nodeImageFile = imagePath + "folder.gif";
- private static final String leafImageFile = imagePath + "doc.gif";
-
- private static FacultePaper thePaper;
- private static FaculteKeypad theKeypad;
-
- public FacultePanel (Appletlike app) {
- super (id, statusText, app);
-
- add (thePaper = new FacultePaper (this));
- add (theKeypad = new FaculteKeypad (this));
-
- Faculte.setIconImages (getImage (leafImageFile, 1),
- getImage (nodeImageFile, 1));
-
- getData (dataFile, new Faculte (), this);
- }
-
- public void reset () {
- theKeypad.reset ();
- }
-
- /**
- * Extend the SuperPanel update command to handle Faculte objects.
- */
- /*
- public void update (Object updateVal) {
- if (updateVal instanceof Faculte)
- update ((Faculte)updateVal);
- else
- super.update (updateVal);
- }
- */
-
- /**
- * Show this faculte on my paper.
- */
- /*
- protected void update (Faculte theFaculte) {
- thePaper.update (theFaculte);
- }
- */
-
- /**
- * Show the faculte with this name on my paper.
- */
- protected void update (String faculteName) {
- thePaper.update (faculteName);
- }
-
- /**
- * My facultes are loaded at last! Let my paper know of this
- * joyous occasion.
- */
- protected void update (Vector data) {
- thePaper.setData (new PaintableVector (data));
- }
-
- }
-
-