home *** CD-ROM | disk | FTP | other *** search
/ The Net: Ultimate Internet Guide / WWLCD1.ISO / pc / java / unuy2wen / cybcerone / main / tsolnumimages.java < prev    next >
Encoding:
Java Source  |  1996-08-14  |  1.1 KB  |  47 lines

  1. // TsolNumberImages.java
  2. // 18.03.96
  3. //
  4. // class to hold the numbers 0-9, as well as the minutes and seconds symbols
  5.  
  6. package cybcerone.main;
  7.  
  8. import java.awt.Image;
  9.  
  10. import cybcerone.utils.Appletlike;
  11. import cybcerone.utils.SuperPanel;
  12.  
  13. /**
  14.  * The images of the numbers used on the TsolPanel.
  15.  */
  16. public class TsolNumImages {
  17.   final public static int count = 12;
  18.  
  19.   private Image[] nums;
  20.   private Image minutes;
  21.   private Image seconds;
  22.  
  23.   // imagePath/#color.gif
  24.   // imagePath/dot_color.gif
  25.   // imagePath/dot2_color.gif
  26.   public TsolNumImages (String imagePath, String color, 
  27.             int priority, Appletlike app) {
  28.     nums = new Image[10];
  29.     
  30.     for (int i = 0; i < 10; i++) {
  31.       nums[i] = app.getImage (imagePath + i + color + ".gif", priority);
  32.     }
  33.  
  34.     minutes = app.getImage (imagePath + "dot_" + color + ".gif", priority);
  35.     seconds = app.getImage (imagePath + "dot2_" + color + ".gif", priority);
  36.   }
  37.  
  38.   public Image getDigit (int digit) {
  39.     return nums[digit];
  40.   }
  41.  
  42.   public Image getMinutes () { return minutes; }
  43.   public Image getSeconds () { return seconds; }
  44.  
  45. }
  46.  
  47.