home *** CD-ROM | disk | FTP | other *** search
- Save Format v2.3(19971110)
- @begin Form "Form_Choice"
-
- @begin Object "Powersoft Java AWT 1.10::java.applet.Applet"
- DesignName Form_Choice;
- @begin ClassProperties
- @begin-code BaseClassList
-
- extends java.applet.Applet
-
- @end-code;
- @end;
- @begin Properties
- @begin DesignProperties
- Style "cf0000";
- ResID 0;
- DesignRect 72,68,237,180;
- @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_Choice_WindowDestroy(java.awt.Event event)
- {
-
- hide();
- destroy();
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "Form_Choice()"
- @begin Definition
- FunctionScope 3;
- @begin-code SourceCode "Form_Choice()"
-
- public Form_Choice()
- {
- super();
- }
-
- @end-code;
- @end;
- @end;
- @begin UserFunction "updateSelectionInfo()"
- @begin Prototype
- FunctionScope 1;
- @begin-code SourceCode "Prototype for updateSelectionInfo()"
-
- private:
- void updateSelectionInfo();
-
- @end-code;
- @end;
- @begin Definition
- FunctionScope 1;
- @begin-code SourceCode "updateSelectionInfo()"
-
- private void updateSelectionInfo()
- {
- int selectedIndex;
-
- // update display for index of selected item
- selectedIndex = choice_1.getSelectedIndex( );
- textf_index.setText( Integer.toString( selectedIndex ) );
-
- // update display for text of selected item
- textf_text.setText( choice_1.getSelectedItem( ) );
-
- }
-
- @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
-
- @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.Choice"
- DesignName choice_1;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- DesignRect 72,10,65,15;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- dataTrackRow "0";
- dataLookupSource "null";
- dataLookupColumns "";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @begin ComponentProperties "choice_1"
- @begin-code ComboBoxInitialText
-
- Item one
- Item two
- Item three
- Item four
- Item five
-
- @end-code;
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Item.itemStateChanged"
- @begin-code SourceCode "java.awt.event.Item.itemStateChanged"
-
- public boolean choice_1_itemStateChanged(java.awt.event.ItemEvent event)
- {
- updateSelectionInfo( );
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
- DesignName textf_text;
- @begin Properties
- @begin DesignProperties
- Style "800";
- ResID 0;
- TabIndex 1;
- DesignRect 72,36,65,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Item one";
- editable "0";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
- DesignName textf_index;
- @begin Properties
- @begin DesignProperties
- Style "800";
- ResID 0;
- TabIndex 2;
- DesignRect 72,55,65,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "0";
- editable "0";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @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 72,76,65,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "5";
- editable "0";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
- DesignName textf_addNewItem;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 4;
- DesignRect 72,95,65,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Default item";
- 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_add;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 5;
- DesignRect 147,95,76,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- label "Add New Item";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Action.actionPerformed"
- @begin-code SourceCode "java.awt.event.Action.actionPerformed"
-
- public boolean cb_add_actionPerformed(java.awt.event.ActionEvent event)
- {
- String itemText;
- int count;
-
- // add text from textf_addNew to choice
- choice_1.addItem( textf_addNewItem.getText( ) );
-
- // display the number of items now in the choice
- count = choice_1.countItems();
- textf_count.setText( Integer.toString( count ) );
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
- DesignName textf_selectByText;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 6;
- DesignRect 72,116,65,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- 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_selectByString;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 7;
- DesignRect 147,116,76,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- label "Select String";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Action.actionPerformed"
- @begin-code SourceCode "java.awt.event.Action.actionPerformed"
-
- public boolean cb_selectByString_actionPerformed(java.awt.event.ActionEvent event)
- {
- // select the item with string found in textf_selectByText
- choice_1.select( textf_selectByText.getText() );
- updateSelectionInfo( );
-
- return false;
- }
-
- @end-code;
- @end;
- @end;
- @end;
- @begin Object "Powersoft Java AWT 1.10::java.awt.TextField"
- DesignName textf_selectByIndex;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 8;
- DesignRect 72,135,65,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- 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_selectByIndex;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 9;
- DesignRect 147,135,76,14;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- label "Select By Index";
- @end;
- @end;
- @begin Events
- @begin Event "java.awt.event.Action.actionPerformed"
- @begin-code SourceCode "java.awt.event.Action.actionPerformed"
-
- public boolean cb_selectByIndex_actionPerformed(java.awt.event.ActionEvent event)
- {
- int count = 0; // items in choice
- int index = -1; // index of selected item
- String indexStr; // index retrieved from text field
-
- // retrieve index and check for NumberFormatException
- indexStr = textf_selectByIndex.getText();
- try
- {
- index = Integer.parseInt( indexStr );
- }
- catch ( NumberFormatException e )
- {
- index = -1;
- }
-
- // select the given index number if it is within range
- count = choice_1.countItems();
- if( ( index >= 0 ) && ( index < count ) ){
- choice_1.select( index );
- }
-
- updateSelectionInfo( );
-
- 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 10;
- DesignRect 7,76,65,12;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Number of Items:";
- 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_2;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 11;
- DesignRect 42,55,30,12;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Index:";
- 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_3;
- @begin Properties
- @begin DesignProperties
- ResID 0;
- TabIndex 12;
- DesignRect 45,36,26,10;
- @end;
- @begin ObjectProperties
- font "Dialog-Plain-12";
- text "Text:";
- foreground "java.awt.Color.black";
- background "java.awt.Color.lightGray";
- SerializationData "";
- @end;
- @end;
- @end;
- @end;
- @end;
- @end;
-