You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by fl...@apache.org on 2003/02/21 13:49:59 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui JFrmMainFrame.form JFrmMainFrame.java

florianbruckner    2003/02/21 04:49:59

  Modified:    src/java/org/apache/ojb/tools/mapping/reversedb/gui
                        JFrmMainFrame.form JFrmMainFrame.java
  Log:
  remove duplicate license from header
  Listen on the selection model for a changed selection instead of listening on mouse events
  
  Revision  Changes    Path
  1.3       +2 -15     db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/JFrmMainFrame.form
  
  Index: JFrmMainFrame.form
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/JFrmMainFrame.form,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JFrmMainFrame.form	18 Jun 2002 12:26:41 -0000	1.2
  +++ JFrmMainFrame.form	21 Feb 2003 12:49:59 -0000	1.3
  @@ -8,7 +8,6 @@
             <Properties>
               <Property name="text" type="java.lang.String" value="File"/>
             </Properties>
  -
             <Events>
               <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="fileMenuActionPerformed"/>
             </Events>
  @@ -19,7 +18,6 @@
                     <Connection code="new DBConnPropertiesAction(this)" type="code"/>
                   </Property>
                 </Properties>
  -
                 <Events>
                   <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuFileConnectActionPerformed"/>
                 </Events>
  @@ -28,7 +26,6 @@
                 <Properties>
                   <Property name="text" type="java.lang.String" value="Read Schema"/>
                 </Properties>
  -
                 <Events>
                   <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="mnuFileReadSchemaActionPerformed"/>
                 </Events>
  @@ -37,7 +34,6 @@
                 <Properties>
                   <Property name="text" type="java.lang.String" value="Exit"/>
                 </Properties>
  -
                 <Events>
                   <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="exitMenuItemActionPerformed"/>
                 </Events>
  @@ -52,20 +48,13 @@
     </Properties>
     <SyntheticProperties>
       <SyntheticProperty name="menuBar" type="java.lang.String" value="menuBar"/>
  -    <SyntheticProperty name="formSize" 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"/>
  -    <SyntheticProperty name="formPosition" type="java.awt.Point" value="-84,-19,0,5,115,114,0,14,106,97,118,97,46,97,119,116,46,80,111,105,110,116,-74,-60,-118,114,52,126,-56,38,2,0,2,73,0,1,120,73,0,1,121,120,112,0,0,0,0,0,0,0,0"/>
       <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
  -    <SyntheticProperty name="generatePosition" type="boolean" value="true"/>
  -    <SyntheticProperty name="generateSize" type="boolean" value="true"/>
  -    <SyntheticProperty name="generateCenter" type="boolean" value="true"/>
  -    <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="windowClosing" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="exitForm"/>
     </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"/>
       <AuxValue name="RADVisualFormContainer_MenuComponent" type="java.lang.String" value="menuBar"/>
     </AuxValues>
   
  @@ -91,7 +80,6 @@
             <Properties>
               <Property name="text" type="java.lang.String" value="Read"/>
             </Properties>
  -
             <Events>
               <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/>
             </Events>
  @@ -146,9 +134,8 @@
             <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
             <SubComponents>
               <Component class="javax.swing.JTree" name="jTree1">
  -
                 <Events>
  -                <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="jTree1MouseClicked"/>
  +                <EventHandler event="valueChanged" listener="javax.swing.event.TreeSelectionListener" parameters="javax.swing.event.TreeSelectionEvent" handler="jTree1ValueChanged"/>
                 </Events>
               </Component>
             </SubComponents>
  
  
  
  1.6       +331 -381  db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/JFrmMainFrame.java
  
  Index: JFrmMainFrame.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/JFrmMainFrame.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- JFrmMainFrame.java	28 Jan 2003 21:42:31 -0000	1.5
  +++ JFrmMainFrame.java	21 Feb 2003 12:49:59 -0000	1.6
  @@ -56,442 +56,393 @@
   
   import org.apache.ojb.tools.mapping.reversedb.gui.actions.*;
   
  -/*
  - * ====================================================================
  - * 
  - * The Apache Software License, Version 1.1
  - *
  - * Copyright (c) 1999 The Apache Software Foundation.  All rights 
  - * reserved.
  - *
  - * Redistribution and use in source and binary forms, with or without
  - * modification, are permitted provided that the following conditions
  - * are met:
  - *
  - * 1. Redistributions of source code must retain the above copyright
  - *    notice, this list of conditions and the following disclaimer. 
  - *
  - * 2. Redistributions in binary form must reproduce the above copyright
  - *    notice, this list of conditions and the following disclaimer in
  - *    the documentation and/or other materials provided with the
  - *    distribution.
  - *
  - * 3. The end-user documentation included with the redistribution, if
  - *    any, must include the following acknowlegement:  
  - *       "This product includes software developed by the 
  - *        Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowlegement may appear in the software itself,
  - *    if and wherever such third-party acknowlegements normally appear.
  - *
  - * 4. The names "The Jakarta Project", "Jakarta-Regexp", and "Apache Software
  - *    Foundation" must not be used to endorse or promote products derived
  - *    from this software without prior written permission. For written 
  - *    permission, please contact apache@apache.org.
  - *
  - * 5. Products derived from this software may not be called "Apache"
  - *    nor may "Apache" appear in their names without prior written
  - *    permission of the Apache Group.
  - *
  - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  - * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  - * SUCH DAMAGE.
  - * ====================================================================
  - *
  - * This software consists of voluntary contributions made by many
  - * individuals on behalf of the Apache Software Foundation.  For more
  - * information on the Apache Software Foundation, please see
  - * <http://www.apache.org/>.
  - *
  - */ 
   /**
    *
  - * @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a> 
  + * @author <a href="mailto:bfl@florianbruckner.com">Florian Bruckner</a>
    * @version $Id$
    */
   public class JFrmMainFrame extends javax.swing.JFrame
   {
  -  public static final String JDBC_DRIVER = "JDBCDriver";
  -  public static final String JDBC_URL    = "JDBCURL";
  -  public static final String JDBC_USER   = "JDBCUsername";
  -  public static final String JDBC_PASSWORD = "JDBCPassword";
  -  
  -  private java.util.HashMap hmPropertySheets = new java.util.HashMap();
  -  
  -  org.apache.ojb.tools.mapping.reversedb.DBMeta aDBMeta;
  -  java.util.Properties schemeGeneratorProperties;
  -  java.sql.Connection aConnection = null;
  -  
  -  /** Creates new form JFrmMainFrame */
  -  public JFrmMainFrame(java.util.Properties theProperties)
  -  {
  -    schemeGeneratorProperties = theProperties;
  -    initComponents();
  -  }
  -  
  -  public void setConnection(java.sql.Connection conn)
  -  {
  -    firePropertyChange("JDBCConnection", aConnection, conn);
  -    aConnection = conn;
  -  }
  -  
  -  public String getProperty(String propertyName, String defaultValue)
  -  {
  -    return schemeGeneratorProperties.getProperty(propertyName, defaultValue);
  -  }
  -  
  -  public void setProperty(String propertyName, String value)
  -  {
  -    firePropertyChange(propertyName, 
  -      schemeGeneratorProperties.getProperty(propertyName), value);
  -    schemeGeneratorProperties.setProperty(propertyName, value);
  -    try
  +    public static final String JDBC_DRIVER = "JDBCDriver";
  +    public static final String JDBC_URL    = "JDBCURL";
  +    public static final String JDBC_USER   = "JDBCUsername";
  +    public static final String JDBC_PASSWORD = "JDBCPassword";
  +    
  +    private java.util.HashMap hmPropertySheets = new java.util.HashMap();
  +    
  +    org.apache.ojb.tools.mapping.reversedb.DBMeta aDBMeta;
  +    java.util.Properties schemeGeneratorProperties;
  +    java.sql.Connection aConnection = null;
  +    
  +    /** Creates new form JFrmMainFrame */
  +    public JFrmMainFrame(java.util.Properties theProperties)
       {
  -      schemeGeneratorProperties.store(new java.io.FileOutputStream(System.getProperty("user.home") +
  -            System.getProperty("file.separator") + "SchemeGenerator.properties"), "");
  +        schemeGeneratorProperties = theProperties;
  +        initComponents();
       }
  -    catch (java.io.FileNotFoundException ex)
  +    
  +    public void setConnection(java.sql.Connection conn)
       {
  -      ex.printStackTrace();
  +        firePropertyChange("JDBCConnection", aConnection, conn);
  +        aConnection = conn;
       }
  -    catch (java.io.IOException ioex)
  +    
  +    public String getProperty(String propertyName, String defaultValue)
       {
  -      ioex.printStackTrace();
  +        return schemeGeneratorProperties.getProperty(propertyName, defaultValue);
       }
  -  }
  -  
  -  public org.apache.ojb.tools.mapping.reversedb.DBMeta getDBMeta()
  -  {
  -    return this.aDBMeta;
  -  }
  -  
  -  public void analyzeSchema()
  -  {
  -    try
  +    
  +    public void setProperty(String propertyName, String value)
  +    {
  +        firePropertyChange(propertyName,
  +        schemeGeneratorProperties.getProperty(propertyName), value);
  +        schemeGeneratorProperties.setProperty(propertyName, value);
  +        try
  +        {
  +            schemeGeneratorProperties.store(new java.io.FileOutputStream(System.getProperty("user.home") +
  +            System.getProperty("file.separator") + "SchemeGenerator.properties"), "");
  +        }
  +        catch (java.io.FileNotFoundException ex)
  +        {
  +            ex.printStackTrace();
  +        }
  +        catch (java.io.IOException ioex)
  +        {
  +            ioex.printStackTrace();
  +        }
  +    }
  +    
  +    public org.apache.ojb.tools.mapping.reversedb.DBMeta getDBMeta()
       {
  -      String strCatalogPattern = javax.swing.JOptionPane.showInputDialog(this, "Enter regular expression to match catalogs");
  -      String strSchemaPattern = javax.swing.JOptionPane.showInputDialog(this, "Enter regular expression to match schemas");
  -      
  -      aDBMeta = new org.apache.ojb.tools.mapping.reversedb.DBMeta(strCatalogPattern, strSchemaPattern, this.aConnection.getMetaData());
  -      aDBMeta.read();
  -      aDBMeta.generateReferences();
  -      aDBMeta.debug();
  -      this.jTree1.setModel(new javax.swing.tree.DefaultTreeModel(aDBMeta));
  +        return this.aDBMeta;
       }
  -    catch (java.sql.SQLException sqlEx)
  +    
  +    public void analyzeSchema()
       {
  -        java.sql.SQLException currentSqlEx = sqlEx;
  -        while (currentSqlEx != null)
  +        try
  +        {
  +            String strCatalogPattern = javax.swing.JOptionPane.showInputDialog(this, "Enter regular expression to match catalogs");
  +            String strSchemaPattern = javax.swing.JOptionPane.showInputDialog(this, "Enter regular expression to match schemas");
  +            
  +            aDBMeta = new org.apache.ojb.tools.mapping.reversedb.DBMeta(strCatalogPattern, strSchemaPattern, this.aConnection.getMetaData());
  +            aDBMeta.read();
  +            aDBMeta.generateReferences();
  +            aDBMeta.debug();
  +            this.jTree1.setModel(new javax.swing.tree.DefaultTreeModel(aDBMeta));
  +        }
  +        catch (java.sql.SQLException sqlEx)
  +        {
  +            java.sql.SQLException currentSqlEx = sqlEx;
  +            while (currentSqlEx != null)
  +            {
  +                System.out.println(sqlEx.getErrorCode() + ":" + sqlEx.getMessage());
  +                currentSqlEx = currentSqlEx.getNextException();
  +            }
  +            sqlEx.printStackTrace();
  +        }
  +        catch (Throwable t)
           {
  -          System.out.println (sqlEx.getErrorCode() + ":" + sqlEx.getMessage());
  -          currentSqlEx = currentSqlEx.getNextException();
  +            t.printStackTrace();
           }
  -        sqlEx.printStackTrace();
       }
  -    catch (Throwable t)
  -    {
  -        t.printStackTrace();
  -    }    
  -  }
  -  
  -  /** This method is called from within the constructor to
  -   * initialize the form.
  -   * WARNING: Do NOT modify this code. The content of this method is
  -   * always regenerated by the Form Editor.
  -   */
  -  private void initComponents()//GEN-BEGIN:initComponents
  -  {
  -    java.awt.GridBagConstraints gridBagConstraints;
  +    
  +    /** This method is called from within the constructor to
  +     * initialize the form.
  +     * WARNING: Do NOT modify this code. The content of this method is
  +     * always regenerated by the Form Editor.
  +     */
  +    private void initComponents()//GEN-BEGIN:initComponents
  +    {
  +        java.awt.GridBagConstraints gridBagConstraints;
  +
  +        jToolBar1 = new javax.swing.JToolBar();
  +        jButton1 = new javax.swing.JButton();
  +        jButton2 = new javax.swing.JButton();
  +        jButton3 = new javax.swing.JButton();
  +        jButton4 = new javax.swing.JButton();
  +        jButton5 = new javax.swing.JButton();
  +        jButton6 = new javax.swing.JButton();
  +        jSplitPane1 = new javax.swing.JSplitPane();
  +        jScrollPane1 = new javax.swing.JScrollPane();
  +        jTree1 = new javax.swing.JTree();
  +        jScrollPane2 = new javax.swing.JScrollPane();
  +        jPanel1 = new javax.swing.JPanel();
  +        menuBar = new javax.swing.JMenuBar();
  +        fileMenu = new javax.swing.JMenu();
  +        mnuFileConnect = new javax.swing.JMenuItem();
  +        mnuFileReadSchema = new javax.swing.JMenuItem();
  +        exitMenuItem = new javax.swing.JMenuItem();
   
  -    jToolBar1 = new javax.swing.JToolBar();
  -    jButton1 = new javax.swing.JButton();
  -    jButton2 = new javax.swing.JButton();
  -    jButton3 = new javax.swing.JButton();
  -    jButton4 = new javax.swing.JButton();
  -    jButton5 = new javax.swing.JButton();
  -    jButton6 = new javax.swing.JButton();
  -    jSplitPane1 = new javax.swing.JSplitPane();
  -    jScrollPane1 = new javax.swing.JScrollPane();
  -    jTree1 = new javax.swing.JTree();
  -    jScrollPane2 = new javax.swing.JScrollPane();
  -    jPanel1 = new javax.swing.JPanel();
  -    menuBar = new javax.swing.JMenuBar();
  -    fileMenu = new javax.swing.JMenu();
  -    mnuFileConnect = new javax.swing.JMenuItem();
  -    mnuFileReadSchema = new javax.swing.JMenuItem();
  -    exitMenuItem = new javax.swing.JMenuItem();
  +        getContentPane().setLayout(new java.awt.GridBagLayout());
   
  -    getContentPane().setLayout(new java.awt.GridBagLayout());
  +        setTitle("OJB Scheme Generator");
  +        addWindowListener(new java.awt.event.WindowAdapter()
  +        {
  +            public void windowClosing(java.awt.event.WindowEvent evt)
  +            {
  +                exitForm(evt);
  +            }
  +        });
   
  -    setTitle("OJB Scheme Generator");
  -    addWindowListener(new java.awt.event.WindowAdapter()
  -    {
  -      public void windowClosing(java.awt.event.WindowEvent evt)
  -      {
  -        exitForm(evt);
  -      }
  -    });
  +        jButton1.setAction(new DBConnPropertiesAction(this));
  +        jToolBar1.add(jButton1);
   
  -    jButton1.setAction(new DBConnPropertiesAction(this));
  -    jToolBar1.add(jButton1);
  +        jButton2.setText("Read");
  +        jButton2.addActionListener(new java.awt.event.ActionListener()
  +        {
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
  +            {
  +                jButton2ActionPerformed(evt);
  +            }
  +        });
  +
  +        jToolBar1.add(jButton2);
  +
  +        jButton3.setText("Save XML");
  +        jButton3.setAction(new SaveXMLAction(this));
  +        jToolBar1.add(jButton3);
  +
  +        jButton4.setAction(new GenerateJavaClassesAction(this));
  +        jToolBar1.add(jButton4);
  +
  +        jButton5.setAction(new SetPackageAction(this));
  +        jToolBar1.add(jButton5);
  +
  +        jButton6.setAction(new DisableClassesWithRegexAction(this));
  +        jToolBar1.add(jButton6);
  +
  +        gridBagConstraints = new java.awt.GridBagConstraints();
  +        gridBagConstraints.gridx = 0;
  +        gridBagConstraints.gridy = 0;
  +        gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
  +        gridBagConstraints.weightx = 1.0;
  +        getContentPane().add(jToolBar1, gridBagConstraints);
   
  -    jButton2.setText("Read");
  -    jButton2.addActionListener(new java.awt.event.ActionListener()
  -    {
  -      public void actionPerformed(java.awt.event.ActionEvent evt)
  -      {
  -        jButton2ActionPerformed(evt);
  -      }
  -    });
  -
  -    jToolBar1.add(jButton2);
  -
  -    jButton3.setText("Save XML");
  -    jButton3.setAction(new SaveXMLAction(this));
  -    jToolBar1.add(jButton3);
  -
  -    jButton4.setAction(new GenerateJavaClassesAction(this));
  -    jToolBar1.add(jButton4);
  -
  -    jButton5.setAction(new SetPackageAction(this));
  -    jToolBar1.add(jButton5);
  -
  -    jButton6.setAction(new DisableClassesWithRegexAction(this));
  -    jToolBar1.add(jButton6);
  -
  -    gridBagConstraints = new java.awt.GridBagConstraints();
  -    gridBagConstraints.gridx = 0;
  -    gridBagConstraints.gridy = 0;
  -    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
  -    gridBagConstraints.weightx = 1.0;
  -    getContentPane().add(jToolBar1, gridBagConstraints);
  +        jTree1.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener()
  +        {
  +            public void valueChanged(javax.swing.event.TreeSelectionEvent evt)
  +            {
  +                jTree1ValueChanged(evt);
  +            }
  +        });
  +
  +        jScrollPane1.setViewportView(jTree1);
  +
  +        jSplitPane1.setLeftComponent(jScrollPane1);
  +
  +        jScrollPane2.setViewportView(jPanel1);
  +
  +        jSplitPane1.setRightComponent(jScrollPane2);
  +
  +        gridBagConstraints = new java.awt.GridBagConstraints();
  +        gridBagConstraints.gridx = 0;
  +        gridBagConstraints.gridy = 1;
  +        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
  +        gridBagConstraints.weightx = 1.0;
  +        gridBagConstraints.weighty = 1.0;
  +        getContentPane().add(jSplitPane1, gridBagConstraints);
   
  -    jTree1.addMouseListener(new java.awt.event.MouseAdapter()
  -    {
  -      public void mouseClicked(java.awt.event.MouseEvent evt)
  -      {
  -        jTree1MouseClicked(evt);
  -      }
  -    });
  -
  -    jScrollPane1.setViewportView(jTree1);
  -
  -    jSplitPane1.setLeftComponent(jScrollPane1);
  -
  -    jScrollPane2.setViewportView(jPanel1);
  -
  -    jSplitPane1.setRightComponent(jScrollPane2);
  -
  -    gridBagConstraints = new java.awt.GridBagConstraints();
  -    gridBagConstraints.gridx = 0;
  -    gridBagConstraints.gridy = 1;
  -    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
  -    gridBagConstraints.weightx = 1.0;
  -    gridBagConstraints.weighty = 1.0;
  -    getContentPane().add(jSplitPane1, gridBagConstraints);
  +        fileMenu.setText("File");
  +        fileMenu.addActionListener(new java.awt.event.ActionListener()
  +        {
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
  +            {
  +                fileMenuActionPerformed(evt);
  +            }
  +        });
   
  -    fileMenu.setText("File");
  -    fileMenu.addActionListener(new java.awt.event.ActionListener()
  -    {
  -      public void actionPerformed(java.awt.event.ActionEvent evt)
  -      {
  -        fileMenuActionPerformed(evt);
  -      }
  -    });
  +        mnuFileConnect.setAction(new DBConnPropertiesAction(this));
  +        mnuFileConnect.addActionListener(new java.awt.event.ActionListener()
  +        {
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
  +            {
  +                mnuFileConnectActionPerformed(evt);
  +            }
  +        });
   
  -    mnuFileConnect.setAction(new DBConnPropertiesAction(this));
  -    mnuFileConnect.addActionListener(new java.awt.event.ActionListener()
  -    {
  -      public void actionPerformed(java.awt.event.ActionEvent evt)
  -      {
  -        mnuFileConnectActionPerformed(evt);
  -      }
  -    });
  -
  -    fileMenu.add(mnuFileConnect);
  -    mnuFileReadSchema.setText("Read Schema");
  -    mnuFileReadSchema.addActionListener(new java.awt.event.ActionListener()
  -    {
  -      public void actionPerformed(java.awt.event.ActionEvent evt)
  -      {
  -        mnuFileReadSchemaActionPerformed(evt);
  -      }
  -    });
  -
  -    fileMenu.add(mnuFileReadSchema);
  -    exitMenuItem.setText("Exit");
  -    exitMenuItem.addActionListener(new java.awt.event.ActionListener()
  -    {
  -      public void actionPerformed(java.awt.event.ActionEvent evt)
  -      {
  -        exitMenuItemActionPerformed(evt);
  -      }
  -    });
  -
  -    fileMenu.add(exitMenuItem);
  -    menuBar.add(fileMenu);
  -    setJMenuBar(menuBar);
  -
  -    pack();
  -  }//GEN-END:initComponents
  -
  -  private void jTree1MouseClicked (java.awt.event.MouseEvent evt)//GEN-FIRST:event_jTree1MouseClicked
  -  {//GEN-HEADEREND:event_jTree1MouseClicked
  -    // Add your handling code here:
  -    javax.swing.tree.TreePath tp = jTree1.getPathForLocation(evt.getX(), evt.getY());
  -    if (tp != null)
  -    {
  -      Object o = tp.getLastPathComponent();
  -      if (o instanceof PropertySheetModel)
  -      {
  -        PropertySheetModel p = (PropertySheetModel) o;
  -        PropertySheetView pv = 
  -          (PropertySheetView)hmPropertySheets.get(p.getPropertySheetClass());
  -        if (pv == null)
  -        {
  -          try
  -          {
  -            pv = (PropertySheetView)p.getPropertySheetClass().newInstance();
  -          }
  -          catch (InstantiationException ie)
  -          {
  -            // What to do here?????
  -            ie.printStackTrace();
  -          }
  -          catch (IllegalAccessException iae)
  -          {
  -            iae.printStackTrace();
  -          }
  -        }
  -        pv.setModel(p);
  -        this.jScrollPane2.setViewportView((java.awt.Component)pv);
  -      }
  -    }
  -  }//GEN-LAST:event_jTree1MouseClicked
  +        fileMenu.add(mnuFileConnect);
  +
  +        mnuFileReadSchema.setText("Read Schema");
  +        mnuFileReadSchema.addActionListener(new java.awt.event.ActionListener()
  +        {
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
  +            {
  +                mnuFileReadSchemaActionPerformed(evt);
  +            }
  +        });
   
  +        fileMenu.add(mnuFileReadSchema);
  +
  +        exitMenuItem.setText("Exit");
  +        exitMenuItem.addActionListener(new java.awt.event.ActionListener()
  +        {
  +            public void actionPerformed(java.awt.event.ActionEvent evt)
  +            {
  +                exitMenuItemActionPerformed(evt);
  +            }
  +        });
  +
  +        fileMenu.add(exitMenuItem);
  +
  +        menuBar.add(fileMenu);
  +
  +        setJMenuBar(menuBar);
  +
  +        pack();
  +    }//GEN-END:initComponents
  +    
  +    private void jTree1ValueChanged(javax.swing.event.TreeSelectionEvent evt)//GEN-FIRST:event_jTree1ValueChanged
  +    {//GEN-HEADEREND:event_jTree1ValueChanged
  +        javax.swing.tree.TreePath tp = evt.getPath();
  +        if (tp != null)
  +        {
  +            Object o = tp.getLastPathComponent();
  +            if (o instanceof PropertySheetModel)
  +            {
  +                PropertySheetModel p = (PropertySheetModel) o;
  +                PropertySheetView pv =
  +                (PropertySheetView)hmPropertySheets.get(p.getPropertySheetClass());
  +                if (pv == null)
  +                {
  +                    try
  +                    {
  +                        pv = (PropertySheetView)p.getPropertySheetClass().newInstance();
  +                    }
  +                    catch (InstantiationException ie)
  +                    {
  +                        // What to do here?????
  +                        ie.printStackTrace();
  +                    }
  +                    catch (IllegalAccessException iae)
  +                    {
  +                        iae.printStackTrace();
  +                    }
  +                }
  +                pv.setModel(p);
  +                this.jScrollPane2.setViewportView((java.awt.Component)pv);
  +            }
  +        }
  +    }//GEN-LAST:event_jTree1ValueChanged
  +    
     private void jButton2ActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton2ActionPerformed
     {//GEN-HEADEREND:event_jButton2ActionPerformed
  -    this.analyzeSchema();
  +      this.analyzeSchema();
     }//GEN-LAST:event_jButton2ActionPerformed
  -
  +  
     private void mnuFileReadSchemaActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_mnuFileReadSchemaActionPerformed
     {//GEN-HEADEREND:event_mnuFileReadSchemaActionPerformed
  -    this.analyzeSchema();
  +      this.analyzeSchema();
     }//GEN-LAST:event_mnuFileReadSchemaActionPerformed
  -
  +  
     private void mnuFileConnectActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_mnuFileConnectActionPerformed
     {//GEN-HEADEREND:event_mnuFileConnectActionPerformed
  -    // Add your handling code here:
  +      // Add your handling code here:
     }//GEN-LAST:event_mnuFileConnectActionPerformed
  -
  +  
     private void fileMenuActionPerformed (java.awt.event.ActionEvent evt)//GEN-FIRST:event_fileMenuActionPerformed
     {//GEN-HEADEREND:event_fileMenuActionPerformed
  -    // Add your handling code here:
  +      // Add your handling code here:
     }//GEN-LAST:event_fileMenuActionPerformed
     
  -  private void exitMenuItemActionPerformed (java.awt.event.ActionEvent evt)
  +  private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt)
     {//GEN-FIRST:event_exitMenuItemActionPerformed
  -    System.exit (0);
  +      System.exit(0);
     }//GEN-LAST:event_exitMenuItemActionPerformed
     
     /** Exit the Application */
  -  private void exitForm (java.awt.event.WindowEvent evt)
  +  private void exitForm(java.awt.event.WindowEvent evt)
     {//GEN-FIRST:event_exitForm
  -    System.exit (0);
  +      System.exit(0);
     }//GEN-LAST:event_exitForm
     
     /**
      * @param args the command line arguments
      */
  -  public static void main (String args[])
  +  public static void main(String args[])
     {
  -    // new JFrmMainFrame().show ();8
  +      // new JFrmMainFrame().show ();8
     }
     
  -  // Variables declaration - do not modify//GEN-BEGIN:variables
  -  private javax.swing.JMenu fileMenu;
  -  private javax.swing.JButton jButton6;
  -  private javax.swing.JMenuItem mnuFileConnect;
  -  private javax.swing.JButton jButton5;
  -  private javax.swing.JButton jButton4;
  -  private javax.swing.JPanel jPanel1;
  -  private javax.swing.JButton jButton3;
  -  private javax.swing.JButton jButton2;
  -  private javax.swing.JButton jButton1;
  -  private javax.swing.JMenuBar menuBar;
  -  private javax.swing.JScrollPane jScrollPane2;
  -  private javax.swing.JScrollPane jScrollPane1;
  -  private javax.swing.JSplitPane jSplitPane1;
  -  private javax.swing.JMenuItem exitMenuItem;
  -  private javax.swing.JTree jTree1;
  -  private javax.swing.JMenuItem mnuFileReadSchema;
  -  private javax.swing.JToolBar jToolBar1;
  -  // End of variables declaration//GEN-END:variables
  -  
  +    // Variables declaration - do not modify//GEN-BEGIN:variables
  +    private javax.swing.JMenuItem mnuFileConnect;
  +    private javax.swing.JToolBar jToolBar1;
  +    private javax.swing.JTree jTree1;
  +    private javax.swing.JMenuItem mnuFileReadSchema;
  +    private javax.swing.JButton jButton6;
  +    private javax.swing.JButton jButton5;
  +    private javax.swing.JButton jButton4;
  +    private javax.swing.JMenuBar menuBar;
  +    private javax.swing.JButton jButton3;
  +    private javax.swing.JButton jButton2;
  +    private javax.swing.JButton jButton1;
  +    private javax.swing.JMenuItem exitMenuItem;
  +    private javax.swing.JScrollPane jScrollPane2;
  +    private javax.swing.JScrollPane jScrollPane1;
  +    private javax.swing.JPanel jPanel1;
  +    private javax.swing.JSplitPane jSplitPane1;
  +    private javax.swing.JMenu fileMenu;
  +    // End of variables declaration//GEN-END:variables
  +    
   }
   
   /***************************** Changelog *****************************
  -// $Log$
  -// Revision 1.5  2003/01/28 21:42:31  florianbruckner
  -// add dialog for entering a schema and catalog regex pattern
  -//
  -// Revision 1.4  2003/01/28 19:59:35  florianbruckner
  -// simple fix for error reporting
  -//
  -// Revision 1.3  2002/06/18 12:26:41  florianbruckner
  -// changes in Netbeans Form definitions after move to jakarta.
  -//
  -// Revision 1.2  2002/06/17 19:34:34  jvanzyl
  -// Correcting all the package references.
  -// PR:
  -// Obtained from:
  -// Submitted by:
  -// Reviewed by:
  -//
  -// Revision 1.1.1.1  2002/06/17 18:16:54  jvanzyl
  -// Initial OJB import
  -//
  -// Revision 1.3  2002/05/18 19:13:33  mattbaird
  -// Big Checkin includes:
  -
  -// - Fix for ODMG recursion bug, using registered for lock map.
  -
  -// - Do not create objects with no primary key that aren't using a key generator.
  -
  -// - Refactoring to allow OJB to use managed connections from an application server.
  -
  -// - addition of initial JCA implementation.
  -
  -// - addition of MBean code to integrate OJB into JBoss
  -//
  -// Revision 1.2  2002/05/16 11:47:09  florianbruckner
  -// fix CR/LF issue, change license to ASL
  -//
  -// Revision 1.1  2002/04/18 11:44:16  mpoeschl
  -//
  -// move files to new location
  -//
  -// Revision 1.5  2002/04/07 09:05:17  thma
  -// *** empty log message ***
  -//
  -// Revision 1.3  2002/03/11 18:40:26  florianbruckner
  -// modify .form files so the use the correct package name
  -//
  -// Revision 1.2  2002/03/11 17:36:26  florianbruckner
  -// fix line break issue for these files that were previously checked in with -kb
  -//
  -// Revision 1.1  2002/03/04 17:19:32  thma
  -// initial checking for Florians Reverse engineering tool
  -//
  -// Revision 1.1.1.1  2002/02/20 13:35:25  Administrator
  -// initial import
  -//
  -/***************************** Changelog *****************************/
  + * // $Log$
  + * // Revision 1.6  2003/02/21 12:49:59  florianbruckner
  + * // remove duplicate license from header
  + * // Listen on the selection model for a changed selection instead of listening on mouse events
  + * //
  + * // Revision 1.5  2003/01/28 21:42:31  florianbruckner
  + * // add dialog for entering a schema and catalog regex pattern
  + * //
  + * // Revision 1.4  2003/01/28 19:59:35  florianbruckner
  + * // simple fix for error reporting
  + * //
  + * // Revision 1.3  2002/06/18 12:26:41  florianbruckner
  + * // changes in Netbeans Form definitions after move to jakarta.
  + * //
  + * // Revision 1.2  2002/06/17 19:34:34  jvanzyl
  + * // Correcting all the package references.
  + * // PR:
  + * // Obtained from:
  + * // Submitted by:
  + * // Reviewed by:
  + * //
  + * // Revision 1.1.1.1  2002/06/17 18:16:54  jvanzyl
  + * // Initial OJB import
  + * //
  + * // Revision 1.3  2002/05/18 19:13:33  mattbaird
  + * // Big Checkin includes:
  + *
  + * // - Fix for ODMG recursion bug, using registered for lock map.
  + *
  + * // - Do not create objects with no primary key that aren't using a key generator.
  + *
  + * // - Refactoring to allow OJB to use managed connections from an application server.
  + *
  + * // - addition of initial JCA implementation.
  + *
  + * // - addition of MBean code to integrate OJB into JBoss
  + * //
  + * // Revision 1.2  2002/05/16 11:47:09  florianbruckner
  + * // fix CR/LF issue, change license to ASL
  + * //
  + * // Revision 1.1  2002/04/18 11:44:16  mpoeschl
  + * //
  + * // move files to new location
  + * //
  + * // Revision 1.5  2002/04/07 09:05:17  thma
  + * // *** empty log message ***
  + * //
  + * // Revision 1.3  2002/03/11 18:40:26  florianbruckner
  + * // modify .form files so the use the correct package name
  + * //
  + * // Revision 1.2  2002/03/11 17:36:26  florianbruckner
  + * // fix line break issue for these files that were previously checked in with -kb
  + * //
  + * // Revision 1.1  2002/03/04 17:19:32  thma
  + * // initial checking for Florians Reverse engineering tool
  + * //
  + * // Revision 1.1.1.1  2002/02/20 13:35:25  Administrator
  + * // initial import
  + * //
  + * /***************************** Changelog *****************************/