Mercurial > hg > ltpda
diff src/MPipeline2/src/mpipeline/workspace/WorkspaceBrowserDialog.java @ 29:54f14716c721 database-connection-manager
Update Java code
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +0100 |
parents | f0afece42f48 |
children |
line wrap: on
line diff
--- a/src/MPipeline2/src/mpipeline/workspace/WorkspaceBrowserDialog.java Mon Dec 05 16:20:06 2011 +0100 +++ b/src/MPipeline2/src/mpipeline/workspace/WorkspaceBrowserDialog.java Mon Dec 05 16:20:06 2011 +0100 @@ -83,164 +83,155 @@ * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") - // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents - private void initComponents() { + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents + private void initComponents() { - jToolBar1 = new javax.swing.JToolBar(); - plotBtn = new javax.swing.JButton(); - displayBtn = new javax.swing.JButton(); - plotHistoryBtn = new javax.swing.JButton(); - exploreBtn = new javax.swing.JButton(); - jSeparator1 = new javax.swing.JToolBar.Separator(); - submitBtn = new javax.swing.JButton(); - queryBtn = new javax.swing.JButton(); - retrieveBtn = new javax.swing.JButton(); - repositoryManagerBtn = new javax.swing.JButton(); - jPanel2 = new javax.swing.JPanel(); - doneBtn = new javax.swing.JButton(); - refreshBtn = new javax.swing.JButton(); - jScrollPane1 = new javax.swing.JScrollPane(); - workspaceTree = new WorkspaceTree(mw); + jToolBar1 = new javax.swing.JToolBar(); + plotBtn = new javax.swing.JButton(); + displayBtn = new javax.swing.JButton(); + plotHistoryBtn = new javax.swing.JButton(); + exploreBtn = new javax.swing.JButton(); + jSeparator1 = new javax.swing.JToolBar.Separator(); + submitBtn = new javax.swing.JButton(); + queryBtn = new javax.swing.JButton(); + retrieveBtn = new javax.swing.JButton(); + jPanel2 = new javax.swing.JPanel(); + doneBtn = new javax.swing.JButton(); + refreshBtn = new javax.swing.JButton(); + jScrollPane1 = new javax.swing.JScrollPane(); + workspaceTree = new WorkspaceTree(mw); - setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); - setTitle("Workspace Browser"); - setLocationByPlatform(true); + setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); + setTitle("Workspace Browser"); + setLocationByPlatform(true); - jToolBar1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); - jToolBar1.setFloatable(false); - jToolBar1.setOrientation(1); - jToolBar1.setRollover(true); - - plotBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/plot_small.png"))); // NOI18N - plotBtn.setToolTipText("Plot the selected AOs."); - plotBtn.setFocusable(false); - plotBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - plotBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/plot_small_ro.png"))); // NOI18N - plotBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(plotBtn); + jToolBar1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); + jToolBar1.setFloatable(false); + jToolBar1.setOrientation(javax.swing.SwingConstants.VERTICAL); + jToolBar1.setRollover(true); - displayBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/display.png"))); // NOI18N - displayBtn.setToolTipText("Display the selected object(s) on the Matlab terminal"); - displayBtn.setFocusable(false); - displayBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - displayBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/display_ro.png"))); // NOI18N - displayBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(displayBtn); + plotBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/plot_small.png"))); // NOI18N + plotBtn.setToolTipText("Plot the selected AOs."); + plotBtn.setFocusable(false); + plotBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + plotBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/plot_small_ro.png"))); // NOI18N + plotBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(plotBtn); - plotHistoryBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/history_small.png"))); // NOI18N - plotHistoryBtn.setToolTipText("Display the history of the selected objects."); - plotHistoryBtn.setFocusable(false); - plotHistoryBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - plotHistoryBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/history_small_ro.png"))); // NOI18N - plotHistoryBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(plotHistoryBtn); + displayBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/display.png"))); // NOI18N + displayBtn.setToolTipText("Display the selected object(s) on the Matlab terminal"); + displayBtn.setFocusable(false); + displayBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + displayBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/display_ro.png"))); // NOI18N + displayBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(displayBtn); - exploreBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/explore.png"))); // NOI18N - exploreBtn.setToolTipText("Explore the selected objects."); - exploreBtn.setFocusable(false); - exploreBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - exploreBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/explore_ro.png"))); // NOI18N - exploreBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(exploreBtn); - jToolBar1.add(jSeparator1); + plotHistoryBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/history_small.png"))); // NOI18N + plotHistoryBtn.setToolTipText("Display the history of the selected objects."); + plotHistoryBtn.setFocusable(false); + plotHistoryBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + plotHistoryBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/history_small_ro.png"))); // NOI18N + plotHistoryBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(plotHistoryBtn); - submitBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/add_to_database.png"))); // NOI18N - submitBtn.setToolTipText("Submit the selected objects to a repository."); - submitBtn.setFocusable(false); - submitBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - submitBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/add_to_database_ro.png"))); // NOI18N - submitBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(submitBtn); + exploreBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/explore.png"))); // NOI18N + exploreBtn.setToolTipText("Explore the selected objects."); + exploreBtn.setFocusable(false); + exploreBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + exploreBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/explore_ro.png"))); // NOI18N + exploreBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(exploreBtn); + jToolBar1.add(jSeparator1); - queryBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/search_database.png"))); // NOI18N - queryBtn.setToolTipText("Query an LTPDA Repository"); - queryBtn.setFocusable(false); - queryBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - queryBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/search_database_ro.png"))); // NOI18N - queryBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(queryBtn); + submitBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/add_to_database.png"))); // NOI18N + submitBtn.setToolTipText("Submit the selected objects to a repository."); + submitBtn.setFocusable(false); + submitBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + submitBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/add_to_database_ro.png"))); // NOI18N + submitBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(submitBtn); - retrieveBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/download_database.png"))); // NOI18N - retrieveBtn.setToolTipText("Retrieve objecst from a repository."); - retrieveBtn.setFocusable(false); - retrieveBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - retrieveBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/download_database_ro.png"))); // NOI18N - retrieveBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(retrieveBtn); + queryBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/search_database.png"))); // NOI18N + queryBtn.setToolTipText("Query an LTPDA Repository"); + queryBtn.setFocusable(false); + queryBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + queryBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/search_database_ro.png"))); // NOI18N + queryBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(queryBtn); - repositoryManagerBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/link.png"))); // NOI18N - repositoryManagerBtn.setToolTipText("Open the LTPDA repositorynamager"); - repositoryManagerBtn.setFocusable(false); - repositoryManagerBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); - repositoryManagerBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/link_ro.png"))); // NOI18N - repositoryManagerBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); - jToolBar1.add(repositoryManagerBtn); + retrieveBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/download_database.png"))); // NOI18N + retrieveBtn.setToolTipText("Retrieve objecst from a repository."); + retrieveBtn.setFocusable(false); + retrieveBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); + retrieveBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/download_database_ro.png"))); // NOI18N + retrieveBtn.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); + jToolBar1.add(retrieveBtn); - jPanel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); + jPanel2.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); - doneBtn.setText("Done"); - doneBtn.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent evt) { - doneBtnActionPerformed(evt); - } - }); + doneBtn.setText("Done"); + doneBtn.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + doneBtnActionPerformed(evt); + } + }); - refreshBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/refresh_small.png"))); // NOI18N - refreshBtn.setToolTipText("Refresh the workspace."); - refreshBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/refresh_small_ro.png"))); // NOI18N + refreshBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/refresh_small.png"))); // NOI18N + refreshBtn.setToolTipText("Refresh the workspace."); + refreshBtn.setRolloverIcon(new javax.swing.ImageIcon(getClass().getResource("/mpipeline/icons/refresh_small_ro.png"))); // NOI18N - org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); - jPanel2.setLayout(jPanel2Layout); - jPanel2Layout.setHorizontalGroup( - jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .add(refreshBtn) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 101, Short.MAX_VALUE) - .add(doneBtn) - .addContainerGap()) - ); - jPanel2Layout.setVerticalGroup( - jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jPanel2Layout.createSequentialGroup() - .addContainerGap() - .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) - .add(doneBtn) - .add(refreshBtn)) - .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - ); + org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); + jPanel2.setLayout(jPanel2Layout); + jPanel2Layout.setHorizontalGroup( + jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jPanel2Layout.createSequentialGroup() + .add(refreshBtn) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 140, Short.MAX_VALUE) + .add(doneBtn) + .addContainerGap()) + ); + jPanel2Layout.setVerticalGroup( + jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jPanel2Layout.createSequentialGroup() + .addContainerGap() + .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) + .add(doneBtn) + .add(refreshBtn)) + .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); - jPanel2Layout.linkSize(new java.awt.Component[] {doneBtn, refreshBtn}, org.jdesktop.layout.GroupLayout.VERTICAL); + jPanel2Layout.linkSize(new java.awt.Component[] {doneBtn, refreshBtn}, org.jdesktop.layout.GroupLayout.VERTICAL); - jScrollPane1.setViewportView(workspaceTree); + jScrollPane1.setViewportView(workspaceTree); - org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); - getContentPane().setLayout(layout); - layout.setHorizontalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .addContainerGap() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() - .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jToolBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) - .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) - .addContainerGap()) - ); - layout.setVerticalGroup( - layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(layout.createSequentialGroup() - .addContainerGap() - .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) - .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE) - .add(jToolBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)) - .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) - .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) - .addContainerGap()) - ); + org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() + .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jToolBar1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) + .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(layout.createSequentialGroup() + .addContainerGap() + .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) + .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE) + .add(jToolBar1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 325, Short.MAX_VALUE)) + .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) + .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) + .addContainerGap()) + ); - pack(); - }// </editor-fold>//GEN-END:initComponents + pack(); + }// </editor-fold>//GEN-END:initComponents private void doneBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_doneBtnActionPerformed @@ -248,23 +239,22 @@ }//GEN-LAST:event_doneBtnActionPerformed - // Variables declaration - do not modify//GEN-BEGIN:variables - private javax.swing.JButton displayBtn; - private javax.swing.JButton doneBtn; - private javax.swing.JButton exploreBtn; - private javax.swing.JPanel jPanel2; - private javax.swing.JScrollPane jScrollPane1; - private javax.swing.JToolBar.Separator jSeparator1; - private javax.swing.JToolBar jToolBar1; - private javax.swing.JButton plotBtn; - private javax.swing.JButton plotHistoryBtn; - private javax.swing.JButton queryBtn; - private javax.swing.JButton refreshBtn; - private javax.swing.JButton repositoryManagerBtn; - private javax.swing.JButton retrieveBtn; - private javax.swing.JButton submitBtn; - private javax.swing.JTree workspaceTree; - // End of variables declaration//GEN-END:variables + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton displayBtn; + private javax.swing.JButton doneBtn; + private javax.swing.JButton exploreBtn; + private javax.swing.JPanel jPanel2; + private javax.swing.JScrollPane jScrollPane1; + private javax.swing.JToolBar.Separator jSeparator1; + private javax.swing.JToolBar jToolBar1; + private javax.swing.JButton plotBtn; + private javax.swing.JButton plotHistoryBtn; + private javax.swing.JButton queryBtn; + private javax.swing.JButton refreshBtn; + private javax.swing.JButton retrieveBtn; + private javax.swing.JButton submitBtn; + private javax.swing.JTree workspaceTree; + // End of variables declaration//GEN-END:variables public JTree getWorkspaceTree() { @@ -302,10 +292,6 @@ return retrieveBtn; } - public JButton getRepositoryManagerBtn() { - return repositoryManagerBtn; - } - public TreePath[] getSelectedPaths() { return workspaceTree.getSelectionPaths(); }