home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / samples.z / Command_Button.wxc < prev    next >
Text File  |  1996-12-10  |  2KB  |  115 lines

  1. Save Format v1.3
  2. @begin ClassFile "Command_Button"
  3.  Exported 1;
  4.  Abstract 0;
  5.  Interface 0;
  6.  PackageName "";
  7.  Language "Java";
  8.  
  9.  @begin UserFunction "Command_Button()"
  10.   Compiler 1;
  11.   GencodeFunction 1;
  12.   GencodeSrcLine 10;
  13.   FunctionName "Command_Button::Command_Button()";
  14.  @end;
  15.  
  16.  @begin UserFunction "init()"
  17.   Compiler 1;
  18.   GencodeSrcLine 14;
  19.   FunctionName "Command_Button::init()";
  20.  @end;
  21.  
  22.  @begin UserFunction "createAppletForm()"
  23.   Compiler 1;
  24.   GencodeFunction 1;
  25.   GencodeSrcLine 19;
  26.   FunctionName "Command_Button::createAppletForm()";
  27.  @end;
  28.  
  29.  @begin UserFunction "main(String args[])"
  30.   Compiler 1;
  31.   GencodeFunction 1;
  32.   GencodeSrcLine 24;
  33.   FunctionName "Command_Button::main(String args[])";
  34.  @end;
  35.  
  36.  @begin HPPPrefixBlock
  37. @begin-code HPPPrefix
  38.  
  39. // add your custom import statements here
  40.  
  41. @end-code;
  42.   GencodeSrcLine 6;
  43.  @end;
  44.  
  45.  @begin ClassContentsBlock
  46. @begin-code ClassContents
  47.  
  48.     // add your data members here
  49.  
  50. @end-code;
  51.   GencodeSrcLine 40;
  52.  @end;
  53.  
  54. @begin-code BaseClassList
  55.  
  56. extends powersoft.jcm.ui.AWTAppletEx
  57.  
  58. @end-code;
  59.  
  60. @begin-code GeneratedClassContents
  61.  
  62.  
  63. @end-code;
  64.  
  65. @begin-code Code "Command_Button::Command_Button()"
  66.  
  67.     public @CLASSNAME@()
  68.     {
  69.         super();
  70.     }
  71.  
  72. @end-code;
  73.  
  74. @begin-code Code "Command_Button::init()"
  75.  
  76.     public void init()
  77.     {
  78.         super.init();
  79.         createAppletForm();
  80.     }
  81.  
  82. @end-code;
  83.  
  84. @begin-code Code "Command_Button::createAppletForm()"
  85.  
  86.     public void createAppletForm()
  87.     {
  88.         Form1 form = new Form1(this);
  89.         form.create();
  90.     }
  91.  
  92. @end-code;
  93.  
  94. @begin-code Code "Command_Button::main(String args[])"
  95.  
  96.     public static void main(String args[])
  97.     {
  98.         @@CLASSNAME@ applet = new @CLASSNAME@();
  99.         powersoft.jcm.ui.Form f = new powersoft.jcm.ui.Form();
  100.         f.create();
  101.         f.setMainWindow(true);
  102.         f.addComponent(applet);
  103.         applet.init();
  104.         java.awt.Insets insets = f.getInsets();
  105.         java.awt.Dimension size = applet.size();
  106.         applet.move( insets.left, insets.top );
  107.         f.setWidth( size.width + insets.left + insets.right );
  108.         f.setHeight( size.height + insets.top + insets.bottom );
  109.         f.resize(applet.preferredSize());
  110.         f.setVisible(true);
  111.     }
  112.  
  113. @end-code;
  114. @end;
  115.