db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From florianbruck...@apache.org
Subject cvs commit: jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui JFrmMainFrame.java
Date Tue, 28 Jan 2003 21:42:32 GMT
florianbruckner    2003/01/28 13:42:31

  Modified:    src/java/org/apache/ojb/tools/mapping/reversedb/gui
                        JFrmMainFrame.java
  Log:
  add dialog for entering a schema and catalog regex pattern
  
  Revision  Changes    Path
  1.5       +152 -146  jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/JFrmMainFrame.java
  
  Index: JFrmMainFrame.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ojb/src/java/org/apache/ojb/tools/mapping/reversedb/gui/JFrmMainFrame.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JFrmMainFrame.java	28 Jan 2003 19:59:35 -0000	1.4
  +++ JFrmMainFrame.java	28 Jan 2003 21:42:31 -0000	1.5
  @@ -177,7 +177,10 @@
     {
       try
       {
  -      aDBMeta = new org.apache.ojb.tools.mapping.reversedb.DBMeta(this.aConnection.getMetaData());
  +      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();
  @@ -204,141 +207,141 @@
      * WARNING: Do NOT modify this code. The content of this method is
      * always regenerated by the Form Editor.
      */
  -    private void initComponents()//GEN-BEGIN:initComponents
  +  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();
  +
  +    getContentPane().setLayout(new java.awt.GridBagLayout());
  +
  +    setTitle("OJB Scheme Generator");
  +    addWindowListener(new java.awt.event.WindowAdapter()
       {
  -        java.awt.GridBagConstraints gridBagConstraints;
  +      public void windowClosing(java.awt.event.WindowEvent evt)
  +      {
  +        exitForm(evt);
  +      }
  +    });
   
  -        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();
  +    jButton1.setAction(new DBConnPropertiesAction(this));
  +    jToolBar1.add(jButton1);
   
  -        getContentPane().setLayout(new java.awt.GridBagLayout());
  +    jButton2.setText("Read");
  +    jButton2.addActionListener(new java.awt.event.ActionListener()
  +    {
  +      public void actionPerformed(java.awt.event.ActionEvent evt)
  +      {
  +        jButton2ActionPerformed(evt);
  +      }
  +    });
   
  -        setTitle("OJB Scheme Generator");
  -        addWindowListener(new java.awt.event.WindowAdapter()
  -        {
  -            public void windowClosing(java.awt.event.WindowEvent evt)
  -            {
  -                exitForm(evt);
  -            }
  -        });
  +    jToolBar1.add(jButton2);
   
  -        jButton1.setAction(new DBConnPropertiesAction(this));
  -        jToolBar1.add(jButton1);
  +    jButton3.setText("Save XML");
  +    jButton3.setAction(new SaveXMLAction(this));
  +    jToolBar1.add(jButton3);
   
  -        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);
  +    jButton4.setAction(new GenerateJavaClassesAction(this));
  +    jToolBar1.add(jButton4);
   
  -        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);
  +    jButton5.setAction(new SetPackageAction(this));
  +    jToolBar1.add(jButton5);
   
  -        fileMenu.setText("File");
  -        fileMenu.addActionListener(new java.awt.event.ActionListener()
  -        {
  -            public void actionPerformed(java.awt.event.ActionEvent evt)
  -            {
  -                fileMenuActionPerformed(evt);
  -            }
  -        });
  +    jButton6.setAction(new DisableClassesWithRegexAction(this));
  +    jToolBar1.add(jButton6);
   
  -        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);
  +    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.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);
  +      }
  +    });
  +
  +    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
  +    pack();
  +  }//GEN-END:initComponents
   
     private void jTree1MouseClicked (java.awt.event.MouseEvent evt)//GEN-FIRST:event_jTree1MouseClicked
     {//GEN-HEADEREND:event_jTree1MouseClicked
  @@ -413,30 +416,33 @@
       // 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.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
     
   }
   
   /***************************** 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
   //
  
  
  

Mime
View raw message