home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-08-14 | 1.1 KB | 47 lines |
- // UnilButton.java
- // 19.03.96
- //
- // the UNIL button on the control panel
-
- package cybcerone.control;
-
- import java.awt.Rectangle;
-
- import cybcerone.utils.Appletlike;
- import cybcerone.utils.IdPanel;
-
- /**
- * The button to return to the main screen.
- */
- class UnilButton extends ControlButton {
- private static final Rectangle placement =
- new Rectangle (434, 0, 155, 100);
-
- private static final String id = "UnilButton";
- private static final String statusText = "Click to go Home";
-
- private static final String bgFile = imagePath + "home_lache.gif";
- private static final String pressedBgFile = imagePath + "home_presse.gif";
- private static final String disabledBgFile = imagePath + "home_disabled.gif";
-
- UnilButton (Appletlike app) {
- super (id, statusText, app);
- reshape (placement);
-
- setBackground (bgFile, 1);
- setPressedBg (pressedBgFile, 1);
- setDisabledBg (disabledBgFile, 0);
- }
-
- void update (String newPanelId) {
- if (newPanelId.equals (next))
- disable ();
- else
- enable ();
- }
-
- protected void doAction () {
- app.reset ();
- }
- }
-