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  |  5KB  |  200 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.Form"
  9.   Font "Dialog-Plain-8";
  10.   ControlScope "Private";
  11.   BackColor "Color.lightGray";
  12.   ForeColor "Color.black";
  13.   Text "Cursors Sample";
  14.   Visible "1";
  15.   DataSource "NULL";
  16.   DataColumns "";
  17.   BoundControl "0";
  18.   @begin Event "powersoft.jcm.event.Create"
  19.    GencodeSrcLine 72;
  20.    FunctionName "Form1_Create";
  21.   @end;
  22.   @begin UserFunction "Form1()"
  23.    Compiler 1;
  24.    GencodeSrcLine 67;
  25.    FunctionName "Form1::Form1()";
  26.   @end;
  27.   ResID 101;
  28.   DesignName Form1;
  29.   TabIndex 0;
  30.   DesignRect 47,112,141,176;
  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.lightGray";
  41.   ForeColor "Color.black";
  42.   Text "";
  43.   Visible "1";
  44.   DataSource "NULL";
  45.   DataColumns "";
  46.   BoundControl "0";
  47.   @begin Event "powersoft.jcm.event.Select"
  48.    GencodeSrcLine 92;
  49.    FunctionName "lb_1_Select";
  50.   @end;
  51.   ResID 100;
  52.   DesignName lb_1;
  53.   TabIndex 0;
  54.   DesignRect 10,20,115,130;
  55.   @begin ComponentData "lb_1"
  56.   @end;
  57.  @end;
  58.  
  59.  @begin Object "powersoft.jcm.ui.Label"
  60.   Font "<Inherited>";
  61.   BackColor "Color.lightGray";
  62.   ForeColor "Color.black";
  63.   Text "Select a Cursor:";
  64.   Visible "1";
  65.   DataSource "NULL";
  66.   DataColumns "";
  67.   BoundControl "0";
  68.   ResID 102;
  69.   DesignName label_1;
  70.   TabIndex 1;
  71.   DesignRect 10,5,70,10;
  72.  @end;
  73.  
  74.  @begin HPPPrefixBlock
  75. @begin-code HPPPrefix
  76.  
  77. // add your custom import statements here
  78. import java.awt.*;
  79.  
  80. @end-code;
  81.   GencodeSrcLine 13;
  82.  @end;
  83.  
  84.  @begin CPPPrefixBlock
  85. @begin-code CPPPrefix
  86.  
  87.  
  88. @end-code;
  89.   GencodeSrcLine 13;
  90.  @end;
  91.  
  92.  @begin ClassContentsBlock
  93. @begin-code ClassContents
  94.  
  95.     // add your data members here
  96.  
  97.     Frame f = null;
  98.  
  99. @end-code;
  100.   GencodeSrcLine 149;
  101.  @end;
  102.  
  103. @begin-code BaseClassList
  104.  
  105. extends powersoft.jcm.ui.Form
  106.  
  107. @end-code;
  108.  
  109. @begin-code GeneratedClassContents
  110.  
  111.  
  112. @end-code;
  113.  
  114. @begin-code Code "Form1::Form1()"
  115.  
  116.     public @CLASSNAME@()
  117.     {
  118.         super();
  119.     }
  120.  
  121. @end-code;
  122.  
  123. @begin-code Code "Form1_Create"
  124.  
  125.     public boolean Form1_Create(powersoft.jcm.event.CreateEvent event)
  126.     {
  127.         lb_1.add( "DEFAULT_CURSOR" );
  128.         lb_1.add( "CROSSHAIR_CURSOR" );
  129.         lb_1.add( "E_RESIZE_CURSOR" );
  130.         lb_1.add( "HAND_CURSOR" );
  131.         lb_1.add( "MOVE_CURSOR" );
  132.         lb_1.add( "N_RESIZE_CURSOR" );
  133.         lb_1.add( "NE_RESIZE_CURSOR" );
  134.         lb_1.add( "NW_RESIZE_CURSOR" );
  135.         lb_1.add( "S_RESIZE_CURSOR" );
  136.         lb_1.add( "SE_RESIZE_CURSOR" );
  137.         lb_1.add( "SW_RESIZE_CURSOR" );
  138.         lb_1.add( "TEXT_CURSOR" );
  139.         lb_1.add( "W_RESIZE_CURSOR" );
  140.         lb_1.add( "WAIT_CURSOR" );
  141.  
  142.         return false;
  143.     }
  144.  
  145. @end-code;
  146.  
  147. @begin-code Code "lb_1_Select"
  148.  
  149.     public boolean lb_1_Select(powersoft.jcm.event.SelectEvent event)
  150.     {
  151.         f = (Frame)this.getAWTComponent();
  152.  
  153.         if( lb_1.getText( lb_1.getSelected( ) ) == "DEFAULT_CURSOR" )
  154.             f.setCursor( Frame.DEFAULT_CURSOR );
  155.  
  156.         if( lb_1.getText( lb_1.getSelected( ) ) == "CROSSHAIR_CURSOR" )
  157.             f.setCursor( Frame.CROSSHAIR_CURSOR );
  158.  
  159.         if( lb_1.getText( lb_1.getSelected( ) ) == "E_RESIZE_CURSOR" )
  160.             f.setCursor( Frame.E_RESIZE_CURSOR );
  161.  
  162.         if( lb_1.getText( lb_1.getSelected( ) ) == "HAND_CURSOR" )
  163.             f.setCursor( Frame.HAND_CURSOR );
  164.  
  165.         if( lb_1.getText( lb_1.getSelected( ) ) == "MOVE_CURSOR" )
  166.             f.setCursor( Frame.MOVE_CURSOR );
  167.  
  168.         if( lb_1.getText( lb_1.getSelected( ) ) == "N_RESIZE_CURSOR" )
  169.             f.setCursor( Frame.N_RESIZE_CURSOR );
  170.  
  171.         if( lb_1.getText( lb_1.getSelected( ) ) == "NE_RESIZE_CURSOR" )
  172.             f.setCursor( Frame.NE_RESIZE_CURSOR );
  173.  
  174.         if( lb_1.getText( lb_1.getSelected( ) ) == "NW_RESIZE_CURSOR" )
  175.             f.setCursor( Frame.NW_RESIZE_CURSOR );
  176.  
  177.         if( lb_1.getText( lb_1.getSelected( ) ) == "S_RESIZE_CURSOR" )
  178.             f.setCursor( Frame.S_RESIZE_CURSOR );
  179.  
  180.         if( lb_1.getText( lb_1.getSelected( )) == "SE_RESIZE_CURSOR" )
  181.             f.setCursor( Frame.SE_RESIZE_CURSOR );
  182.  
  183.         if( lb_1.getText( lb_1.getSelected( ) ) == "SW_RESIZE_CURSOR" )
  184.             f.setCursor( Frame.SW_RESIZE_CURSOR );
  185.  
  186.         if( lb_1.getText( lb_1.getSelected( ) ) == "TEXT_CURSOR" )
  187.             f.setCursor( Frame.TEXT_CURSOR );
  188.  
  189.         if( lb_1.getText( lb_1.getSelected( ) ) == "W_RESIZE_CURSOR" )
  190.             f.setCursor( Frame.W_RESIZE_CURSOR );
  191.  
  192.         if( lb_1.getText( lb_1.getSelected( ) ) == "WAIT_CURSOR" )
  193.             f.setCursor( Frame.WAIT_CURSOR );
  194.  
  195.         return false;
  196.     }
  197.  
  198. @end-code;
  199. @end;
  200.