home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 1998 September / dppcpro0998.iso / Rwc / Sybase / Install.exe / samples.z / Form_Threads.wxf < prev    next >
Encoding:
Text File  |  1998-03-25  |  26.9 KB  |  1,023 lines

  1. Save Format v2.3(19971110)
  2. @begin Form "Form_Threads"
  3.  
  4.  @begin Object "Powersoft Java AWT 1.10::java.applet.Applet"
  5.   DesignName Form_Threads;
  6.   @begin ClassProperties
  7. @begin-code BaseClassList
  8.  
  9. extends java.applet.Applet
  10.  
  11. @end-code;
  12.    @begin CPMethod "updateCounter"
  13.     @begin CPPrototype "Prototype for updateCounterMethod"
  14. @begin-code SourceCode "Prototype for updateCounterMethod"
  15.  
  16.         // Not used for Java classes
  17.  
  18. @end-code;
  19.     @end;
  20.     @begin CPDefinition "updateCounterMethod"
  21. @begin-code SourceCode "updateCounterMethod"
  22.  
  23.     //
  24.     // updateCounterMethod
  25.     //
  26.  
  27.     public void updateCounter(int threadNumber, int counterValue)
  28.     {
  29.         //  update the thread counter
  30.         Integer count = new Integer(counterValue);
  31.  
  32.         if (threadNumber == 1) {
  33.             textf_countThread1.setText( count.toString() );
  34.         }
  35.         else if (threadNumber == 2) {
  36.             textf_countThread2.setText( count.toString() );
  37.         }
  38.         else if (threadNumber == 3) {
  39.             textf_countThread3.setText( count.toString() );
  40.         }   
  41.  
  42.     }
  43.  
  44. @end-code;
  45.     @end;
  46.    @end;
  47.   @end;
  48.   @begin Properties
  49.    @begin DesignProperties
  50.     Style "cf0000";
  51.     ResID 0;
  52.     DesignRect 25,83,322,163;
  53.    @end;
  54.    @begin ObjectProperties
  55.     font "Dialog-Plain-12";
  56.     LayoutManager "powersoft.powerj.ui.ResizePercentageLayout";
  57.     foreground "java.awt.Color.black";
  58.     background "java.awt.Color.lightGray";
  59.     SerializationData "";
  60.    @end;
  61.   @end;
  62.   @begin UserFunctions
  63.    @begin UserFunction "java.awt.WindowDestroy()"
  64.     @begin Definition
  65.      FunctionScope 1;
  66. @begin-code SourceCode "java.awt.WindowDestroy()"
  67.  
  68. // This function refers to an event which doesn't exist for this object type.
  69. // it has been converted to a user function.
  70.     public boolean Form_Threads_WindowDestroy(java.awt.Event event)
  71.     {
  72.  
  73.         hide();
  74.         destroy();
  75.         return false;
  76.     }
  77.  
  78. @end-code;
  79.     @end;
  80.    @end;
  81.    @begin UserFunction "Form_Threads()"
  82.     @begin Definition
  83.      FunctionScope 3;
  84. @begin-code SourceCode "Form_Threads()"
  85.  
  86.     public Form_Threads()
  87.     {
  88.         super();
  89.  
  90.     }
  91.  
  92. @end-code;
  93.     @end;
  94.    @end;
  95.    @begin UserFunction "handleEvent(java.awt.Event event)"
  96.     @begin Prototype
  97.      FunctionScope 1;
  98. @begin-code SourceCode "Prototype for handleEvent(java.awt.Event event)"
  99.  
  100. // Placeholder for Prototype for handleEvent(java.awt.Event event)
  101. //     you should move the prototype here from the Class Contents section
  102.  
  103. @end-code;
  104.     @end;
  105.     @begin Definition
  106. @begin-code SourceCode "handleEvent(java.awt.Event event)"
  107.  
  108.     public boolean handleEvent(java.awt.Event event)
  109.     {
  110.  
  111.         return defaultHandleEvent(event);
  112.     }
  113.  
  114. @end-code;
  115.     @end;
  116.    @end;
  117.    @begin UserFunction "unhandledEvent( String listenerName, String methodName, java.lang.Object event )"
  118.     @begin Prototype
  119.      FunctionScope 1;
  120. @begin-code SourceCode "Prototype for unhandledEvent( String listenerName, String methodName, java.lang.Object event )"
  121.  
  122. // Placeholder for Prototype for unhandledEvent( String listenerName, String methodName, java.lang.Object event )
  123. //     you should move the prototype here from the Class Contents section
  124.  
  125. @end-code;
  126.     @end;
  127.     @begin Definition
  128. @begin-code SourceCode "unhandledEvent( String listenerName, String methodName, java.lang.Object event )"
  129.  
  130.     public void unhandledEvent( String listenerName, String methodName, java.lang.Object event )
  131.     {
  132.  
  133.     }
  134.  
  135. @end-code;
  136.     @end;
  137.    @end;
  138.    @begin UserFunction "processEvent(java.awt.AWTEvent event)"
  139.     @begin Definition
  140.      FunctionScope 3;
  141. @begin-code SourceCode "processEvent(java.awt.AWTEvent event)"
  142.  
  143.     public void processEvent(java.awt.AWTEvent event)
  144.     {
  145.  
  146.         defaultProcessEvent(event);
  147.     }
  148.  
  149. @end-code;
  150.     @end;
  151.    @end;
  152.    @begin UserFunction "getContentPane()"
  153.     @begin Definition
  154.      FunctionScope 3;
  155. @begin-code SourceCode "getContentPane()"
  156.  
  157.     public java.awt.Container getContentPane()
  158.     {
  159.         //  Use the following if you inherit from a JFC container such as com.sun.java.swing.JFrame
  160.         //  return super.getContentPane();
  161.         return this;
  162.     }
  163.  
  164. @end-code;
  165.     @end;
  166.    @end;
  167.   @end;
  168.   @begin CodeBlocks
  169.    @begin CodeBlock "HppPrefix"
  170.     FunctionScope 1;
  171. @begin-code SourceCode "Imports()"
  172.  
  173. // add your custom import statements here
  174.  
  175. @end-code;
  176.    @end;
  177.    @begin CodeBlock "ClassContents"
  178.     FunctionScope 1;
  179. @begin-code SourceCode "Data Members()"
  180.  
  181.     // add your data members here
  182.     private CounterThread _thread1;
  183.     private CounterThread _thread2;
  184.     private CounterThread _thread3;
  185.  
  186. @end-code;
  187.    @end;
  188.    @begin CodeBlock "GeneratedClassContents"
  189.     FunctionScope 1;
  190. @begin-code SourceCode "GeneratedClassContents()"
  191.  
  192.  
  193. @end-code;
  194.    @end;
  195.    @begin CodeBlock "CppPrefix"
  196.     FunctionScope 1;
  197. @begin-code SourceCode "()"
  198.  
  199.  
  200. @end-code;
  201.    @end;
  202.   @end;
  203.   @begin Objects
  204.    @begin Object "Powersoft Java AWT 1.10::java.awt.Label"
  205.     DesignName label_1;
  206.     @begin Properties
  207.      @begin DesignProperties
  208.       ResID 0;
  209.       DesignRect 5,10,86,15;
  210.      @end;
  211.      @begin ObjectProperties
  212.       font "Dialog-Plain-12";
  213.       text "Thread 1";
  214.       foreground "java.awt.Color.black";
  215.       background "java.awt.Color.lightGray";
  216.       SerializationData "";
  217.      @end;
  218.     @end;
  219.    @end;
  220.    @begin Object "Powersoft Java AWT 1.10::java.awt.Label"
  221.     DesignName label_2;
  222.     @begin Properties
  223.      @begin DesignProperties
  224.       ResID 0;
  225.       TabIndex 1;
  226.       DesignRect 111,10,90,15;
  227.      @end;
  228.      @begin ObjectProperties
  229.       font "Dialog-Plain-12";
  230.       text "Thread 2";
  231.       foreground "java.awt.Color.black";
  232.       background "java.awt.Color.lightGray";
  233.       SerializationData "";
  234.      @end;
  235.     @end;
  236.    @end;
  237.    @begin Object "Powersoft Java AWT 1.10::java.awt.Label"
  238.     DesignName label_3;
  239.     @begin Properties
  240.      @begin DesignProperties
  241.       ResID 0;
  242.       TabIndex 2;
  243.       DesignRect 216,10,86,15;
  244.      @end;
  245.      @begin ObjectProperties
  246.       font "Dialog-Plain-12";
  247.       text "Thread 3";
  248.       foreground "java.awt.Color.black";
  249.       background "java.awt.Color.lightGray";
  250.       SerializationData "";
  251.      @end;
  252.     @end;
  253.    @end;
  254.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  255.     DesignName cb_startThread1;
  256.     @begin Properties
  257.      @begin DesignProperties
  258.       ResID 0;
  259.       TabIndex 3;
  260.       DesignRect 5,25,45,14;
  261.      @end;
  262.      @begin ObjectProperties
  263.       font "Dialog-Plain-12";
  264.       foreground "java.awt.Color.black";
  265.       background "java.awt.Color.lightGray";
  266.       SerializationData "";
  267.       label "Start";
  268.      @end;
  269.     @end;
  270.     @begin Events
  271.      @begin Event "java.awt.event.Action.actionPerformed"
  272. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  273.  
  274.     public boolean cb_startThread1_actionPerformed(java.awt.event.ActionEvent event)
  275.     {
  276.         _thread1 = new CounterThread(this, 1);
  277.         _thread1.setPriority(3);
  278.         _thread1.start();
  279.         textf_stateThread1.setText( "Running" );
  280.  
  281.         cb_startThread1.enable( false );
  282.         cb_stopThread1.enable( true );
  283.         cb_suspendThread1.enable( true );
  284.         cb_resumeThread1.enable( false );
  285.         cb_priorityThread1.enable( true );
  286.  
  287.         return false;
  288.     }
  289.  
  290. @end-code;
  291.      @end;
  292.     @end;
  293.    @end;
  294.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  295.     DesignName cb_stopThread1;
  296.     @begin Properties
  297.      @begin DesignProperties
  298.       ResID 0;
  299.       TabIndex 4;
  300.       DesignRect 5,50,45,14;
  301.      @end;
  302.      @begin ObjectProperties
  303.       font "Dialog-Plain-12";
  304.       enabled "0";
  305.       foreground "java.awt.Color.black";
  306.       background "java.awt.Color.lightGray";
  307.       SerializationData "";
  308.       label "Stop";
  309.      @end;
  310.     @end;
  311.     @begin Events
  312.      @begin Event "java.awt.event.Action.actionPerformed"
  313. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  314.  
  315.     public boolean cb_stopThread1_actionPerformed(java.awt.event.ActionEvent event)
  316.     {
  317.         _thread1.stop();
  318.         _thread1 = null;
  319.         textf_stateThread1.setText( "Stopped" );
  320.  
  321.         cb_startThread1.enable( true );
  322.         cb_stopThread1.enable( false );
  323.         cb_suspendThread1.enable( false );
  324.         cb_resumeThread1.enable( false );
  325.         cb_priorityThread1.enable( false );
  326.  
  327.         return false;
  328.     }
  329.  
  330. @end-code;
  331.      @end;
  332.     @end;
  333.    @end;
  334.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  335.     DesignName cb_suspendThread1;
  336.     @begin Properties
  337.      @begin DesignProperties
  338.       ResID 0;
  339.       TabIndex 5;
  340.       DesignRect 5,75,45,14;
  341.      @end;
  342.      @begin ObjectProperties
  343.       font "Dialog-Plain-12";
  344.       enabled "0";
  345.       foreground "java.awt.Color.black";
  346.       background "java.awt.Color.lightGray";
  347.       SerializationData "";
  348.       label "Suspend";
  349.      @end;
  350.     @end;
  351.     @begin Events
  352.      @begin Event "java.awt.event.Action.actionPerformed"
  353. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  354.  
  355.     public boolean cb_suspendThread1_actionPerformed(java.awt.event.ActionEvent event)
  356.     {
  357.         synchronized(_thread1)
  358.         {
  359.             _thread1.suspend();
  360.         }
  361.         textf_stateThread1.setText( "Suspended" );
  362.  
  363.         cb_startThread1.enable( false );
  364.         cb_stopThread1.enable( true );
  365.         cb_suspendThread1.enable( false );
  366.         cb_resumeThread1.enable( true );
  367.         cb_priorityThread1.enable( true );
  368.  
  369.         return false;
  370.     }
  371.  
  372. @end-code;
  373.      @end;
  374.     @end;
  375.    @end;
  376.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  377.     DesignName cb_resumeThread1;
  378.     @begin Properties
  379.      @begin DesignProperties
  380.       ResID 0;
  381.       TabIndex 6;
  382.       DesignRect 5,100,45,14;
  383.      @end;
  384.      @begin ObjectProperties
  385.       font "Dialog-Plain-12";
  386.       enabled "0";
  387.       foreground "java.awt.Color.black";
  388.       background "java.awt.Color.lightGray";
  389.       SerializationData "";
  390.       label "Resume";
  391.      @end;
  392.     @end;
  393.     @begin Events
  394.      @begin Event "java.awt.event.Action.actionPerformed"
  395. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  396.  
  397.     public boolean cb_resumeThread1_actionPerformed(java.awt.event.ActionEvent event)
  398.     {
  399.         _thread1.resume();
  400.  
  401.         textf_stateThread1.setText( "Running" );
  402.  
  403.         cb_startThread1.enable( false );
  404.         cb_stopThread1.enable( true );
  405.         cb_suspendThread1.enable( true );
  406.         cb_resumeThread1.enable( false );
  407.         cb_priorityThread1.enable( true );
  408.  
  409.         return false;
  410.     }
  411.  
  412. @end-code;
  413.      @end;
  414.     @end;
  415.    @end;
  416.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  417.     DesignName cb_priorityThread1;
  418.     @begin Properties
  419.      @begin DesignProperties
  420.       ResID 0;
  421.       TabIndex 7;
  422.       DesignRect 5,125,45,14;
  423.      @end;
  424.      @begin ObjectProperties
  425.       font "Dialog-Plain-12";
  426.       enabled "0";
  427.       foreground "java.awt.Color.black";
  428.       background "java.awt.Color.lightGray";
  429.       SerializationData "";
  430.       label "Priority";
  431.      @end;
  432.     @end;
  433.     @begin Events
  434.      @begin Event "java.awt.event.Action.actionPerformed"
  435. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  436.  
  437.     public boolean cb_priorityThread1_actionPerformed(java.awt.event.ActionEvent event)
  438.     {
  439.         int currentPriority = _thread1.getPriority();
  440.         currentPriority = currentPriority + 1;
  441.         if (currentPriority > 6)
  442.             currentPriority = 1;
  443.         _thread1.setPriority(currentPriority);
  444.  
  445.         Integer priority = new Integer(currentPriority);
  446.         textf_priorityThread1.setText( priority.toString() );
  447.  
  448.         return false;
  449.     }
  450.  
  451. @end-code;
  452.      @end;
  453.     @end;
  454.    @end;
  455.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  456.     DesignName cb_startThread2;
  457.     @begin Properties
  458.      @begin DesignProperties
  459.       ResID 0;
  460.       TabIndex 8;
  461.       DesignRect 111,25,45,14;
  462.      @end;
  463.      @begin ObjectProperties
  464.       font "Dialog-Plain-12";
  465.       foreground "java.awt.Color.black";
  466.       background "java.awt.Color.lightGray";
  467.       SerializationData "";
  468.       label "Start";
  469.      @end;
  470.     @end;
  471.     @begin Events
  472.      @begin Event "java.awt.event.Action.actionPerformed"
  473. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  474.  
  475.     public boolean cb_startThread2_actionPerformed(java.awt.event.ActionEvent event)
  476.     {
  477.         _thread2 = new CounterThread(this, 2);
  478.         _thread2.setPriority(3);
  479.         _thread2.start();
  480.         textf_stateThread2.setText( "Running" );
  481.  
  482.         cb_startThread2.enable( false );
  483.         cb_stopThread2.enable( true );
  484.         cb_suspendThread2.enable( true );
  485.         cb_resumeThread2.enable( false );
  486.         cb_priorityThread2.enable( true );
  487.  
  488.         return false;
  489.     }
  490.  
  491. @end-code;
  492.      @end;
  493.     @end;
  494.    @end;
  495.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  496.     DesignName cb_stopThread2;
  497.     @begin Properties
  498.      @begin DesignProperties
  499.       ResID 0;
  500.       TabIndex 9;
  501.       DesignRect 111,50,45,14;
  502.      @end;
  503.      @begin ObjectProperties
  504.       font "Dialog-Plain-12";
  505.       enabled "0";
  506.       foreground "java.awt.Color.black";
  507.       background "java.awt.Color.lightGray";
  508.       SerializationData "";
  509.       label "Stop";
  510.      @end;
  511.     @end;
  512.     @begin Events
  513.      @begin Event "java.awt.event.Action.actionPerformed"
  514. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  515.  
  516.     public boolean cb_stopThread2_actionPerformed(java.awt.event.ActionEvent event)
  517.     {
  518.         _thread2.stop();
  519.         _thread2 = null;
  520.         textf_stateThread2.setText( "Stopped" );
  521.  
  522.         cb_startThread2.enable( true );
  523.         cb_stopThread2.enable( false );
  524.         cb_suspendThread2.enable( false );
  525.         cb_resumeThread2.enable( false );
  526.         cb_priorityThread2.enable( false );
  527.  
  528.         return false;
  529.     }
  530.  
  531. @end-code;
  532.      @end;
  533.     @end;
  534.    @end;
  535.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  536.     DesignName cb_suspendThread2;
  537.     @begin Properties
  538.      @begin DesignProperties
  539.       ResID 0;
  540.       TabIndex 10;
  541.       DesignRect 111,75,45,14;
  542.      @end;
  543.      @begin ObjectProperties
  544.       font "Dialog-Plain-12";
  545.       enabled "0";
  546.       foreground "java.awt.Color.black";
  547.       background "java.awt.Color.lightGray";
  548.       SerializationData "";
  549.       label "Suspend";
  550.      @end;
  551.     @end;
  552.     @begin Events
  553.      @begin Event "java.awt.event.Action.actionPerformed"
  554. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  555.  
  556.     public boolean cb_suspendThread2_actionPerformed(java.awt.event.ActionEvent event)
  557.     {
  558.         synchronized(_thread2)
  559.         {
  560.             _thread2.suspend();
  561.         }
  562.         textf_stateThread2.setText( "Suspended" );
  563.  
  564.         cb_startThread2.enable( false );
  565.         cb_stopThread2.enable( true );
  566.         cb_suspendThread2.enable( false );
  567.         cb_resumeThread2.enable( true );
  568.         cb_priorityThread2.enable( true );        
  569.  
  570.         return false;
  571.     }
  572.  
  573. @end-code;
  574.      @end;
  575.     @end;
  576.    @end;
  577.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  578.     DesignName cb_resumeThread2;
  579.     @begin Properties
  580.      @begin DesignProperties
  581.       ResID 0;
  582.       TabIndex 11;
  583.       DesignRect 111,100,45,14;
  584.      @end;
  585.      @begin ObjectProperties
  586.       font "Dialog-Plain-12";
  587.       enabled "0";
  588.       foreground "java.awt.Color.black";
  589.       background "java.awt.Color.lightGray";
  590.       SerializationData "";
  591.       label "Resume";
  592.      @end;
  593.     @end;
  594.     @begin Events
  595.      @begin Event "java.awt.event.Action.actionPerformed"
  596. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  597.  
  598.     public boolean cb_resumeThread2_actionPerformed(java.awt.event.ActionEvent event)
  599.     {
  600.         _thread2.resume();
  601.  
  602.         textf_stateThread2.setText( "Running" );
  603.  
  604.         cb_startThread2.enable( false );
  605.         cb_stopThread2.enable( true );
  606.         cb_suspendThread2.enable( true );
  607.         cb_resumeThread2.enable( false );
  608.         cb_priorityThread2.enable( true );
  609.  
  610.         return false;
  611.     }
  612.  
  613. @end-code;
  614.      @end;
  615.     @end;
  616.    @end;
  617.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  618.     DesignName cb_priorityThread2;
  619.     @begin Properties
  620.      @begin DesignProperties
  621.       ResID 0;
  622.       TabIndex 12;
  623.       DesignRect 111,125,45,14;
  624.      @end;
  625.      @begin ObjectProperties
  626.       font "Dialog-Plain-12";
  627.       enabled "0";
  628.       foreground "java.awt.Color.black";
  629.       background "java.awt.Color.lightGray";
  630.       SerializationData "";
  631.       label "Priority";
  632.      @end;
  633.     @end;
  634.     @begin Events
  635.      @begin Event "java.awt.event.Action.actionPerformed"
  636. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  637.  
  638.     public boolean cb_priorityThread2_actionPerformed(java.awt.event.ActionEvent event)
  639.     {
  640.         int currentPriority = _thread2.getPriority();
  641.         currentPriority = currentPriority + 1;
  642.         if (currentPriority > 6)
  643.             currentPriority = 1;
  644.         _thread2.setPriority(currentPriority);
  645.  
  646.         Integer priority = new Integer(currentPriority);
  647.         textf_priorityThread2.setText( priority.toString() );
  648.  
  649.         return false;
  650.     }
  651.  
  652. @end-code;
  653.      @end;
  654.     @end;
  655.    @end;
  656.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  657.     DesignName cb_startThread3;
  658.     @begin Properties
  659.      @begin DesignProperties
  660.       ResID 0;
  661.       TabIndex 13;
  662.       DesignRect 216,25,45,14;
  663.      @end;
  664.      @begin ObjectProperties
  665.       font "Dialog-Plain-12";
  666.       foreground "java.awt.Color.black";
  667.       background "java.awt.Color.lightGray";
  668.       SerializationData "";
  669.       label "Start";
  670.      @end;
  671.     @end;
  672.     @begin Events
  673.      @begin Event "java.awt.event.Action.actionPerformed"
  674. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  675.  
  676.     public boolean cb_startThread3_actionPerformed(java.awt.event.ActionEvent event)
  677.     {
  678.         _thread3 = new CounterThread(this, 3);
  679.         _thread3.setPriority(3);
  680.         _thread3.start();
  681.         textf_stateThread3.setText( "Running" );
  682.  
  683.         cb_startThread3.enable( false );
  684.         cb_stopThread3.enable( true );
  685.         cb_suspendThread3.enable( true );
  686.         cb_resumeThread3.enable( false );
  687.         cb_priorityThread3.enable( true );
  688.  
  689.         return false;
  690.     }
  691.  
  692. @end-code;
  693.      @end;
  694.     @end;
  695.    @end;
  696.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  697.     DesignName cb_stopThread3;
  698.     @begin Properties
  699.      @begin DesignProperties
  700.       ResID 0;
  701.       TabIndex 14;
  702.       DesignRect 216,50,45,14;
  703.      @end;
  704.      @begin ObjectProperties
  705.       font "Dialog-Plain-12";
  706.       enabled "0";
  707.       foreground "java.awt.Color.black";
  708.       background "java.awt.Color.lightGray";
  709.       SerializationData "";
  710.       label "Stop";
  711.      @end;
  712.     @end;
  713.     @begin Events
  714.      @begin Event "java.awt.event.Action.actionPerformed"
  715. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  716.  
  717.     public boolean cb_stopThread3_actionPerformed(java.awt.event.ActionEvent event)
  718.     {
  719.         _thread3.stop();
  720.         _thread3 = null;
  721.         textf_stateThread3.setText( "Stopped" );
  722.  
  723.         cb_startThread3.enable( true );
  724.         cb_stopThread3.enable( false );
  725.         cb_suspendThread3.enable( false );
  726.         cb_resumeThread3.enable( false );
  727.         cb_priorityThread3.enable( false );
  728.  
  729.  
  730.         return false;
  731.     }
  732.  
  733. @end-code;
  734.      @end;
  735.     @end;
  736.    @end;
  737.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  738.     DesignName cb_suspendThread3;
  739.     @begin Properties
  740.      @begin DesignProperties
  741.       ResID 0;
  742.       TabIndex 15;
  743.       DesignRect 216,75,45,14;
  744.      @end;
  745.      @begin ObjectProperties
  746.       font "Dialog-Plain-12";
  747.       enabled "0";
  748.       foreground "java.awt.Color.black";
  749.       background "java.awt.Color.lightGray";
  750.       SerializationData "";
  751.       label "Suspend";
  752.      @end;
  753.     @end;
  754.     @begin Events
  755.      @begin Event "java.awt.event.Action.actionPerformed"
  756. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  757.  
  758.     public boolean cb_suspendThread3_actionPerformed(java.awt.event.ActionEvent event)
  759.     {
  760.         synchronized(_thread3)
  761.         {
  762.             _thread3.suspend();
  763.         }
  764.         textf_stateThread3.setText( "Suspended" );
  765.  
  766.         cb_startThread3.enable( false );
  767.         cb_stopThread3.enable( true );
  768.         cb_suspendThread3.enable( false );
  769.         cb_resumeThread3.enable( true );
  770.         cb_priorityThread3.enable( true );        
  771.  
  772.         return false;
  773.     }
  774.  
  775. @end-code;
  776.      @end;
  777.     @end;
  778.    @end;
  779.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  780.     DesignName cb_resumeThread3;
  781.     @begin Properties
  782.      @begin DesignProperties
  783.       ResID 0;
  784.       TabIndex 16;
  785.       DesignRect 216,100,45,14;
  786.      @end;
  787.      @begin ObjectProperties
  788.       font "Dialog-Plain-12";
  789.       enabled "0";
  790.       foreground "java.awt.Color.black";
  791.       background "java.awt.Color.lightGray";
  792.       SerializationData "";
  793.       label "Resume";
  794.      @end;
  795.     @end;
  796.     @begin Events
  797.      @begin Event "java.awt.event.Action.actionPerformed"
  798. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  799.  
  800.     public boolean cb_resumeThread3_actionPerformed(java.awt.event.ActionEvent event)
  801.     {
  802.         _thread3.resume();
  803.  
  804.         textf_stateThread3.setText( "Running" );
  805.  
  806.         cb_startThread3.enable( false );
  807.         cb_stopThread3.enable( true );
  808.         cb_suspendThread3.enable( true );
  809.         cb_resumeThread3.enable( false );
  810.         cb_priorityThread3.enable( true );
  811.  
  812.         return false;
  813.     }
  814.  
  815. @end-code;
  816.      @end;
  817.     @end;
  818.    @end;
  819.    @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
  820.     DesignName cb_priorityThread3;
  821.     @begin Properties
  822.      @begin DesignProperties
  823.       ResID 0;
  824.       TabIndex 17;
  825.       DesignRect 216,125,45,14;
  826.      @end;
  827.      @begin ObjectProperties
  828.       font "Dialog-Plain-12";
  829.       enabled "0";
  830.       foreground "java.awt.Color.black";
  831.       background "java.awt.Color.lightGray";
  832.       SerializationData "";
  833.       label "Priority";
  834.      @end;
  835.     @end;
  836.     @begin Events
  837.      @begin Event "java.awt.event.Action.actionPerformed"
  838. @begin-code SourceCode "java.awt.event.Action.actionPerformed"
  839.  
  840.     public boolean cb_priorityThread3_actionPerformed(java.awt.event.ActionEvent event)
  841.     {
  842.         int currentPriority = _thread3.getPriority();
  843.         currentPriority = currentPriority + 1;
  844.         if (currentPriority > 6)
  845.             currentPriority = 1;
  846.         _thread3.setPriority(currentPriority);
  847.  
  848.         Integer priority = new Integer(currentPriority);
  849.         textf_priorityThread3.setText( priority.toString() );        
  850.  
  851.         return false;
  852.     }
  853.  
  854. @end-code;
  855.      @end;
  856.     @end;
  857.    @end;
  858.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  859.     DesignName textf_countThread1;
  860.     @begin Properties
  861.      @begin DesignProperties
  862.       Style "800";
  863.       ResID 0;
  864.       TabIndex 18;
  865.       DesignRect 55,25,45,14;
  866.      @end;
  867.      @begin ObjectProperties
  868.       font "Dialog-Plain-12";
  869.       text "1";
  870.       foreground "java.awt.Color.black";
  871.       background "java.awt.Color.white";
  872.       SerializationData "";
  873.      @end;
  874.     @end;
  875.    @end;
  876.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  877.     DesignName textf_stateThread1;
  878.     @begin Properties
  879.      @begin DesignProperties
  880.       Style "800";
  881.       ResID 0;
  882.       TabIndex 19;
  883.       DesignRect 55,50,45,14;
  884.      @end;
  885.      @begin ObjectProperties
  886.       font "Dialog-Plain-12";
  887.       text "Stopped";
  888.       foreground "java.awt.Color.black";
  889.       background "java.awt.Color.white";
  890.       SerializationData "";
  891.      @end;
  892.     @end;
  893.    @end;
  894.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  895.     DesignName textf_priorityThread1;
  896.     @begin Properties
  897.      @begin DesignProperties
  898.       Style "800";
  899.       ResID 0;
  900.       TabIndex 20;
  901.       DesignRect 55,125,45,14;
  902.      @end;
  903.      @begin ObjectProperties
  904.       font "Dialog-Plain-12";
  905.       text "3";
  906.       foreground "java.awt.Color.black";
  907.       background "java.awt.Color.white";
  908.       SerializationData "";
  909.      @end;
  910.     @end;
  911.    @end;
  912.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  913.     DesignName textf_countThread2;
  914.     @begin Properties
  915.      @begin DesignProperties
  916.       Style "800";
  917.       ResID 0;
  918.       TabIndex 21;
  919.       DesignRect 160,25,45,14;
  920.      @end;
  921.      @begin ObjectProperties
  922.       font "Dialog-Plain-12";
  923.       text "1";
  924.       foreground "java.awt.Color.black";
  925.       background "java.awt.Color.white";
  926.       SerializationData "";
  927.      @end;
  928.     @end;
  929.    @end;
  930.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  931.     DesignName textf_stateThread2;
  932.     @begin Properties
  933.      @begin DesignProperties
  934.       Style "800";
  935.       ResID 0;
  936.       TabIndex 22;
  937.       DesignRect 160,50,45,14;
  938.      @end;
  939.      @begin ObjectProperties
  940.       font "Dialog-Plain-12";
  941.       text "Stopped";
  942.       foreground "java.awt.Color.black";
  943.       background "java.awt.Color.white";
  944.       SerializationData "";
  945.      @end;
  946.     @end;
  947.    @end;
  948.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  949.     DesignName textf_priorityThread2;
  950.     @begin Properties
  951.      @begin DesignProperties
  952.       Style "800";
  953.       ResID 0;
  954.       TabIndex 23;
  955.       DesignRect 160,125,45,14;
  956.      @end;
  957.      @begin ObjectProperties
  958.       font "Dialog-Plain-12";
  959.       text "3";
  960.       foreground "java.awt.Color.black";
  961.       background "java.awt.Color.white";
  962.       SerializationData "";
  963.      @end;
  964.     @end;
  965.    @end;
  966.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  967.     DesignName textf_countThread3;
  968.     @begin Properties
  969.      @begin DesignProperties
  970.       Style "800";
  971.       ResID 0;
  972.       TabIndex 24;
  973.       DesignRect 265,25,45,14;
  974.      @end;
  975.      @begin ObjectProperties
  976.       font "Dialog-Plain-12";
  977.       text "1";
  978.       foreground "java.awt.Color.black";
  979.       background "java.awt.Color.white";
  980.       SerializationData "";
  981.      @end;
  982.     @end;
  983.    @end;
  984.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  985.     DesignName textf_stateThread3;
  986.     @begin Properties
  987.      @begin DesignProperties
  988.       Style "800";
  989.       ResID 0;
  990.       TabIndex 25;
  991.       DesignRect 265,50,45,14;
  992.      @end;
  993.      @begin ObjectProperties
  994.       font "Dialog-Plain-12";
  995.       text "Stopped";
  996.       foreground "java.awt.Color.black";
  997.       background "java.awt.Color.white";
  998.       SerializationData "";
  999.      @end;
  1000.     @end;
  1001.    @end;
  1002.    @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
  1003.     DesignName textf_priorityThread3;
  1004.     @begin Properties
  1005.      @begin DesignProperties
  1006.       Style "800";
  1007.       ResID 0;
  1008.       TabIndex 26;
  1009.       DesignRect 265,125,45,14;
  1010.      @end;
  1011.      @begin ObjectProperties
  1012.       font "Dialog-Plain-12";
  1013.       text "3";
  1014.       foreground "java.awt.Color.black";
  1015.       background "java.awt.Color.white";
  1016.       SerializationData "";
  1017.      @end;
  1018.     @end;
  1019.    @end;
  1020.   @end;
  1021.  @end;
  1022. @end;
  1023.