home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 1998 August / Software of the Month Club 1998 August.iso / mac / Business / Wallaby / Java / LCDsmall / LCDsmall.java < prev    next >
Encoding:
Java Source  |  1998-06-03  |  15.0 KB  |  484 lines  |  [TEXT/CWIE]

  1. /*
  2.     LCD Display JAVA Applet
  3.     ===================
  4.     
  5.     ⌐ 1997 by Christoph Schaffhauser
  6.     chris@darkeagle.com
  7.     http://www.darkeagle.com/
  8.  
  9.     The only conditions are that you do not alter it, manipulate or deconstruct it and
  10.     if you want to use this applet in you homepage, you have to make a link from your homepage
  11.     to my homepage:   http://www.darkeagle.com/
  12.     
  13.     Thanks Chris
  14.     
  15.     B.T.W: I'm addicted to emails.... If you have some time write me a small note :-)
  16. */
  17.  
  18. import java.util.*;
  19. import java.awt.*;
  20. import java.applet.*;
  21. import java.awt.Font;
  22. import java.awt.Graphics;
  23.  
  24. public class LCD extends Applet  implements Runnable {
  25.     
  26.     int Offset,index,StringNum,ScrollStateEnd,ScrollStateStart,Speed;
  27.     String str,xstr;
  28.     char separated[];
  29.     char separated2[];
  30.     Thread killme = null;
  31.     boolean firsttime,notdraw,ScrollIn;
  32.     Color textColor;
  33.     
  34.     Image buffer,buffer2;
  35.     Dimension buffersize;
  36.     Dimension buffersize2;
  37.     Graphics bu,bu2;
  38.  
  39.  
  40.     Color white        = new Color(255,255,255);
  41.     Color gray        = new Color(166,166,166);
  42.     Color lightgray        = new Color(240,240,240);
  43.     Color darkgray        = new Color(207,207,207);
  44.     Color middlegray    = new Color(222,222,222);
  45.     Color darkgreen    = new Color(  10,43,  10);
  46.     Color black        = new Color(  0,0, 0);
  47.     Color yellow        = new Color(  255,255, 0);
  48.     Color green        = new Color(  0,255, 0);
  49.     Color orange        = new Color(  255,128, 0);
  50.     Color red            = new Color(  255,63, 63);
  51.     Color blue            = new Color(  63,63, 255);
  52.  
  53.     boolean    A[] = new boolean[54];
  54.     boolean    B[] = new boolean[54];
  55.     boolean    C[] = new boolean[54];
  56.     boolean    D[] = new boolean[54];
  57.     boolean    E[] = new boolean[54];
  58.     boolean    F[] = new boolean[54];
  59.     boolean    G[] = new boolean[54];
  60.     boolean    H[] = new boolean[54];
  61.     boolean    I[] = new boolean[54];
  62.     boolean    J[] = new boolean[54];
  63.     boolean    K[] = new boolean[54];
  64.     boolean    L[] = new boolean[54];
  65.     boolean    M[] = new boolean[54];
  66.     boolean    N[] = new boolean[54];
  67.     boolean    O[] = new boolean[54];
  68.     boolean    P[] = new boolean[54];
  69.     boolean    Q[] = new boolean[54];
  70.     boolean    R[] = new boolean[54];
  71.     boolean    S[] = new boolean[54];
  72.     boolean    T[] = new boolean[54];
  73.     boolean    U[] = new boolean[54];
  74.     boolean    V[] = new boolean[54];
  75.     boolean    W[] = new boolean[54];
  76.     boolean    X[] = new boolean[54];
  77.     boolean    Y[] = new boolean[54];
  78.     boolean    Z[] = new boolean[54];
  79.     
  80.     boolean    ONE[] = new boolean[54];
  81.     boolean    TWO[] = new boolean[54];
  82.     boolean    THREE[] = new boolean[54];
  83.     boolean    FOUR[] = new boolean[54];
  84.     boolean    FIVE[] = new boolean[54];
  85.     boolean    SIX[] = new boolean[54];
  86.     boolean    SEVEN[] = new boolean[54];
  87.     boolean    EIGTH[] = new boolean[54];
  88.     boolean    NINE[] = new boolean[54];
  89.     boolean    ZERO[] = new boolean[54];
  90.  
  91.     boolean    STAR[] = new boolean[54];
  92.     boolean    POINT[] = new boolean[54];
  93.     
  94.      public String getAppletInfo() {
  95.         return "LCD Display by Christoph Schaffhauser";
  96.         }
  97.         
  98.     public void DrawLCDString(Graphics g, String str) {
  99.     int i,x,y,ff;
  100.     String Colors;
  101.     Dimension d = size(); // of the canvas!
  102.  
  103.         separated =  new char [str.length()];
  104.         
  105.         
  106.         str.getChars(0,str.length(),separated,0);
  107.         y=0;
  108.         if (ScrollStateEnd<0)
  109.         y=-(ScrollStateEnd);
  110.         
  111.         xstr = getParameter("MODE");
  112.         ff = (xstr == null) ? 16 : Integer.valueOf(xstr).intValue();
  113.         if (ff == 1) x=((d.width-10)/18)-ScrollStateEnd+1;
  114.         else x=((d.width-10)/12)-ScrollStateEnd+1;
  115.         
  116.         if (x > str.length())
  117.             x=str.length();
  118.  
  119.         Colors = getParameter("COLOR"+ index);
  120.         separated2 =  new char [Colors.length()];
  121.         Colors.getChars(0,Colors.length(),separated2,0);
  122.         
  123.         for (i=y;i<x-1;i++){
  124.             if (separated2[i] == 'r') textColor=red;
  125.             if (separated2[i] == 'g') textColor=green;
  126.             if (separated2[i] == 'o') textColor=orange;
  127.             if (separated2[i] == 'y') textColor=yellow;
  128.             if (separated2[i] == 'b') textColor=blue;
  129.             if (separated2[i] == 'w') textColor=white;
  130.             if (separated[i] == ' ') Offset += 6;
  131.             
  132.             if (separated[i] == '1') DrawLCDChar(g, textColor,ONE);
  133.             if (separated[i] == '2') DrawLCDChar(g, textColor,TWO);
  134.             if (separated[i] == '3') DrawLCDChar(g, textColor,THREE);
  135.             if (separated[i] == '4') DrawLCDChar(g, textColor,FOUR);
  136.             if (separated[i] == '5') DrawLCDChar(g, textColor,FIVE);
  137.             if (separated[i] == '6') DrawLCDChar(g, textColor,SIX);
  138.             if (separated[i] == '7') DrawLCDChar(g, textColor,SEVEN);
  139.             if (separated[i] == '8') DrawLCDChar(g, textColor,EIGTH);
  140.             if (separated[i] == '9') DrawLCDChar(g, textColor,NINE);
  141.             if (separated[i] == '0') DrawLCDChar(g, textColor,ZERO);
  142.             
  143.             if (separated[i] == '.') DrawLCDChar(g, textColor,POINT);
  144.             if (separated[i] == '*') DrawLCDChar(g, textColor,STAR);
  145.             if (separated[i] == 'A') DrawLCDChar(g, textColor,A);
  146.             if (separated[i] == 'B') DrawLCDChar(g, textColor,B);
  147.             if (separated[i] == 'C') DrawLCDChar(g, textColor,C);
  148.             if (separated[i] == 'D') DrawLCDChar(g, textColor,D);
  149.             if (separated[i] == 'E') DrawLCDChar(g, textColor,E);
  150.             if (separated[i] == 'F') DrawLCDChar(g, textColor,F);
  151.             if (separated[i] == 'G') DrawLCDChar(g, textColor,G);
  152.             if (separated[i] == 'H') DrawLCDChar(g, textColor,H);
  153.             if (separated[i] == 'I') DrawLCDChar(g, textColor,I);
  154.             if (separated[i] == 'J') DrawLCDChar(g, textColor,J);
  155.             if (separated[i] == 'K') DrawLCDChar(g, textColor,K);
  156.             if (separated[i] == 'L') DrawLCDChar(g, textColor,L);
  157.             if (separated[i] == 'M') DrawLCDChar(g, textColor,M);
  158.             if (separated[i] == 'N') DrawLCDChar(g, textColor,N);
  159.             if (separated[i] == 'O') DrawLCDChar(g, textColor,O);
  160.             if (separated[i] == 'P') DrawLCDChar(g, textColor,P);
  161.             if (separated[i] == 'Q') DrawLCDChar(g, textColor,Q);
  162.             if (separated[i] == 'R') DrawLCDChar(g, textColor,R);
  163.             if (separated[i] == 'S') DrawLCDChar(g, textColor,S);
  164.             if (separated[i] == 'T') DrawLCDChar(g, textColor,T);
  165.             if (separated[i] == 'U') DrawLCDChar(g, textColor,U);
  166.             if (separated[i] == 'V') DrawLCDChar(g, textColor,V);
  167.             if (separated[i] == 'W') DrawLCDChar(g, textColor,W);
  168.             if (separated[i] == 'X') DrawLCDChar(g, textColor,X);
  169.             if (separated[i] == 'Y') DrawLCDChar(g, textColor,Y);
  170.             if (separated[i] == 'Z') DrawLCDChar(g, textColor,Z);
  171.         }
  172.     }
  173.     
  174.  
  175.     /*public void internetat(Graphics g, Color theColor) {
  176.     int i;
  177.         g.setColor(theColor);
  178.         
  179.         for (i=0;i<=4;i++){
  180.             drawYellowDot(g,0+Offset,i+2);
  181.             if (i<3) {
  182.                 drawYellowDot(g,4+Offset,2+i);
  183.                 drawYellowDot(g,1+i+Offset,1);
  184.                 drawYellowDot(g,1+i+Offset,5);
  185.                 drawYellowDot(g,1+i+Offset,7);
  186.                 drawYellowDot(g,0+i+Offset,3);
  187.                 drawYellowDot(g,2+Offset,i+3);
  188.             }
  189.         };
  190.         Offset += 6;
  191.     }*/
  192.     
  193.     public void DrawLCDChar(Graphics g, Color theColor,boolean Chars[]) {
  194.     int i,j,k,x;
  195.     byte f;
  196.         g.setColor(theColor);
  197.         x=0;
  198.         for (i=0;i<=8;i++){
  199.             for (j=0;j<=5;j++){
  200.                 if (Chars[x]) drawYellowDot(g,j+Offset,i);
  201.                 x+=1;
  202.             }
  203.         }
  204.         Offset += 6;
  205.     }
  206.  
  207.     public void init()
  208.     {
  209.         String at;
  210.         int x,j,i,ff,addition;
  211.         
  212.         for (j=0;j<=8;j++){
  213.             A[j*6+4]  = A[j*6]  = B[j*6]  = C[j*6]  = D[j*6]  = E[j*6]  = F[j*6]  = G[j*6]  = H[j*6]  = H[j*6+4] =  I[j*6+2] =
  214.             J[j*6+4] = K[j*6] = L[j*6] = M[j*6] = M[j*6+4] = N[j*6] = N[j*6+4]  = O[j*6] = O[j*6+4] =
  215.             P[j*6] = Q[j*6+4] = R[j*6] = T[j*6+2] =  T[j*6+2] = U[j*6]  = U[j*6+4]  = V[j*6]  =
  216.             V[j*6+4] = W[j*6]  = W[j*6+4]  = ONE[j*6+3]  = true;
  217.         }
  218.         for (j=1;j<=3;j++)
  219.         {
  220.             B[j] = B[j+24] = B[j+48] = E[j+48] = G[j+48] = C[j+1] = C[j+49] = G[j+25] = H[j+24] = 
  221.             J[j+48] = N[j*6+14] = P[j] = P[j+24] = P[j*6+4] = Q[j] = Q[j+24] = Q[j*6] = R[j] =
  222.             R[j+24] = R[j*6+4] = S[j*6] = A[30+j] = STAR[j+18] = STAR[j+30] = TWO[j+6]  = TWO[j*6+10] =
  223.             THREE[j+6] = THREE[j+48] = FIVE[24+j] = FIVE[48+j] = FIVE[j*6+28] = FIVE[j*6+6] = SIX[24+j] =
  224.             SIX[48+j] = SIX[j*6+28] = SIX[j*6+24] = EIGTH[24+j] = EIGTH[48+j] = EIGTH[j*6+28] = EIGTH[j*6+24] =
  225.             EIGTH[j+6] = NINE[j+6] = NINE[j+24] = NINE[j+48] = true;
  226.         }    
  227.         for (j=0;j<=4;j++)
  228.         {
  229.             Z[j+8*6] = Z[j] =T[j] = I[j] = I[j+8*6] =  E[j] = F[j]  =G[j] =J[j] = L[j+8*6] = O[j] =
  230.             O[j+48] = U[j+8*6] = S[j] = S[j+8*6] = STAR[j+24] = TWO[j+8*6] = FOUR[j+5*6] = FOUR[j*6+27] =
  231.             FOUR[j*6+6]  = FIVE[6+j]  = SEVEN[6+j] = NINE[j*6+22] = true;
  232.         }    
  233.         
  234.         C[0] = C[6] = C[42] = C[48] = J[52] = O[0] = O[4] = O[48] = O[52] = U[48] = U[52] =
  235.         S[0] = S[52] = V[42] = V[48] = V[46] = V[52] = W[48] = W[52] = A[0] = A[4] = A[6] = A[10] =
  236.         G[0]  = G[48]  = STAR[26]  = ONE[3]  = false;
  237.         
  238.         X[0] = X[4] = X[6] = X[10] = X[13]  = X[15] = X[19] = X[21] = X[26] = true;
  239.         for (j=0;j<=53;j++) {
  240.             Y[j] = X[j];
  241.             ZERO[j] = O[j];
  242.         }
  243.         for (j=0;j<=4;j++)
  244.             Y[j*6+2+24] = true;
  245.         ZERO[1] = ZERO[2] = ZERO[3] = ZERO[6] = ZERO[10] = false;
  246.         
  247.         
  248.         X[31] = X[33] = X[37] = X[39] = X[42]  = X[46] = X[48] = X[52] = Z[10] = Z[15] = Z[21] =
  249.         Z[26] = Z[31]  = Z[37] = Z[42] = A[2] = A[7]  = A[9] = S[25] = S[26] = S[33] = S[40] = S[46] =
  250.         W[44] = W[49] = W[51] = V[43] = V[50] = V[45] = J[42] = C[7] = C[43] = M[7] = M[9] = M[14] =
  251.         R[31] = R[38] = R[45] = R[52] = N[13] = N[39] = K[4] = K[10] = K[15] = K[20] = K[25] = K[32] =
  252.         K[39] = K[46] = K[52] = E[52] = F[25] = E[25] = F[26] = E[26] = G[34]  = G[40]  = G[46]  =
  253.         STAR[12]  = STAR[14]  = STAR[16]  = STAR[36]  = STAR[38]  = STAR[40]  = ZERO[7] = ZERO[8] =
  254.         ZERO[9] = D[1] = D[2] = D[9] = D[16] = D[22] = D[28] = D[34] = D[40] = D[45] = D[49] = D[50] =
  255.         B[10] = B[16] = B[22] = B[34] = B[40] = B[46] = POINT[43]  = POINT[44]  = POINT[49]  = POINT[50]  =
  256.         ONE[24]  = ONE[19]  = ONE[14]  = ONE[50]  = ONE[52]  = TWO[43]  = TWO[38]  = TWO[33]  = TWO[12] =
  257.         SEVEN[16] = SEVEN[22] = SEVEN[27] = SEVEN[33] = SEVEN[38] = SEVEN[44] = SEVEN[49] = 
  258.         THREE[12] = THREE[16] = THREE[22] = THREE[27] = THREE[33] = THREE[40] = THREE[46] = THREE[42] =
  259.         FIVE[42] =SIX[24] = SIX[19] = SIX[14] = SIX[9] = EIGTH[12] = EIGTH[16] = EIGTH[18] = EIGTH[22] =
  260.         NINE[12] = NINE[16] = NINE[18] = NINE[42] = true;
  261.         
  262.         
  263.         
  264.         /*boolean    ONE[] = new boolean[54];
  265.         boolean    TWO[] = new boolean[54];
  266.         boolean    THREE[] = new boolean[54];
  267.         boolean    FOUR[] = new boolean[54];
  268.         boolean    FIVE[] = new boolean[54];
  269.         boolean    SIX[] = new boolean[54];
  270.         boolean    SEVEN[] = new boolean[54];
  271.         boolean    EIGTH[] = new boolean[54];
  272.         boolean    NINE[] = new boolean[54];*/
  273.         
  274.         
  275.         Dimension d = size(); // of the canvas!
  276.         if ((buffer2 == null) ||
  277.                     (d.width != buffersize2.width) ||
  278.                     (d.height != buffersize2.height)) {
  279.                 buffer2 = createImage(d.width, d.height);
  280.                 buffersize2 = d;
  281.                   
  282.                  bu2 = buffer2.getGraphics();
  283.             }
  284.             
  285.             xstr = getParameter("MODE");
  286.             ff = (xstr == null) ? 16 : Integer.valueOf(xstr).intValue();
  287.             if (ff == 1) addition = 11;
  288.             else  addition = 0;
  289.         
  290.             bu2.setColor(black);
  291.             bu2.fillRect(5,5,d.width-10,30);
  292.             bu2.drawLine(0,0,d.width-1,0);
  293.             bu2.drawLine(d.width-1,0,d.width-1,28+addition);
  294.             bu2.drawLine(d.width-1,28+addition,0,28+addition);
  295.             bu2.drawLine(0,28+addition,0,0);
  296.             //White drawing
  297.             bu2.setColor(white);
  298.             bu2.drawLine(4,24+addition,d.width-5,24+addition);
  299.             bu2.drawLine(d.width-5,24+addition,d.width-5,4);
  300.             bu2.drawLine(1,27+addition,1,1);
  301.             bu2.drawLine(1,1,d.width-2,1);
  302.             //Gray drawing
  303.             bu2.setColor(gray);
  304.             bu2.drawLine(d.width-6,4,4,4);
  305.             bu2.drawLine(4,4,4,23+addition);
  306.             bu2.drawLine(d.width-2,1,d.width-2,27+addition);
  307.             bu2.drawLine(d.width-2,27+addition,1,27+addition);
  308.             //Light gray drawing
  309.             bu2.setColor(lightgray);
  310.             bu2.drawLine(2,26+addition,2,2);
  311.             bu2.drawLine(2,2,d.width-3,2);
  312.             //Dark gray drawing
  313.             bu2.setColor(darkgray);
  314.             bu2.drawLine(d.width-3,2,d.width-3,26+addition);
  315.             bu2.drawLine(d.width-3,26+addition,2,26+addition);
  316.             //Middle gray drawing
  317.             bu2.setColor(middlegray);
  318.             bu2.drawLine(3,25+addition,3,3);
  319.             bu2.drawLine(3,3,d.width-4,3);
  320.             bu2.drawLine(d.width-4,3,d.width-4,25+addition);
  321.             bu2.drawLine(d.width-4,25+addition,3,25+addition);
  322.             //Green Dots
  323.             bu2.setColor(darkgreen);
  324.             if (ff == 1) {
  325.                 for (j=0;j<=(d.width-12)/3;j++){
  326.                     for (i=0;i<=8;i++){
  327.                         bu2.fillRect(6+j*3,7+i*3,2,2);
  328.                     }
  329.                 }
  330.             }
  331.             else {
  332.                 for (j=0;j<=(d.width-12)/2;j++){
  333.                     for (i=0;i<=8;i++){
  334.                         bu2.fillRect(6+j*2,6+i*2,1,1);
  335.                     }
  336.                 }
  337.             }        
  338.         index=1;
  339.         at = getParameter("NUM");
  340.         StringNum = (at == null) ? 16 : Integer.valueOf(at).intValue();
  341.         StringNum = StringNum+1;
  342.         at = getParameter("SPEED");
  343.         Speed = (at == null) ? 16 : Integer.valueOf(at).intValue();
  344.         Offset = 0;
  345.             //if (!DontDraw){
  346.             //    g.drawImage(picture[0], 0,0, this);
  347.             //}
  348.             //DontDraw = false;
  349.             //firsttime=false;
  350.             //Black drawing
  351.         
  352.         
  353.         
  354.             
  355.             
  356.         index=1;
  357.             ScrollIn=true;
  358.             str = getParameter("TEXT"+ index);
  359.             ScrollStateEnd=18;
  360.             ScrollStateStart=str.length();
  361.             notdraw = true;
  362.             Offset=ScrollStateEnd*6;
  363.             firsttime=true;
  364.         //DontDraw = false;
  365.         //picture[0] = getImage (getCodeBase(), "../images/LCD.gif");
  366.     }
  367.     
  368.     public void drawYellowDot(Graphics g,int x,int y) {
  369.         int ff;
  370.         xstr = getParameter("MODE");        
  371.         ff = (xstr == null) ? 16 : Integer.valueOf(xstr).intValue();
  372.         if (ff == 1) g.fillRect(6+x*3,7+y*3,2,2);
  373.         else g.fillRect(6+x*2,6+y*2,1,1);
  374.     }
  375.  
  376.     public void paint (Graphics g)
  377.     {        
  378.         int i,j,ff;
  379.         int x;
  380.                 Dimension d = size(); // of the canvas!
  381.         // create the buffer if it does not yet exist:
  382.             if ((buffer == null) ||
  383.                 (d.width != buffersize.width) ||
  384.                 (d.height != buffersize.height)) {
  385.             buffer = createImage(d.width, d.height);
  386.             buffersize = d;
  387.             bu = buffer.getGraphics();
  388.             }
  389.             bu.drawImage(buffer2,0,0,null);            
  390.             g.drawImage(buffer,0,0,null);
  391.             index=1;
  392.             ScrollIn=true;
  393.             str = getParameter("TEXT"+ index);
  394.             xstr = getParameter("MODE");
  395.             ff = (xstr == null) ? 16 : Integer.valueOf(xstr).intValue();
  396.             if (ff == 1) ScrollStateEnd=((d.width-10)/18)+1;
  397.             else  ScrollStateEnd=(d.width-10)/12+1;
  398.             ScrollStateStart=str.length();
  399.             notdraw = true;
  400.             Offset=ScrollStateEnd*6;
  401.             firsttime=true;
  402.     }
  403.  
  404.     public boolean mouseUp (Event evt, int x, int y)
  405.     {
  406.         /*int i;
  407.         index += 1;
  408.         if (index == StringNum+1)
  409.             index =1;
  410.         repaint();*/
  411.         return true;
  412.     }
  413.     
  414.     public void start() {
  415.     if(killme == null) 
  416.     {
  417.         killme = new Thread(this);
  418.         killme.start();
  419.     }
  420.      }
  421.  
  422.     public void stop() {
  423.         killme = null;
  424.      }
  425.  
  426.     public void run() {
  427.         int x,j,i,Nummer,ff;
  428.         Graphics g = getGraphics();
  429.         String colorstr;
  430.         
  431.         Dimension d = size(); // of the canvas!
  432.         // create the buffer if it does not yet exist:
  433.             if ((buffer == null) ||
  434.                 (d.width != buffersize.width) ||
  435.                 (d.height != buffersize.height)) {
  436.             buffer = createImage(d.width, d.height);
  437.             buffersize = d;
  438.             bu = buffer.getGraphics();
  439.             }
  440.         
  441.         if ((buffer2 == null) ||
  442.                     (d.width != buffersize2.width) ||
  443.                     (d.height != buffersize2.height)) {
  444.                 buffer2 = createImage(d.width, d.height);
  445.                 buffersize2 = d;
  446.                   
  447.                  bu2 = buffer2.getGraphics();
  448.             }
  449.         
  450.         while (killme != null) {
  451.         try {Thread.sleep(Speed*10);} catch (InterruptedException e){}
  452.         
  453.         //if (index==0) index = 1;
  454.         str = getParameter("TEXT"+ index);
  455.         
  456.         if (str.length() == -ScrollStateEnd-1){
  457.             index += 1;
  458.             if (index >= StringNum)
  459.                 index =1;
  460.             str = getParameter("TEXT"+ index);
  461.             xstr = getParameter("MODE");
  462.             ff = (xstr == null) ? 16 : Integer.valueOf(xstr).intValue();
  463.             if (ff == 1) ScrollStateEnd=((d.width-10)/17)+1;
  464.             else  ScrollStateEnd=(d.width-10)/12+1;
  465.             
  466.             ScrollStateStart=str.length();
  467.             notdraw = true;
  468.         }
  469.         bu.drawImage(buffer2,0,0,null);
  470.         
  471.         firsttime=false;
  472.         Offset=ScrollStateEnd*6;
  473.         if (Offset<0) Offset=0;
  474.         DrawLCDString(bu, str);
  475.         g.drawImage(buffer,0,0,null);
  476.         
  477.         ScrollStateEnd-=1;
  478.         }
  479.         killme = null;
  480.      }
  481.      
  482.      
  483.      
  484. }