home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.4 KB | 63 lines |
- // InitPanel.java
- // 25.03.96
- //
- // The screen during initialization
-
- package cybcerone.init;
-
- import java.awt.Image;
- import java.awt.Graphics;
- import java.util.Vector;
-
- import cybcerone.utils.Appletlike;
- import cybcerone.utils.SuperPanel;
-
- public class InitPanel extends SuperPanel {
- public static final String id = "init";
- public static final String imagePath = "init/";
-
- private static final String statusText = "Initializing...";
- private static final String logoFile = imagePath + "layout_init.gif";
- private static final String motdFile = "motd.txt";
-
- private Image logo;
-
- private Messages messagePanel;
- private MotdPanel theMotdPanel;
-
- /**
- * The panel that comes up during initialization.
- */
- public InitPanel (Appletlike app) {
- super (id, statusText, app);
-
- logo = getImage (logoFile, 0);
- add (theMotdPanel = new MotdPanel (this));
- add (messagePanel = new Messages (this));
-
- app.getData (motdFile, this);
- }
-
- /**
- * We've received a message to display.
- */
- public void update (String message) {
- messagePanel.update (message);
- }
-
- /**
- * Here's the lines in the message of the day file.
- */
- public void update (Vector motd) {
- theMotdPanel.update (motd);
- }
-
- public void paint (Graphics g) {
- super.paint (g);
- if (logo != null) {
- g.drawImage (logo, scale (137), scale (45), this);
- }
- }
-
- }
-