home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / samples.z / form1.wxf < prev    next >
Text File  |  1997-01-28  |  3KB  |  142 lines

  1. Save Format v2.0(1)
  2. @begin Form "Form1"
  3.  Exported 0;
  4.  Abstract 0;
  5.  Interface 0;
  6.  PackageName "";
  7.  
  8.  @begin Object "powersoft.jcm.ui.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 "powersoft.jcm.event.Create"
  19.    GencodeSrcLine 73;
  20.    FunctionName "Form1_Create";
  21.   @end;
  22.   @begin UserFunction "Form1(powersoft.jcm.ui.AWTAppletEx applet)"
  23.    Compiler 1;
  24.    GencodeSrcLine 60;
  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 "powersoft.jcm.ui.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.   @begin ComponentData "lb_systemProperties"
  53.   @end;
  54.  @end;
  55.  
  56.  @begin Object "powersoft.jcm.ui.Label"
  57.   Font "<Inherited>";
  58.   BackColor "Color.lightGray";
  59.   ForeColor "Color.black";
  60.   Text "This demo reads the java.lang.System properties and displays them in the listbox below.";
  61.   Visible "1";
  62.   DataSource "NULL";
  63.   DataColumns "";
  64.   BoundControl "0";
  65.   ResID 101;
  66.   DesignName label_1;
  67.   TabIndex 1;
  68.   DesignRect 5,5,285,15;
  69.  @end;
  70.  
  71.  @begin HPPPrefixBlock
  72. @begin-code HPPPrefix
  73.  
  74. // add your custom import statements here
  75. import java.util.*;
  76.  
  77. @end-code;
  78.   GencodeSrcLine 13;
  79.  @end;
  80.  
  81.  @begin ClassContentsBlock
  82. @begin-code ClassContents
  83.  
  84.     // add your data members here
  85.     Properties _systemProperties;
  86.  
  87. @end-code;
  88.   GencodeSrcLine 100;
  89.  @end;
  90.  
  91. @begin-code BaseClassList
  92.  
  93. extends powersoft.jcm.ui.Applet
  94.  
  95. @end-code;
  96.  
  97. @begin-code GeneratedClassContents
  98.  
  99.  
  100. @end-code;
  101.  
  102. @begin-code Code "Form1::Form1(powersoft.jcm.ui.AWTAppletEx applet)"
  103.  
  104. //****************************
  105. /**
  106.  * This class displays the form and components.  It also
  107.  * handles the user generated events. 
  108.  */
  109.  
  110.     public @CLASSNAME@(powersoft.jcm.ui.AWTAppletEx applet)
  111.     {
  112.     //******************************
  113.  
  114.         super(applet);
  115.     }
  116.  
  117. @end-code;
  118.  
  119. @begin-code Code "Form1_Create"
  120.  
  121.     public boolean Form1_Create(powersoft.jcm.event.CreateEvent event)
  122.     //******************************
  123.     {
  124.         _systemProperties = System.getProperties();
  125.  
  126.         for ( Enumeration e = _systemProperties.propertyNames(); e.hasMoreElements(); ) 
  127.         {
  128.             String propertyName = new String( (String)e.nextElement() );
  129.  
  130.             String propertyValue = 
  131.                 new String( _systemProperties.getProperty( propertyName ) );
  132.  
  133.             lb_systemProperties.add( 
  134.                 "[ " + propertyName + " ]    " + propertyValue );
  135.         }
  136.  
  137.         return false;
  138.     }
  139.  
  140. @end-code;
  141. @end;
  142.