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  |  7KB  |  358 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 "Helvetica-Plain-10";
  10.   ControlScope "Private";
  11.   BackColor "Color.lightGray";
  12.   ForeColor "Color.black";
  13.   Text "Check Box Sample";
  14.   Visible "1";
  15.   DataSource "NULL";
  16.   DataColumns "";
  17.   BoundControl "0";
  18.   @begin Event "powersoft.jcm.event.Create"
  19.    GencodeSrcLine 139;
  20.    FunctionName "Form1_Create";
  21.   @end;
  22.   @begin UserFunction "Form2(powersoft.jcm.ui.AWTAppletEx applet)"
  23.    Compiler 1;
  24.    GencodeSrcLine 109;
  25.    FunctionName "Form1::Form2(powersoft.jcm.ui.AWTAppletEx applet)";
  26.   @end;
  27.   @begin UserFunction "Init()"
  28.    Compiler 1;
  29.    GencodeSrcLine 114;
  30.    FunctionName "Form1::Init()";
  31.   @end;
  32.   @begin UserFunction "Start()"
  33.    Compiler 1;
  34.    GencodeSrcLine 119;
  35.    FunctionName "Form1::Start()";
  36.   @end;
  37.   @begin UserFunction "Stop()"
  38.    Compiler 1;
  39.    GencodeSrcLine 124;
  40.    FunctionName "Form1::Stop()";
  41.   @end;
  42.   @begin UserFunction "Destroy()"
  43.    Compiler 1;
  44.    GencodeSrcLine 104;
  45.    FunctionName "Form1::Destroy()";
  46.   @end;
  47.   @begin UserFunction "updateCheckBoxState( )"
  48.    Private 1;
  49.    GencodeSrcLine 129;
  50.    FunctionName "Form1::updateCheckBoxState( )";
  51.   @end;
  52.   @begin UserFunction "Prototype for updateCheckBoxState( )"
  53.    Private 1;
  54.    GencodeSrcLine -1;
  55.    FunctionName "Form1::Prototype for updateCheckBoxState( )";
  56.   @end;
  57.   ResID 102;
  58.   DesignName Form1;
  59.   TabIndex 0;
  60.   DesignRect 67,125,186,113;
  61.  @end;
  62.  
  63.  @begin Object "powersoft.jcm.ui.CheckBox"
  64.   Font "<Inherited>";
  65.   Checked "0";
  66.   DataValueChecked "";
  67.   DataValueUnchecked "";
  68.   BackColor "Color.lightGray";
  69.   ForeColor "Color.black";
  70.   Text "C++";
  71.   Visible "1";
  72.   DataSource "NULL";
  73.   DataColumns "";
  74.   BoundControl "0";
  75.   ResID 101;
  76.   DesignName checkbox_cplusplus;
  77.   TabIndex 0;
  78.   DesignRect 15,20,34,8;
  79.  @end;
  80.  
  81.  @begin Object "powersoft.jcm.ui.CheckBox"
  82.   Font "<Inherited>";
  83.   Checked "0";
  84.   DataValueChecked "";
  85.   DataValueUnchecked "";
  86.   BackColor "Color.lightGray";
  87.   ForeColor "Color.black";
  88.   Text "PowerBuilder";
  89.   Visible "1";
  90.   DataSource "NULL";
  91.   DataColumns "";
  92.   BoundControl "0";
  93.   ResID 102;
  94.   DesignName checkbox_powerbuilder;
  95.   TabIndex 1;
  96.   DesignRect 15,35,70,10;
  97.  @end;
  98.  
  99.  @begin Object "powersoft.jcm.ui.CheckBox"
  100.   Font "<Inherited>";
  101.   Checked "0";
  102.   DataValueChecked "";
  103.   DataValueUnchecked "";
  104.   BackColor "Color.lightGray";
  105.   ForeColor "Color.black";
  106.   Text "Java";
  107.   Visible "1";
  108.   DataSource "NULL";
  109.   DataColumns "";
  110.   BoundControl "0";
  111.   ResID 103;
  112.   DesignName checkbox_java;
  113.   TabIndex 2;
  114.   DesignRect 15,50,34,8;
  115.  @end;
  116.  
  117.  @begin Object "powersoft.jcm.ui.CommandButton"
  118.   Font "<Inherited>";
  119.   BackColor "[ 216 208 184 ]";
  120.   ForeColor "Color.black";
  121.   Text "Get Skills";
  122.   Visible "1";
  123.   DataSource "NULL";
  124.   DataColumns "";
  125.   BoundControl "0";
  126.   @begin Event "powersoft.jcm.event.Click"
  127.    GencodeSrcLine 146;
  128.    FunctionName "cb_getSkills_Click";
  129.   @end;
  130.   ResID 104;
  131.   DesignName cb_getSkills;
  132.   TabIndex 3;
  133.   DesignRect 100,15,65,12;
  134.  @end;
  135.  
  136.  @begin Object "powersoft.jcm.ui.ListBox"
  137.   Font "<Inherited>";
  138.   Sort "0";
  139.   DataTrackRow "0";
  140.   DataBindAsLookup "0";
  141.   DataLookupSource "NULL";
  142.   DataLookupColumns "";
  143.   BackColor "Color.white";
  144.   ForeColor "Color.black";
  145.   Text "";
  146.   Visible "1";
  147.   DataSource "NULL";
  148.   DataColumns "";
  149.   BoundControl "0";
  150.   ResID 105;
  151.   DesignName lb_skills;
  152.   TabIndex 4;
  153.   DesignRect 100,30,65,35;
  154.   @begin ComponentData "lb_skills"
  155.   @end;
  156.  @end;
  157.  
  158.  @begin Object "powersoft.jcm.ui.GroupBox"
  159.   Font "<Inherited>";
  160.   ControlScope "Private";
  161.   BackColor "Color.lightGray";
  162.   ForeColor "Color.black";
  163.   Text "Programmers Skills";
  164.   Visible "1";
  165.   DataSource "NULL";
  166.   DataColumns "";
  167.   BoundControl "0";
  168.   ResID 100;
  169.   DesignName groupb_skills;
  170.   TabIndex 5;
  171.   DesignRect 5,5,170,65;
  172.  @end;
  173.  
  174.  @begin Object "powersoft.jcm.ui.TextBox"
  175.   Font "<Inherited>";
  176.   PasswordCharacter "0";
  177.   BackColor "Color.lightGray";
  178.   ForeColor "Color.black";
  179.   Text "";
  180.   Visible "1";
  181.   DataSource "NULL";
  182.   DataColumns "";
  183.   BoundControl "0";
  184.   ResID 100;
  185.   DesignName textb_checkBoxState;
  186.   TabIndex 6;
  187.   DesignRect 100,80,65,12;
  188.  @end;
  189.  
  190.  @begin Object "powersoft.jcm.ui.CheckBox"
  191.   Font "<Inherited>";
  192.   Checked "0";
  193.   DataValueChecked "";
  194.   DataValueUnchecked "";
  195.   BackColor "Color.lightGray";
  196.   ForeColor "Color.black";
  197.   Text "Check Box";
  198.   Visible "1";
  199.   DataSource "NULL";
  200.   DataColumns "";
  201.   BoundControl "0";
  202.   @begin Event "powersoft.jcm.event.Click"
  203.    GencodeSrcLine 163;
  204.    FunctionName "checkbox_state_Click";
  205.   @end;
  206.   ResID 100;
  207.   DesignName checkbox_state;
  208.   TabIndex 7;
  209.   DesignRect 15,80,55,10;
  210.  @end;
  211.  
  212.  @begin HPPPrefixBlock
  213. @begin-code HPPPrefix
  214.  
  215. // add your custom import statements here
  216.  
  217. @end-code;
  218.   GencodeSrcLine 16;
  219.  @end;
  220.  
  221.  @begin CPPPrefixBlock
  222. @begin-code CPPPrefix
  223.  
  224.  
  225. @end-code;
  226.   GencodeSrcLine 16;
  227.  @end;
  228.  
  229.  @begin ClassContentsBlock
  230. @begin-code ClassContents
  231.  
  232.     // add your data members here
  233.  
  234. @end-code;
  235.   GencodeSrcLine 184;
  236.  @end;
  237.  
  238. @begin-code BaseClassList
  239.  
  240. extends powersoft.jcm.ui.Applet
  241.  
  242. @end-code;
  243.  
  244. @begin-code GeneratedClassContents
  245.  
  246.  
  247. @end-code;
  248.  
  249. @begin-code Code "Form1::Form2(powersoft.jcm.ui.AWTAppletEx applet)"
  250.  
  251.     public @CLASSNAME@(powersoft.jcm.ui.AWTAppletEx applet)
  252.     {
  253.         super(applet);
  254.     }
  255.  
  256. @end-code;
  257.  
  258. @begin-code Code "Form1::Init()"
  259.  
  260.     public void Init()
  261.     {
  262.  
  263.     }
  264.  
  265. @end-code;
  266.  
  267. @begin-code Code "Form1::Start()"
  268.  
  269.     public void Start()
  270.     {
  271.  
  272.     }
  273.  
  274. @end-code;
  275.  
  276. @begin-code Code "Form1::Stop()"
  277.  
  278.     public void Stop()
  279.     {
  280.  
  281.     }
  282.  
  283. @end-code;
  284.  
  285. @begin-code Code "Form1::Destroy()"
  286.  
  287.     public void Destroy()
  288.     {
  289.  
  290.     }
  291.  
  292. @end-code;
  293.  
  294. @begin-code Code "Form1::updateCheckBoxState( )"
  295.  
  296.     private void updateCheckBoxState( )
  297.     {
  298.  
  299.         if ( checkbox_state.getChecked( ) )
  300.             textb_checkBoxState.setText( "Checked" );
  301.         else
  302.             textb_checkBoxState.setText( "Not Checked" );    
  303.  
  304.     }
  305.  
  306. @end-code;
  307.  
  308. @begin-code Code "Form1::Prototype for updateCheckBoxState( )"
  309.  
  310.     private:
  311.         void updateCheckBoxState( );
  312.  
  313. @end-code;
  314.  
  315. @begin-code Code "Form1_Create"
  316.  
  317.     public boolean Form1_Create(powersoft.jcm.event.CreateEvent event)
  318.     {
  319.         updateCheckBoxState( );    
  320.  
  321.         return false;
  322.     }
  323.  
  324. @end-code;
  325.  
  326. @begin-code Code "cb_getSkills_Click"
  327.  
  328.     public boolean cb_getSkills_Click(powersoft.jcm.event.ClickEvent event)
  329.     {
  330.  
  331.        // clear list box
  332.        lb_skills.deleteAll( );
  333.  
  334.        // check which checkboxes are checked
  335.        if ( checkbox_cplusplus.getChecked( ) )
  336.             lb_skills.add( "C++" );
  337.        if ( checkbox_powerbuilder.getChecked( ) )
  338.             lb_skills.add( "PowerBuilder" );
  339.        if ( checkbox_java.getChecked( ) )
  340.             lb_skills.add( "Java" );
  341.  
  342.         return false;
  343.     }
  344.  
  345. @end-code;
  346.  
  347. @begin-code Code "checkbox_state_Click"
  348.  
  349.     public boolean checkbox_state_Click(powersoft.jcm.event.ClickEvent event)
  350.     {
  351.         updateCheckBoxState( );
  352.  
  353.         return false;
  354.     }
  355.  
  356. @end-code;
  357. @end;
  358.