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

  1. Save Format v1.3
  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 50;
  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 55;
  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.setMainWindow(true);
  119.         f.addComponent(applet);
  120.         applet.init();
  121.         java.awt.Insets insets = f.getInsets();
  122.         java.awt.Dimension size = applet.size();
  123.         applet.move( insets.left, insets.top );
  124.         f.setWidth( size.width + insets.left + insets.right );
  125.         f.setHeight( size.height + insets.top + insets.bottom );
  126.         f.resize(applet.preferredSize());
  127.         f.setVisible(true);
  128.     }
  129.  
  130. @end-code;
  131.  
  132. @begin-code Code "Timing_Intervals::createAppletForm()"
  133.  
  134.     public void createAppletForm()
  135.     {
  136.         Form1 form = new Form1(this);
  137.         form.create();
  138.     }
  139.  
  140. @end-code;
  141. @end;
  142.