home *** CD-ROM | disk | FTP | other *** search
- Save Format v2.3(19971110)
- @begin Form "Form_Button"
-
- @begin Object "Powersoft Java AWT 1.10::java.applet.Applet"
- DesignName Form_Button;
- @begin ClassProperties
- @begin-code BaseClassList
-
- extends java.applet.Applet
-
- @end-code;
- @end;
- @begin Properties
- @begin DesignProperties
- Style "cf0000";
- ResID 0;
- DesignRect 59,125,165,114;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- LayoutManager "powersoft.powerj.ui.ResizePercentageLayout";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @begin UserFunctions
- @begin UserFunction "java.awt.WindowDestroy()"
- @begin Definition
- FunctionScope 1;
- @begin-code SourceCode "java.awt.WindowDestroy()"
-
- // This function refers to an event which doesn't exist for this object type.
- // it has been converted to a user function.
- public boolean Form_Button_WindowDestroy(java.awt.Event event)
- {
-
- hide();
- destroy();
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "Form_Button()"
- @begin Definition
- FunctionScope 3;
- @begin-code SourceCode "Form_Button()"
-
- public Form_Button()
- {
- super();
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "updateCounterDisplay()"
- @begin Prototype
- FunctionScope 1;
- @begin-code SourceCode "Prototype for updateCounterDisplay()"
-
- private:
- void updateCounterDisplay();
-
- @end-code;
- @end;
- @begin Definition
- FunctionScope 1;
- @begin-code SourceCode "updateCounterDisplay()"
-
- private void updateCounterDisplay( )
- {
- String countStr;
-
- countStr = Integer.toString( _count );
- textf_count.setText( countStr );
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "handleEvent(java.awt.Event event)"
- @begin Prototype
- FunctionScope 1;
- @begin-code SourceCode "Prototype for handleEvent(java.awt.Event event)"
-
- // Placeholder for Prototype for handleEvent(java.awt.Event event)
- // you should move the prototype here from the Class Contents section
-
- @end-code;
- @end;
- @begin Definition
- @begin-code SourceCode "handleEvent(java.awt.Event event)"
-
- public boolean handleEvent(java.awt.Event event)
- {
-
- return defaultHandleEvent(event);
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "unhandledEvent( String listenerName, String methodName, java.lang.Object event )"
- @begin Prototype
- FunctionScope 1;
- @begin-code SourceCode "Prototype for unhandledEvent( String listenerName, String methodName, java.lang.Object event )"
-
- // Placeholder for Prototype for unhandledEvent( String listenerName, String methodName, java.lang.Object event )
- // you should move the prototype here from the Class Contents section
-
- @end-code;
- @end;
- @begin Definition
- @begin-code SourceCode "unhandledEvent( String listenerName, String methodName, java.lang.Object event )"
-
- public void unhandledEvent( String listenerName, String methodName, java.lang.Object event )
- {
-
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "processEvent(java.awt.AWTEvent event)"
- @begin Definition
- FunctionScope 3;
- @begin-code SourceCode "processEvent(java.awt.AWTEvent event)"
-
- public void processEvent(java.awt.AWTEvent event)
- {
-
- defaultProcessEvent(event);
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "getContentPane()"
- @begin Definition
- FunctionScope 3;
- @begin-code SourceCode "getContentPane()"
-
- public java.awt.Container getContentPane()
- {
- // Use the following if you inherit from a JFC container such as com.sun.java.swing.JFrame
- // return super.getContentPane();
- return this;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin CodeBlocks
- @begin CodeBlock "HppPrefix"
- FunctionScope 1;
- @begin-code SourceCode "Imports()"
-
- // add your custom import statements here
-
- @end-code;
- @end;
- @begin CodeBlock "ClassContents"
- FunctionScope 1;
- @begin-code SourceCode "Data Members()"
-
- // add your data members here
- private int _count = 0; // records the number clicks of button
-
- @end-code;
- @end;
- @begin CodeBlock "GeneratedClassContents"
- FunctionScope 1;
- @begin-code SourceCode "GeneratedClassContents()"
-
-
- @end-code;
- @end;
- @begin CodeBlock "CppPrefix"
- FunctionScope 1;
- @begin-code SourceCode "()"
-
-
- @end-code;
- @end;
- @end;
- @begin Objects
- @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
- DesignName cb_test;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- DesignRect 77,35,75,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- label "Test Button";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Action.actionPerformed"
- @begin-code SourceCode "java.awt.event.Action.actionPerformed"
-
- public boolean cb_test_actionPerformed(java.awt.event.ActionEvent event)
- {
- // increment counter
- _count += 1;
- updateCounterDisplay( );
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.Checkbox"
- DesignName checkbox_enabled;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 1;
- DesignRect 17,20,50,16;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- label "Enabled";
- state "1";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Item.itemStateChanged"
- @begin-code SourceCode "java.awt.event.Item.itemStateChanged"
-
- public boolean checkbox_enabled_itemStateChanged(java.awt.event.ItemEvent event)
- {
- if( checkbox_enabled.getState( ) ){
- cb_test.enable( true );
- } else {
- cb_test.enable( false );
- }
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.Checkbox"
- DesignName checkbox_visible;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 2;
- DesignRect 17,35,50,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- label "Visible";
- state "1";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Item.itemStateChanged"
- @begin-code SourceCode "java.awt.event.Item.itemStateChanged"
-
- public boolean checkbox_visible_itemStateChanged(java.awt.event.ItemEvent event)
- {
- if( checkbox_visible.getState( ) ){
- cb_test.show( true );
- } else {
- cb_test.show( false );
- }
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
- DesignName textf_count;
- @begin Properties
- @begin DesignProperties
- Style "800";
- ResID 0;
- TabIndex 3;
- DesignRect 57,70,34,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "0";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.Button"
- DesignName cb_reset;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 4;
- DesignRect 97,70,55,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- label "Reset Count";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Action.actionPerformed"
- @begin-code SourceCode "java.awt.event.Action.actionPerformed"
-
- public boolean cb_reset_actionPerformed(java.awt.event.ActionEvent event)
- {
- // reset counter to zero
- _count = 0;
- updateCounterDisplay( );
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.Checkbox"
- DesignName checkbox_label;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 5;
- DesignRect 17,50,50,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- label "Label";
- state "1";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Item.itemStateChanged"
- @begin-code SourceCode "java.awt.event.Item.itemStateChanged"
-
- public boolean checkbox_label_itemStateChanged(java.awt.event.ItemEvent event)
- {
- if( checkbox_label.getState( ) ){
- cb_test.setLabel( "Test Button" );
- } else {
- cb_test.setLabel( "" );
- }
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.Label"
- DesignName label_1;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 6;
- DesignRect 7,5,70,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Button Properties:";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.Label"
- DesignName label_count;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 7;
- DesignRect 7,70,50,16;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Click Count:";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @end;
- @end;
- @end;
- @end;
-