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

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