db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From florianbruck...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui DBFKRelationPropertySheet.form DBFKRelationPropertySheet.java
Date Fri, 21 Feb 2003 12:47:53 GMT
florianbruckner    2003/02/21 04:47:53

  Modified:    src/java/org/apache/ojb/tools/mapping/reversedb/gui
                        DBFKRelationPropertySheet.form
                        DBFKRelationPropertySheet.java
  Log:
  corrected event handling of JInputField objects, value of field was
  not written back to the model object.
  
  Revision  Changes    Path
  1.2       +27 -30    db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/DBFKRelationPropertySheet.form
  
  Index: DBFKRelationPropertySheet.form
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/DBFKRelationPropertySheet.form,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DBFKRelationPropertySheet.form	17 Jun 2002 18:16:52 -0000	1.1
  +++ DBFKRelationPropertySheet.form	21 Feb 2003 12:47:53 -0000	1.2
  @@ -1,15 +1,14 @@
   <?xml version="1.0" encoding="UTF-8" ?>
   
   <Form version="1.0" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
  -  <SyntheticProperties>
  -    <SyntheticProperty name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
  -  </SyntheticProperties>
  -
     <Events>
       <EventHandler event="componentShown" listener="java.awt.event.ComponentListener"
parameters="java.awt.event.ComponentEvent" handler="formComponentShown"/>
       <EventHandler event="componentHidden" listener="java.awt.event.ComponentListener"
parameters="java.awt.event.ComponentEvent" handler="formComponentHidden"/>
       <EventHandler event="hierarchyChanged" listener="java.awt.event.HierarchyListener"
parameters="java.awt.event.HierarchyEvent" handler="formHierarchyChanged"/>
     </Events>
  +  <AuxValues>
  +    <AuxValue name="designerSize" type="java.awt.Dimension" value="-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,1,44,0,0,1,-112"/>
  +  </AuxValues>
   
     <Layout class="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout"/>
     <SubComponents>
  @@ -27,17 +26,16 @@
         <SubComponents>
           <Component class="javax.swing.JLabel" name="lblEnabled">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="enabled:"/>
               <Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection type="value" value="&apos;e&apos;" valueType="int"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="enabled:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JCheckBox" name="cbEnabled">
             <Properties>
               <Property name="mnemonic" type="int" value="101"/>
             </Properties>
  -
             <Events>
               <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="cbEnabledActionPerformed"/>
             </Events>
  @@ -58,64 +56,64 @@
           </Component>
           <Component class="javax.swing.JLabel" name="lblPKTableName">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Primary Key Table:"/>
               <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection component="tfPKTableName" type="bean"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Primary Key Table:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JTextField" name="tfPKTableName">
             <Properties>
               <Property name="editable" type="boolean" value="false"/>
               <Property name="text" type="java.lang.String" value="jTextField1"/>
  -            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
  -              <Border info="null"/>
  -            </Property>
               <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
                 <Color blue="0" green="0" id="TextField.foreground" palette="3" red="0"
type="palette"/>
               </Property>
  +            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
  +              <Border info="null"/>
  +            </Property>
               <Property name="enabled" type="boolean" value="false"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JLabel" name="lblFKTableName">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Foreign Key Table:"/>
               <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection component="tfFKTableName" type="bean"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Foreign Key Table:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JTextField" name="tfFKTableName">
             <Properties>
               <Property name="editable" type="boolean" value="false"/>
               <Property name="text" type="java.lang.String" value="jTextField1"/>
  -            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
  -              <Border info="null"/>
  -            </Property>
               <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
                 <Color blue="0" green="0" id="TextField.foreground" palette="3" red="0"
type="palette"/>
               </Property>
  +            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
  +              <Border info="null"/>
  +            </Property>
               <Property name="enabled" type="boolean" value="false"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JLabel" name="lblReferenceType">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Type:"/>
               <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection component="tfReferenceType" type="bean"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Type:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JTextField" name="tfReferenceType">
             <Properties>
               <Property name="editable" type="boolean" value="false"/>
               <Property name="text" type="java.lang.String" value="jTextField1"/>
  -            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
  -              <Border info="null"/>
  -            </Property>
               <Property name="disabledTextColor" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
                 <Color blue="0" green="0" id="TextField.foreground" palette="3" red="0"
type="palette"/>
               </Property>
  +            <Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
  +              <Border info="null"/>
  +            </Property>
               <Property name="enabled" type="boolean" value="false"/>
             </Properties>
           </Component>
  @@ -125,51 +123,48 @@
           </Component>
           <Component class="javax.swing.JLabel" name="lblAutoRetrieve">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Auto retrieve:"/>
               <Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection type="value" value="&apos;r&apos;" valueType="int"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Auto retrieve:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JCheckBox" name="cbAutoRetrieve">
             <Properties>
               <Property name="mnemonic" type="int" value="114"/>
             </Properties>
  -
             <Events>
               <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="cbAutoRetrieveActionPerformed"/>
             </Events>
           </Component>
           <Component class="javax.swing.JLabel" name="lblAutoUpdate">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Auto update:"/>
               <Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection type="value" value="&apos;u&apos;" valueType="int"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Auto update:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JCheckBox" name="cbAutoUpdate">
             <Properties>
               <Property name="mnemonic" type="int" value="117"/>
             </Properties>
  -
             <Events>
               <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="cbAutoUpdateActionPerformed"/>
             </Events>
           </Component>
           <Component class="javax.swing.JLabel" name="lblAutoDelete">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Auto delete:"/>
               <Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection type="value" value="&apos;d&apos;" valueType="int"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Auto delete:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JCheckBox" name="cbAutoDelete">
             <Properties>
               <Property name="mnemonic" type="int" value="100"/>
             </Properties>
  -
             <Events>
               <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="cbAutoDeleteActionPerformed"/>
             </Events>
  @@ -180,42 +175,44 @@
           </Component>
           <Component class="javax.swing.JLabel" name="lblJavaFieldName">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Java Field Name:"/>
               <Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection type="value" value="&apos;n&apos;" valueType="int"/>
               </Property>
               <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection component="tfJavaFieldName" type="bean"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Java Field Name:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JTextField" name="tfJavaFieldName">
             <Properties>
               <Property name="text" type="java.lang.String" value="jTextField1"/>
             </Properties>
  -
             <Events>
  -            <EventHandler event="inputMethodTextChanged" listener="java.awt.event.InputMethodListener"
parameters="java.awt.event.InputMethodEvent" handler="tfJavaFieldNameInputMethodTextChanged"/>
  +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="tfJavaFieldNameActionPerformed"/>
  +            <EventHandler event="focusLost" listener="java.awt.event.FocusListener"
parameters="java.awt.event.FocusEvent" handler="tfJavaFieldNameFocusLost"/>
  +            <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent"
handler="tfJavaFieldNameKeyTyped"/>
             </Events>
           </Component>
           <Component class="javax.swing.JLabel" name="lblJavaFieldType">
             <Properties>
  -            <Property name="text" type="java.lang.String" value="Java Field Type:"/>
               <Property name="displayedMnemonic" type="int" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection type="value" value="&apos;t&apos;" valueType="int"/>
               </Property>
               <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
                 <Connection component="tfJavaFieldType" type="bean"/>
               </Property>
  +            <Property name="text" type="java.lang.String" value="Java Field Type:"/>
             </Properties>
           </Component>
           <Component class="javax.swing.JTextField" name="tfJavaFieldType">
             <Properties>
               <Property name="text" type="java.lang.String" value="jTextField2"/>
             </Properties>
  -
             <Events>
  -            <EventHandler event="inputMethodTextChanged" listener="java.awt.event.InputMethodListener"
parameters="java.awt.event.InputMethodEvent" handler="tfJavaFieldTypeInputMethodTextChanged"/>
  +            <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener"
parameters="java.awt.event.ActionEvent" handler="tfJavaFieldTypeActionPerformed"/>
  +            <EventHandler event="focusLost" listener="java.awt.event.FocusListener"
parameters="java.awt.event.FocusEvent" handler="tfJavaFieldTypeFocusLost"/>
  +            <EventHandler event="keyTyped" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent"
handler="tfJavaFieldTypeKeyTyped"/>
             </Events>
           </Component>
         </SubComponents>
  
  
  
  1.4       +109 -50   db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/DBFKRelationPropertySheet.java
  
  Index: DBFKRelationPropertySheet.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/DBFKRelationPropertySheet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DBFKRelationPropertySheet.java	18 Jun 2002 12:26:41 -0000	1.3
  +++ DBFKRelationPropertySheet.java	21 Feb 2003 12:47:53 -0000	1.4
  @@ -219,8 +219,8 @@
   
           jPanel1.setLayout(new java.awt.GridLayout(15, 2));
   
  -        lblEnabled.setText("enabled:");
           lblEnabled.setDisplayedMnemonic('e');
  +        lblEnabled.setText("enabled:");
           jPanel1.add(lblEnabled);
   
           cbEnabled.setMnemonic('e');
  @@ -244,36 +244,36 @@
   
           jPanel1.add(jLabel3);
   
  -        lblPKTableName.setText("Primary Key Table:");
           lblPKTableName.setLabelFor(tfPKTableName);
  +        lblPKTableName.setText("Primary Key Table:");
           jPanel1.add(lblPKTableName);
   
           tfPKTableName.setEditable(false);
           tfPKTableName.setText("jTextField1");
  -        tfPKTableName.setBorder(null);
           tfPKTableName.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("TextField.foreground"));
  +        tfPKTableName.setBorder(null);
           tfPKTableName.setEnabled(false);
           jPanel1.add(tfPKTableName);
   
  -        lblFKTableName.setText("Foreign Key Table:");
           lblFKTableName.setLabelFor(tfFKTableName);
  +        lblFKTableName.setText("Foreign Key Table:");
           jPanel1.add(lblFKTableName);
   
           tfFKTableName.setEditable(false);
           tfFKTableName.setText("jTextField1");
  -        tfFKTableName.setBorder(null);
           tfFKTableName.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("TextField.foreground"));
  +        tfFKTableName.setBorder(null);
           tfFKTableName.setEnabled(false);
           jPanel1.add(tfFKTableName);
   
  -        lblReferenceType.setText("Type:");
           lblReferenceType.setLabelFor(tfReferenceType);
  +        lblReferenceType.setText("Type:");
           jPanel1.add(lblReferenceType);
   
           tfReferenceType.setEditable(false);
           tfReferenceType.setText("jTextField1");
  -        tfReferenceType.setBorder(null);
           tfReferenceType.setDisabledTextColor((java.awt.Color) javax.swing.UIManager.getDefaults().get("TextField.foreground"));
  +        tfReferenceType.setBorder(null);
           tfReferenceType.setEnabled(false);
           jPanel1.add(tfReferenceType);
   
  @@ -281,8 +281,8 @@
   
           jPanel1.add(jLabel6);
   
  -        lblAutoRetrieve.setText("Auto retrieve:");
           lblAutoRetrieve.setDisplayedMnemonic('r');
  +        lblAutoRetrieve.setText("Auto retrieve:");
           jPanel1.add(lblAutoRetrieve);
   
           cbAutoRetrieve.setMnemonic('r');
  @@ -296,8 +296,8 @@
   
           jPanel1.add(cbAutoRetrieve);
   
  -        lblAutoUpdate.setText("Auto update:");
           lblAutoUpdate.setDisplayedMnemonic('u');
  +        lblAutoUpdate.setText("Auto update:");
           jPanel1.add(lblAutoUpdate);
   
           cbAutoUpdate.setMnemonic('u');
  @@ -311,8 +311,8 @@
   
           jPanel1.add(cbAutoUpdate);
   
  -        lblAutoDelete.setText("Auto delete:");
           lblAutoDelete.setDisplayedMnemonic('d');
  +        lblAutoDelete.setText("Auto delete:");
           jPanel1.add(lblAutoDelete);
   
           cbAutoDelete.setMnemonic('d');
  @@ -330,39 +330,65 @@
   
           jPanel1.add(jLabel11);
   
  -        lblJavaFieldName.setText("Java Field Name:");
           lblJavaFieldName.setDisplayedMnemonic('n');
           lblJavaFieldName.setLabelFor(tfJavaFieldName);
  +        lblJavaFieldName.setText("Java Field Name:");
           jPanel1.add(lblJavaFieldName);
   
           tfJavaFieldName.setText("jTextField1");
  -        tfJavaFieldName.addInputMethodListener(new java.awt.event.InputMethodListener()
  +        tfJavaFieldName.addActionListener(new java.awt.event.ActionListener()
           {
  -            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt)
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
               {
  -                tfJavaFieldNameInputMethodTextChanged(evt);
  +                tfJavaFieldNameActionPerformed(evt);
               }
  -            public void caretPositionChanged(java.awt.event.InputMethodEvent evt)
  +        });
  +
  +        tfJavaFieldName.addFocusListener(new java.awt.event.FocusAdapter()
  +        {
  +            public void focusLost(java.awt.event.FocusEvent evt)
               {
  +                tfJavaFieldNameFocusLost(evt);
  +            }
  +        });
  +
  +        tfJavaFieldName.addKeyListener(new java.awt.event.KeyAdapter()
  +        {
  +            public void keyTyped(java.awt.event.KeyEvent evt)
  +            {
  +                tfJavaFieldNameKeyTyped(evt);
               }
           });
   
           jPanel1.add(tfJavaFieldName);
   
  -        lblJavaFieldType.setText("Java Field Type:");
           lblJavaFieldType.setDisplayedMnemonic('t');
           lblJavaFieldType.setLabelFor(tfJavaFieldType);
  +        lblJavaFieldType.setText("Java Field Type:");
           jPanel1.add(lblJavaFieldType);
   
           tfJavaFieldType.setText("jTextField2");
  -        tfJavaFieldType.addInputMethodListener(new java.awt.event.InputMethodListener()
  +        tfJavaFieldType.addActionListener(new java.awt.event.ActionListener()
  +        {
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
  +            {
  +                tfJavaFieldTypeActionPerformed(evt);
  +            }
  +        });
  +
  +        tfJavaFieldType.addFocusListener(new java.awt.event.FocusAdapter()
           {
  -            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt)
  +            public void focusLost(java.awt.event.FocusEvent evt)
               {
  -                tfJavaFieldTypeInputMethodTextChanged(evt);
  +                tfJavaFieldTypeFocusLost(evt);
               }
  -            public void caretPositionChanged(java.awt.event.InputMethodEvent evt)
  +        });
  +
  +        tfJavaFieldType.addKeyListener(new java.awt.event.KeyAdapter()
  +        {
  +            public void keyTyped(java.awt.event.KeyEvent evt)
               {
  +                tfJavaFieldTypeKeyTyped(evt);
               }
           });
   
  @@ -377,17 +403,47 @@
   
       }//GEN-END:initComponents
   
  -  private void tfJavaFieldTypeInputMethodTextChanged (java.awt.event.InputMethodEvent evt)//GEN-FIRST:event_tfJavaFieldTypeInputMethodTextChanged
  -  {//GEN-HEADEREND:event_tfJavaFieldTypeInputMethodTextChanged
  -    // Add your handling code here:
  -    this.aRelation.setFieldType(tfJavaFieldType.getText());
  -  }//GEN-LAST:event_tfJavaFieldTypeInputMethodTextChanged
  -
  -  private void tfJavaFieldNameInputMethodTextChanged (java.awt.event.InputMethodEvent evt)//GEN-FIRST:event_tfJavaFieldNameInputMethodTextChanged
  -  {//GEN-HEADEREND:event_tfJavaFieldNameInputMethodTextChanged
  -    // Add your handling code here:
  -    aRelation.setFieldName(tfJavaFieldName.getText());
  -  }//GEN-LAST:event_tfJavaFieldNameInputMethodTextChanged
  +    private void tfJavaFieldTypeKeyTyped(java.awt.event.KeyEvent evt)//GEN-FIRST:event_tfJavaFieldTypeKeyTyped
  +    {//GEN-HEADEREND:event_tfJavaFieldTypeKeyTyped
  +        // Revert on ESC
  +        if (evt.getKeyChar() == evt.VK_ESCAPE)
  +        {
  +            this.tfJavaFieldType.setText(aRelation.getFieldType());
  +        }
  +    }//GEN-LAST:event_tfJavaFieldTypeKeyTyped
  +
  +    private void tfJavaFieldTypeFocusLost(java.awt.event.FocusEvent evt)//GEN-FIRST:event_tfJavaFieldTypeFocusLost
  +    {//GEN-HEADEREND:event_tfJavaFieldTypeFocusLost
  +        // Commit on lost focus
  +        this.aRelation.setFieldType(tfJavaFieldType.getText());
  +    }//GEN-LAST:event_tfJavaFieldTypeFocusLost
  +
  +    private void tfJavaFieldTypeActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_tfJavaFieldTypeActionPerformed
  +    {//GEN-HEADEREND:event_tfJavaFieldTypeActionPerformed
  +        // Commit on ENTER
  +        this.aRelation.setFieldType(tfJavaFieldType.getText());
  +    }//GEN-LAST:event_tfJavaFieldTypeActionPerformed
  +
  +    private void tfJavaFieldNameKeyTyped(java.awt.event.KeyEvent evt)//GEN-FIRST:event_tfJavaFieldNameKeyTyped
  +    {//GEN-HEADEREND:event_tfJavaFieldNameKeyTyped
  +        // Revert to original value if ESC is typed
  +        if (evt.getKeyChar() == evt.VK_ESCAPE)
  +        {
  +            this.tfJavaFieldName.setText(aRelation.getFieldName());
  +        }
  +    }//GEN-LAST:event_tfJavaFieldNameKeyTyped
  +
  +    private void tfJavaFieldNameFocusLost(java.awt.event.FocusEvent evt)//GEN-FIRST:event_tfJavaFieldNameFocusLost
  +    {//GEN-HEADEREND:event_tfJavaFieldNameFocusLost
  +        // Commit value if focus is lost
  +        aRelation.setFieldName(tfJavaFieldName.getText());
  +    }//GEN-LAST:event_tfJavaFieldNameFocusLost
  +
  +    private void tfJavaFieldNameActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_tfJavaFieldNameActionPerformed
  +    {//GEN-HEADEREND:event_tfJavaFieldNameActionPerformed
  +        // Commit value if ENTER is typed
  +        aRelation.setFieldName(tfJavaFieldName.getText());
  +    }//GEN-LAST:event_tfJavaFieldNameActionPerformed
   
     private void cbAutoDeleteActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_cbAutoDeleteActionPerformed
     {//GEN-HEADEREND:event_cbAutoDeleteActionPerformed
  @@ -442,39 +498,43 @@
     
     
       // Variables declaration - do not modify//GEN-BEGIN:variables
  -    private javax.swing.JLabel lblFKTableName;
  -    private javax.swing.JLabel lblJavaFieldType;
  -    private javax.swing.JCheckBox cbDisabledByParent;
       private javax.swing.JCheckBox cbAutoDelete;
  -    private javax.swing.JPanel jPanel1;
  -    private javax.swing.JLabel lblAutoUpdate;
  -    private javax.swing.JLabel lblEnabled;
  -    private javax.swing.JCheckBox cbEnabled;
  -    private javax.swing.JLabel lblAutoRetrieve;
  -    private javax.swing.JCheckBox cbAutoUpdate;
  -    private javax.swing.JTextField tfReferenceType;
  +    private javax.swing.JLabel lblJavaFieldType;
  +    private javax.swing.JLabel lblJavaFieldName;
       private javax.swing.JLabel lblDisabledByParent;
  -    private javax.swing.JTextField tfJavaFieldName;
  +    private javax.swing.JLabel lblEnabled;
       private javax.swing.JLabel lblAutoDelete;
  +    private javax.swing.JCheckBox cbAutoRetrieve;
  +    private javax.swing.JTextField tfFKTableName;
  +    private javax.swing.JLabel lblFKTableName;
  +    private javax.swing.JTextField tfPKTableName;
  +    private javax.swing.JTextField tfReferenceType;
  +    private javax.swing.JCheckBox cbAutoUpdate;
  +    private javax.swing.JLabel lblPKTableName;
       private javax.swing.JLabel lblReferenceType;
  -    private javax.swing.JLabel lblJavaFieldName;
       private javax.swing.JLabel jLabel6;
  -    private javax.swing.JTextField tfPKTableName;
  +    private javax.swing.JCheckBox cbEnabled;
       private javax.swing.JLabel jLabel5;
  -    private javax.swing.JLabel jLabel11;
  -    private javax.swing.JCheckBox cbAutoRetrieve;
       private javax.swing.JLabel jLabel4;
  -    private javax.swing.JLabel jLabel10;
       private javax.swing.JLabel jLabel3;
  -    private javax.swing.JLabel lblPKTableName;
  -    private javax.swing.JTextField tfFKTableName;
  +    private javax.swing.JLabel lblAutoUpdate;
  +    private javax.swing.JLabel lblAutoRetrieve;
  +    private javax.swing.JPanel jPanel1;
  +    private javax.swing.JCheckBox cbDisabledByParent;
       private javax.swing.JTextField tfJavaFieldType;
  +    private javax.swing.JLabel jLabel11;
  +    private javax.swing.JLabel jLabel10;
  +    private javax.swing.JTextField tfJavaFieldName;
       // End of variables declaration//GEN-END:variables
     
   }
   
   /***************************** Changelog *****************************
   // $Log$
  +// Revision 1.4  2003/02/21 12:47:53  florianbruckner
  +// corrected event handling of JInputField objects, value of field was
  +// not written back to the model object.
  +//
   // Revision 1.3  2002/06/18 12:26:41  florianbruckner
   // changes in Netbeans Form definitions after move to jakarta.
   //
  
  
  

Mime
View raw message