home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / samples.z / form1.wxf < prev    next >
Text File  |  1996-12-08  |  3KB  |  140 lines

  1. Save Format v1.3
  2. @begin Form "Form1"
  3.  Exported 0;
  4.  Abstract 0;
  5.  Interface 0;
  6.  PackageName "";
  7.  
  8.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__Applet"
  9.   Font "Dialog-Plain-8";
  10.   ControlScope "Private";
  11.   BackColor "Color.lightGray";
  12.   ForeColor "Color.black";
  13.   Text "Application";
  14.   Visible "1";
  15.   DataSource "NULL";
  16.   DataColumns "";
  17.   BoundControl "0";
  18.   @begin Event "Create"
  19.    GencodeSrcLine 72;
  20.    FunctionName "Form1_Create";
  21.   @end;
  22.   @begin UserFunction "Form1(powersoft.jcm.ui.AWTAppletEx applet)"
  23.    Compiler 1;
  24.    GencodeSrcLine 59;
  25.    FunctionName "Form1::Form1(powersoft.jcm.ui.AWTAppletEx applet)";
  26.   @end;
  27.   ResID 101;
  28.   DesignName Form1;
  29.   TabIndex 0;
  30.   DesignRect 131,158,341,192;
  31.  @end;
  32.  
  33.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__ListBox"
  34.   Font "<Inherited>";
  35.   Sort "0";
  36.   DataTrackRow "0";
  37.   DataBindAsLookup "0";
  38.   DataLookupSource "NULL";
  39.   DataLookupColumns "";
  40.   BackColor "Color.white";
  41.   ForeColor "Color.black";
  42.   ResizePercentages "[ 0 0 100 100 ]";
  43.   Text "";
  44.   Visible "1";
  45.   DataSource "NULL";
  46.   DataColumns "";
  47.   BoundControl "0";
  48.   ResID 100;
  49.   DesignName lb_systemProperties;
  50.   TabIndex 0;
  51.   DesignRect 5,20,326,150;
  52.  @end;
  53.  
  54.  @begin Object "WJava_powersoft__dot__jcm__dot__ui__dot__Label"
  55.   Font "<Inherited>";
  56.   BackColor "Color.lightGray";
  57.   ForeColor "Color.black";
  58.   Text "This demo reads the java.lang.System properties and displays them in the listbox below.";
  59.   Visible "1";
  60.   DataSource "NULL";
  61.   DataColumns "";
  62.   BoundControl "0";
  63.   ResID 101;
  64.   DesignName label_1;
  65.   TabIndex 1;
  66.   DesignRect 5,5,285,15;
  67.  @end;
  68.  
  69.  @begin HPPPrefixBlock
  70. @begin-code HPPPrefix
  71.  
  72. // add your custom import statements here
  73. import java.util.*;
  74.  
  75. @end-code;
  76.   GencodeSrcLine 13;
  77.  @end;
  78.  
  79.  @begin ClassContentsBlock
  80. @begin-code ClassContents
  81.  
  82.     // add your data members here
  83.     Properties _systemProperties;
  84.  
  85. @end-code;
  86.   GencodeSrcLine 99;
  87.  @end;
  88.  
  89. @begin-code BaseClassList
  90.  
  91. extends powersoft.jcm.ui.Applet
  92.  
  93. @end-code;
  94.  
  95. @begin-code GeneratedClassContents
  96.  
  97.  
  98. @end-code;
  99.  
  100. @begin-code Code "Form1::Form1(powersoft.jcm.ui.AWTAppletEx applet)"
  101.  
  102. //****************************
  103. /**
  104.  * This class displays the form and components.  It also
  105.  * handles the user generated events. 
  106.  */
  107.  
  108.     public @CLASSNAME@(powersoft.jcm.ui.AWTAppletEx applet)
  109.     {
  110.     //******************************
  111.  
  112.         super(applet);
  113.     }
  114.  
  115. @end-code;
  116.  
  117. @begin-code Code "Form1_Create"
  118.  
  119.     public boolean Form1_Create(powersoft.jcm.event.CreateEvent event)
  120.     //******************************
  121.     {
  122.         _systemProperties = System.getProperties();
  123.             
  124.         for ( Enumeration e = _systemProperties.propertyNames(); e.hasMoreElements(); ) 
  125.         {
  126.             String propertyName = new String( (String)e.nextElement() );
  127.                 
  128.             String propertyValue = 
  129.                 new String( _systemProperties.getProperty( propertyName ) );
  130.                 
  131.             lb_systemProperties.add( 
  132.                 "[ " + propertyName + " ]    " + propertyValue );
  133.         }
  134.         
  135.         return false;
  136.     }
  137.  
  138. @end-code;
  139. @end;
  140.