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

  1. Save Format v2.0(1)
  2. @begin ClassFile "Timing_Intervals"
  3.  Exported 1;
  4.  Abstract 0;
  5.  Interface 0;
  6.  PackageName "";
  7.  Language "Java";
  8.  
  9.  @begin UserFunction "Timing_Intervals()"
  10.   Compiler 1;
  11.   GencodeFunction 1;
  12.   GencodeSrcLine 10;
  13.   FunctionName "Timing_Intervals::Timing_Intervals()";
  14.  @end;
  15.  
  16.  @begin UserFunction "init()"
  17.   Compiler 1;
  18.   GencodeSrcLine 14;
  19.   FunctionName "Timing_Intervals::init()";
  20.  @end;
  21.  
  22.  @begin UserFunction "CreateAppletForm()"
  23.   Compiler 1;
  24.   GencodeFunction 1;
  25.   GencodeSrcLine 29;
  26.   FunctionName "Timing_Intervals::CreateAppletForm()";
  27.  @end;
  28.  
  29.  @begin UserFunction "main(String args[])"
  30.   Compiler 1;
  31.   GencodeFunction 1;
  32.   GencodeSrcLine 34;
  33.   FunctionName "Timing_Intervals::main(String args[])";
  34.  @end;
  35.  
  36.  @begin UserFunction "createAppletForm()"
  37.   Compiler 1;
  38.   GencodeFunction 1;
  39.   GencodeSrcLine 51;
  40.   FunctionName "Timing_Intervals::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 56;
  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 "Timing_Intervals::Timing_Intervals()"
  73.  
  74.     public @CLASSNAME@()
  75.     {
  76.         super();
  77.     }
  78.  
  79. @end-code;
  80.  
  81. @begin-code Code "Timing_Intervals::init()"
  82.  
  83. //****************************
  84. /*
  85.  * @CLASSNAME@.java
  86.  *
  87.  * Copyright 1996 Sybase, Inc. All rights reserved.
  88.  *
  89.  * This application demonstrates use of the timer component.
  90.  * in a Java applet. 
  91. */
  92.  
  93.     public void init()
  94.     {
  95.         super.init();
  96.         CreateAppletForm();
  97.     }
  98.  
  99. @end-code;
  100.  
  101. @begin-code Code "Timing_Intervals::CreateAppletForm()"
  102.  
  103.     public void CreateAppletForm()
  104.     {
  105.         Form1 form = new Form1(this);
  106.         form.create();
  107.     }
  108.  
  109. @end-code;
  110.  
  111. @begin-code Code "Timing_Intervals::main(String args[])"
  112.  
  113.     public static void main(String args[])
  114.     {
  115.         @@CLASSNAME@ applet = new @CLASSNAME@();
  116.         powersoft.jcm.ui.Form f = new powersoft.jcm.ui.Form();
  117.         f.create();
  118.         f.setResizable(false);
  119.         f.setMainWindow(true);
  120.         f.addComponent(applet);
  121.         applet.init();
  122.         java.awt.Insets insets = f.getInsets();
  123.         java.awt.Dimension size = applet.size();
  124.         applet.move( insets.left, insets.top );
  125.         f.setWidth( size.width + insets.left + insets.right );
  126.         f.setHeight( size.height + insets.top + insets.bottom );
  127.         f.resize(applet.preferredSize());
  128.         f.setVisible(true);
  129.     }
  130.  
  131. @end-code;
  132.  
  133. @begin-code Code "Timing_Intervals::createAppletForm()"
  134.  
  135.     public void createAppletForm()
  136.     {
  137.         Form1 form = new Form1(this);
  138.         form.create();
  139.     }
  140.  
  141. @end-code;
  142. @end;
  143.