List of usage examples for javax.swing JButton setText
@BeanProperty(preferred = true, visualUpdate = true, description = "The button's text.") public void setText(String text)
From source file:pi.bestdeal.gui.InterfacePrincipale.java
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed int idd = (int) jTable3.getModel().getValueAt(jTable3.getSelectedRow(), 0); ChoixStat1 chStat = new ChoixStat1(); ChoixStat2 chStat2 = new ChoixStat2(); Object[] options = { "BACK", "NEXT" }; int a = JOptionPane.showOptionDialog(null, chStat, "", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]); int b = 0;//from w ww . j a v a 2 s . c om if (chStat.jRadiosexe.isSelected() && chStat.jRadioconsult.isSelected()) { b = 0; } if (chStat.jRadiosexe.isSelected() && chStat.jRadiores.isSelected()) { b = 1; } if (chStat.jRadiooperation.isSelected() && chStat.jRadioconsult.isSelected()) { b = 2; } if (chStat.jRadiooperation.isSelected() && chStat.jRadiores.isSelected()) { b = 3; } if (a == 1 && b == 2) { chStat.setVisible(false); Object[] options2 = { "Annuler", "Afficher la Statistique" }; int c = JOptionPane.showOptionDialog(null, chStat2, "", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, options2, options[0]); if (c == 1) { java.util.Date d1 = chStat2.jDateDebut.getCalendar().getTime(); java.sql.Date sqlDate = new java.sql.Date(d1.getTime()); java.util.Date d2 = chStat2.jDatefin.getCalendar().getTime(); java.sql.Date sqlDate2 = new java.sql.Date(d2.getTime()); Charts charts = new Charts(); XYSeriesCollection dataxy = charts.createDataset(sqlDate.toString(), sqlDate2.toString(), idd); final JFreeChart chart = ChartFactory.createXYLineChart( "Evolution des Consultation par rapport au temps", "Jours", "Nombre des Consultations", // dataxy, // Dataset PlotOrientation.VERTICAL, // true, true, false); XYItemRenderer rend = chart.getXYPlot().getRenderer(); ChartPanel crepart = new ChartPanel(chart); Plot plot = chart.getPlot(); JPanel jpan = new JPanel(); JButton button = new JButton("Sauvegarder"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { JFileChooser chooser = new JFileChooser(); chooser.showSaveDialog(jPanel3); String path = chooser.getSelectedFile().getPath(); if ((!path.contains("jpg")) || (!path.contains("png")) || (!path.contains("jpeg"))) { path = path + ".png"; } File f = new File(path); ChartUtilities.saveChartAsPNG(new File(path), chart, 800, 600); if (f.exists() && !f.isDirectory()) { JOptionPane.showMessageDialog(null, "Sauvegarde Effectue"); Desktop.getDesktop().open(f); } } catch (IOException ex) { Logger.getLogger(InterfacePrincipale.class.getName()).log(Level.SEVERE, null, ex); } } }); jpan.add(crepart); jpan.add(button); JOptionPane.showConfirmDialog(null, jpan, "Chart d'volution des consultations", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); } } if (a == 1 && (b == 3)) { Object[] options2 = { "Annuler", "Afficher la Statistique" }; int c = JOptionPane.showOptionDialog(null, chStat2, "", JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE, null, options2, options[0]); if (c == 1) { java.util.Date d1 = chStat2.jDateDebut.getCalendar().getTime(); java.sql.Date sqlDate = new java.sql.Date(d1.getTime()); java.util.Date d2 = chStat2.jDatefin.getCalendar().getTime(); java.sql.Date sqlDate2 = new java.sql.Date(d2.getTime()); Charts charts = new Charts(); // JFreeChart chrt = ChartFactory.createXYStepAreaChart(null, null, null, null, PlotOrientation.HORIZONTAL, rootPaneCheckingEnabled, rootPaneCheckingEnabled, rootPaneCheckingEnabled) XYSeriesCollection dataxy = charts.createDatasetRes(sqlDate.toString(), sqlDate2.toString(), idd); final JFreeChart chart = ChartFactory.createXYLineChart( "Evolution des Consultation par rapport au temps", "Jours", "Nombre des Reservations", dataxy, PlotOrientation.VERTICAL, true, true, false); XYItemRenderer rend = chart.getXYPlot().getRenderer(); ChartPanel crepart = new ChartPanel(chart); Plot plot = chart.getPlot(); JPanel jpan = new JPanel(); jpan.setLayout(new FlowLayout(FlowLayout.LEADING)); JButton button = new JButton(); button.setText("Sauvegarder"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { JFileChooser chooser = new JFileChooser(); chooser.showSaveDialog(jPanel3); String path = chooser.getSelectedFile().getPath(); if ((!path.contains("jpg")) || (!path.contains("png")) || (!path.contains("jpeg"))) { path = path + ".png"; } File f = new File(path); ChartUtilities.saveChartAsPNG(new File(path), chart, 800, 600); if (f.exists() && !f.isDirectory()) { JOptionPane.showMessageDialog(null, "Sauvegarde Effectue"); Desktop.getDesktop().open(f); } } catch (IOException ex) { Logger.getLogger(InterfacePrincipale.class.getName()).log(Level.SEVERE, null, ex); } } }); jpan.add(crepart); jpan.add(button); JOptionPane.showConfirmDialog(null, jpan, "Test", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); } } if (a == 1 && b == 0) { ConsultationDAO cdao = ConsultationDAO.getInstance(); DefaultPieDataset union = new DefaultPieDataset(); union.setValue("Homme", cdao.consultationCounterByGender(false, idd)); union.setValue("Femme", cdao.consultationCounterByGender(true, idd)); final JFreeChart repart = ChartFactory.createPieChart3D("Rpartition par Sexe", union, true, true, false); ChartPanel crepart = new ChartPanel(repart); Plot plot = repart.getPlot(); JPanel jpan = new JPanel(); JButton button = new JButton("Sauvegarder"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { JFileChooser chooser = new JFileChooser(); chooser.showSaveDialog(jPanel3); String path = chooser.getSelectedFile().getPath(); if ((!path.contains("jpg")) || (!path.contains("png")) || (!path.contains("jpeg"))) { path = path + ".png"; } File f = new File(path); ChartUtilities.saveChartAsPNG(new File(path), repart, 800, 600); if (f.exists() && !f.isDirectory()) { JOptionPane.showMessageDialog(null, "Sauvegarde Effectue"); Desktop.getDesktop().open(f); } } catch (IOException ex) { Logger.getLogger(InterfacePrincipale.class.getName()).log(Level.SEVERE, null, ex); } } }); jpan.add(crepart); jpan.add(button); JOptionPane.showConfirmDialog(null, jpan, "", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); } if (a == 1 && b == 1) { DefaultPieDataset union = new DefaultPieDataset(); ReservationDAO dAO = ReservationDAO.getInstance(); union.setValue("Homme", dAO.reservationCounterByGender(false, idd)); union.setValue("Femme", dAO.reservationCounterByGender(true, idd)); final JFreeChart repart = ChartFactory.createPieChart3D("Rpartition par Sexe", union, true, true, false); ChartPanel crepart = new ChartPanel(repart); Plot plot = repart.getPlot(); JPanel jpan = new JPanel(); JButton button = new JButton("Sauvegarder"); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try { JFileChooser chooser = new JFileChooser(); chooser.showSaveDialog(jPanel3); String path = chooser.getSelectedFile().getPath(); if ((!path.contains("jpg")) || (!path.contains("png")) || (!path.contains("jpeg"))) { path = path + ".png"; } File f = new File(path); ChartUtilities.saveChartAsPNG(new File(path), repart, 800, 600); if (f.exists() && !f.isDirectory()) { JOptionPane.showMessageDialog(null, "Sauvegarde Effectue"); Desktop.getDesktop().open(f); } } catch (IOException ex) { Logger.getLogger(InterfacePrincipale.class.getName()).log(Level.SEVERE, null, ex); } } }); jpan.add(crepart); jpan.add(button); JOptionPane.showConfirmDialog(null, jpan, "Chart de la rpartition des achat par sexe", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE); } }
From source file:org.mahasen.client.gui.MahasenClient.java
/** * This method is called from within the constructor to * initialize the form.//from w w w . ja v a2 s . c o m * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); clientTabbedPane = new javax.swing.JTabbedPane(); uploadPanel = new javax.swing.JPanel(); uploadFileChooserButton = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); uploadTagsTextField = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); uploadButton = new javax.swing.JButton(); jLabel16 = new javax.swing.JLabel(); javax.swing.JButton uploadAddPropertiesButton = new javax.swing.JButton(); jLabel20 = new javax.swing.JLabel(); folderStructureText = new javax.swing.JTextField(); downloadPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); downloadTextField = new javax.swing.JTextField(); downloadButton = new javax.swing.JButton(); jLabel19 = new javax.swing.JLabel(); downloadRepoChooseButton = new javax.swing.JButton(); chosenDirectroyLabel = new javax.swing.JLabel(); deletePanel = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); deleteTextField = new javax.swing.JTextField(); deleteButton = new javax.swing.JButton(); searchPanel = new javax.swing.JPanel(); searchButton = new javax.swing.JButton(); jLabel8 = new javax.swing.JLabel(); rangeBasedPanel = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); initialValueTextField = new javax.swing.JTextField(); lastValueTextField = new javax.swing.JTextField(); jComboBox3 = new javax.swing.JComboBox(); customPropertyPanel2 = new javax.swing.JPanel(); jLabel11 = new javax.swing.JLabel(); customPropertyTextField2 = new javax.swing.JTextField(); propertryBasedPanel = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); propertyValueTextField = new javax.swing.JTextField(); jLabel12 = new javax.swing.JLabel(); jComboBox2 = new javax.swing.JComboBox(); customPropertyPanel1 = new javax.swing.JPanel(); jLabel13 = new javax.swing.JLabel(); customPropertyTextField1 = new javax.swing.JTextField(); jComboBox1 = new javax.swing.JComboBox(); jLabel14 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); SearchResult = new javax.swing.JTextArea(); tagBasedPanel = new javax.swing.JPanel(); jLabel15 = new javax.swing.JLabel(); tagTextField = new javax.swing.JTextField(); advancedSearchButton = new javax.swing.JButton(); updatePanel = new javax.swing.JPanel(); updateButton = new javax.swing.JButton(); updateAddNewPropertyButton = new javax.swing.JButton(); updateTagsTextField = new javax.swing.JTextField(); jLabel9 = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); updateFileNameTextField = new javax.swing.JTextField(); jLabel18 = new javax.swing.JLabel(); logoutButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); loggedInAsLabel = new javax.swing.JLabel(); userNameLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Mahasen Client"); uploadFileChooserButton.setText("Choose a File :"); uploadFileChooserButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { uploadFileChooserButtonActionPerformed(evt); } }); jLabel2.setText("Tags :"); jLabel3.setText("(enter tags seperated by commas \",\")"); uploadButton.setText("Upload"); uploadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { uploadButtonActionPerformed(evt); } }); uploadAddPropertiesButton.setText("Add Properties"); // NOI18N uploadAddPropertiesButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { uploadAddPropertiesButtonaddPropertiesButtonActionPerformed(evt); } }); jLabel20.setText("Folder Structure:"); javax.swing.GroupLayout uploadPanelLayout = new javax.swing.GroupLayout(uploadPanel); uploadPanel.setLayout(uploadPanelLayout); uploadPanelLayout.setHorizontalGroup(uploadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(uploadPanelLayout.createSequentialGroup().addContainerGap() .addGroup(uploadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(uploadFileChooserButton) .addGroup(uploadPanelLayout.createSequentialGroup().addGap(8, 8, 8) .addGroup(uploadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel20).addComponent(jLabel2)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE) .addGroup(uploadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(folderStructureText) .addComponent(jLabel16, javax.swing.GroupLayout.DEFAULT_SIZE, 252, Short.MAX_VALUE) .addComponent(uploadTagsTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(60, 60, 60)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, uploadPanelLayout.createSequentialGroup() .addGap(167, 167, 167) .addGroup(uploadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(uploadButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE) .addComponent(uploadAddPropertiesButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 143, Short.MAX_VALUE)) .addGap(165, 165, 165))); uploadPanelLayout.setVerticalGroup(uploadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(uploadPanelLayout.createSequentialGroup().addGap(74, 74, 74) .addGroup(uploadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(uploadFileChooserButton).addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(58, 58, 58) .addGroup(uploadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(uploadTagsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel3) .addGap(22, 22, 22) .addGroup(uploadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(folderStructureText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel20)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE) .addComponent(uploadAddPropertiesButton).addGap(18, 18, 18).addComponent(uploadButton) .addGap(60, 60, 60))); clientTabbedPane.addTab("Upload", uploadPanel); jLabel1.setText("Name of the File :"); downloadTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { downloadTextFieldActionPerformed(evt); } }); downloadButton.setText("Download"); downloadButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { downloadButtonActionPerformed(evt); } }); jLabel19.setText("Download Repo :"); downloadRepoChooseButton.setText("Choose Directory :"); downloadRepoChooseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { downloadRepoChooseButtonActionPerformed(evt); } }); chosenDirectroyLabel.setText("No Directory Chosen."); javax.swing.GroupLayout downloadPanelLayout = new javax.swing.GroupLayout(downloadPanel); downloadPanel.setLayout(downloadPanelLayout); downloadPanelLayout.setHorizontalGroup(downloadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(downloadPanelLayout.createSequentialGroup().addGroup(downloadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(downloadPanelLayout.createSequentialGroup().addGap(21, 21, 21) .addGroup(downloadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1).addComponent(jLabel19)) .addGap(18, 18, 18) .addGroup(downloadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(downloadPanelLayout.createSequentialGroup().addGap(16, 16, 16) .addComponent(chosenDirectroyLabel)) .addComponent(downloadRepoChooseButton).addComponent(downloadTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(downloadPanelLayout.createSequentialGroup().addGap(158, 158, 158).addComponent( downloadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(31, Short.MAX_VALUE))); downloadPanelLayout .setVerticalGroup(downloadPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(downloadPanelLayout.createSequentialGroup().addGap(132, 132, 132) .addGroup(downloadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(downloadTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(19, 19, 19) .addGroup(downloadPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel19).addComponent(downloadRepoChooseButton)) .addGap(7, 7, 7).addComponent(chosenDirectroyLabel).addGap(37, 37, 37) .addComponent(downloadButton).addContainerGap(149, Short.MAX_VALUE))); clientTabbedPane.addTab("Download", downloadPanel); jLabel4.setText("Name of the FIle :"); deleteButton.setText("Delete"); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); javax.swing.GroupLayout deletePanelLayout = new javax.swing.GroupLayout(deletePanel); deletePanel.setLayout(deletePanelLayout); deletePanelLayout.setHorizontalGroup(deletePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(deletePanelLayout.createSequentialGroup() .addGroup(deletePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(deletePanelLayout.createSequentialGroup().addGap(23, 23, 23) .addComponent(jLabel4).addGap(18, 18, 18).addComponent(deleteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 294, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(deletePanelLayout.createSequentialGroup().addGap(165, 165, 165) .addComponent(deleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(30, Short.MAX_VALUE))); deletePanelLayout.setVerticalGroup(deletePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(deletePanelLayout.createSequentialGroup().addGap(133, 133, 133) .addGroup(deletePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(deleteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4)) .addGap(101, 101, 101).addComponent(deleteButton).addContainerGap(152, Short.MAX_VALUE))); clientTabbedPane.addTab("Delete", deletePanel); searchButton.setText("Search"); searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButtonActionPerformed(evt); } }); jLabel8.setText("Search results :"); rangeBasedPanel.setName("Panel1"); // NOI18N jLabel5.setText("Property Name"); jLabel6.setText("Initial Value"); jLabel7.setText("Last Value"); initialValueTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { initialValueTextFieldActionPerformed(evt); } }); jComboBox3.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "File Name", "File Size", "Uploaded Date", "Custom Property" })); jComboBox3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox3ActionPerformed(evt); } }); jLabel11.setText("Custom Property Name"); customPropertyTextField2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { customPropertyTextField2ActionPerformed(evt); } }); javax.swing.GroupLayout customPropertyPanel2Layout = new javax.swing.GroupLayout(customPropertyPanel2); customPropertyPanel2.setLayout(customPropertyPanel2Layout); customPropertyPanel2Layout.setHorizontalGroup(customPropertyPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(customPropertyPanel2Layout.createSequentialGroup().addGap(20, 20, 20) .addComponent(jLabel11) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 37, Short.MAX_VALUE) .addComponent(customPropertyTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(31, 31, 31))); customPropertyPanel2Layout.setVerticalGroup(customPropertyPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(customPropertyPanel2Layout.createSequentialGroup().addContainerGap(18, Short.MAX_VALUE) .addGroup(customPropertyPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11).addComponent(customPropertyTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))); javax.swing.GroupLayout rangeBasedPanelLayout = new javax.swing.GroupLayout(rangeBasedPanel); rangeBasedPanel.setLayout(rangeBasedPanelLayout); rangeBasedPanelLayout.setHorizontalGroup(rangeBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel5) .addGap(86, 86, 86).addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(customPropertyPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(18, 18, 18).addComponent(jLabel6) .addGap(110, 110, 110).addComponent(initialValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(18, 18, 18).addComponent(jLabel7) .addGap(117, 117, 117).addComponent(lastValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 245, javax.swing.GroupLayout.PREFERRED_SIZE))); rangeBasedPanelLayout.setVerticalGroup( rangeBasedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(10, 10, 10) .addGroup(rangeBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(7, 7, 7) .addComponent(jLabel5)) .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(8, 8, 8) .addComponent(customPropertyPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(14, 14, 14) .addGroup(rangeBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(9, 9, 9) .addComponent(jLabel6)) .addComponent(initialValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15) .addGroup(rangeBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(rangeBasedPanelLayout.createSequentialGroup().addGap(6, 6, 6) .addComponent(jLabel7)) .addComponent(lastValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))); propertryBasedPanel.setName("propertryBasedPanel"); // NOI18N jLabel10.setText("Property Value"); propertyValueTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { propertyValueTextFieldActionPerformed(evt); } }); propertyValueTextField.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { searchKeyTped(evt); } }); jLabel12.setText("Property Name"); jComboBox2.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "File Name", "File Size", "Uploaded Date", "Folder Structure", "Custom Property" })); jComboBox2.setMinimumSize(new java.awt.Dimension(166, 25)); jComboBox2.setOpaque(false); jComboBox2.setPreferredSize(new java.awt.Dimension(166, 25)); jComboBox2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox2ActionPerformed(evt); } }); jLabel13.setText("Custom Property Name"); customPropertyTextField1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { customPropertyTextField1ActionPerformed(evt); } }); javax.swing.GroupLayout customPropertyPanel1Layout = new javax.swing.GroupLayout(customPropertyPanel1); customPropertyPanel1.setLayout(customPropertyPanel1Layout); customPropertyPanel1Layout.setHorizontalGroup(customPropertyPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, customPropertyPanel1Layout .createSequentialGroup().addContainerGap() .addComponent(jLabel13, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(customPropertyTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 242, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(25, 25, 25))); customPropertyPanel1Layout.setVerticalGroup(customPropertyPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(customPropertyPanel1Layout.createSequentialGroup().addContainerGap() .addGroup(customPropertyPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(customPropertyTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); javax.swing.GroupLayout propertryBasedPanelLayout = new javax.swing.GroupLayout(propertryBasedPanel); propertryBasedPanel.setLayout(propertryBasedPanelLayout); propertryBasedPanelLayout.setHorizontalGroup(propertryBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(propertryBasedPanelLayout.createSequentialGroup().addGroup(propertryBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, propertryBasedPanelLayout .createSequentialGroup().addContainerGap() .addGroup(propertryBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(propertryBasedPanelLayout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 75, Short.MAX_VALUE) .addComponent(propertyValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(24, 24, 24)) .addComponent(customPropertyPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(propertryBasedPanelLayout.createSequentialGroup().addGap(25, 25, 25) .addComponent(jLabel12) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(23, 23, 23))) .addContainerGap())); propertryBasedPanelLayout.setVerticalGroup(propertryBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(propertryBasedPanelLayout.createSequentialGroup().addGap(20, 20, 20) .addGroup(propertryBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(customPropertyPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(7, 7, 7) .addGroup(propertryBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(propertyValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel10)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "Property Search", "Range Based Search", "Tag Search" })); jComboBox1.setInheritsPopupMenu(true); jComboBox1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBox1ActionPerformed(evt); } }); jLabel14.setText("Search Type"); SearchResult.setColumns(20); SearchResult.setRows(5); jScrollPane1.setViewportView(SearchResult); tagBasedPanel.setName("Panel1"); // NOI18N jLabel15.setText("Tags to search :"); tagTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tagTextFieldActionPerformed(evt); } }); javax.swing.GroupLayout tagBasedPanelLayout = new javax.swing.GroupLayout(tagBasedPanel); tagBasedPanel.setLayout(tagBasedPanelLayout); tagBasedPanelLayout.setHorizontalGroup(tagBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tagBasedPanelLayout.createSequentialGroup() .addGap(20, 20, 20) .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE) .addComponent(tagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 248, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); tagBasedPanelLayout.setVerticalGroup( tagBasedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, tagBasedPanelLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(tagBasedPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel15)) .addContainerGap())); advancedSearchButton.setText("Advanced Search"); advancedSearchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { advancedSearchButtonActionPerformed(evt); } }); javax.swing.GroupLayout searchPanelLayout = new javax.swing.GroupLayout(searchPanel); searchPanel.setLayout(searchPanelLayout); searchPanelLayout.setHorizontalGroup(searchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(searchPanelLayout.createSequentialGroup().addGroup(searchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(searchPanelLayout.createSequentialGroup().addContainerGap().addComponent( tagBasedPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(searchPanelLayout.createSequentialGroup().addGap(54, 54, 54) .addGroup(searchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 403, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(searchPanelLayout.createSequentialGroup().addGap(34, 34, 34) .addGroup(searchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(advancedSearchButton) .addGroup(searchPanelLayout.createSequentialGroup() .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32).addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 246, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(searchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, searchPanelLayout.createSequentialGroup().addContainerGap().addComponent( propertryBasedPanel, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, searchPanelLayout.createSequentialGroup().addGap(12, 12, 12).addComponent( rangeBasedPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, searchPanelLayout.createSequentialGroup() .addContainerGap(187, Short.MAX_VALUE).addComponent(searchButton, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(184, 184, 184))); searchPanelLayout.setVerticalGroup(searchPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(searchPanelLayout.createSequentialGroup().addGap(16, 16, 16) .addComponent(advancedSearchButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(searchPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(searchPanelLayout.createSequentialGroup().addGap(5, 5, 5).addComponent( jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(7, 7, 7) .addComponent(propertryBasedPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(rangeBasedPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tagBasedPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26).addComponent(searchButton).addGap(11, 11, 11).addComponent(jLabel8) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); clientTabbedPane.addTab("Search", searchPanel); updateButton.setText("Update"); updateButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { updateButtonActionPerformed(evt); } }); updateAddNewPropertyButton.setText("Add New Property"); updateAddNewPropertyButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { updateAddNewPropertyButtonActionPerformed(evt); } }); jLabel9.setText("Tags :"); jLabel17.setText("(enter tags seperated by commas \",\")"); jLabel18.setText("FileName :"); javax.swing.GroupLayout updatePanelLayout = new javax.swing.GroupLayout(updatePanel); updatePanel.setLayout(updatePanelLayout); updatePanelLayout.setHorizontalGroup(updatePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(updatePanelLayout.createSequentialGroup().addGroup(updatePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(updatePanelLayout.createSequentialGroup().addGap(42, 42, 42) .addGroup(updatePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel17) .addGroup(updatePanelLayout.createSequentialGroup() .addGroup(updatePanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9).addComponent(jLabel18)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(updatePanelLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(updateAddNewPropertyButton) .addComponent(updateTagsTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE) .addComponent(updateFileNameTextField))))) .addGroup(updatePanelLayout.createSequentialGroup().addGap(173, 173, 173).addComponent( updateButton, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(58, Short.MAX_VALUE))); updatePanelLayout.setVerticalGroup(updatePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(updatePanelLayout.createSequentialGroup().addGap(55, 55, 55) .addGroup(updatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(updateFileNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel18)) .addGap(18, 18, 18).addComponent(updateAddNewPropertyButton).addGap(18, 18, 18) .addGroup(updatePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9).addComponent(updateTagsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18).addComponent(jLabel17).addGap(89, 89, 89).addComponent(updateButton) .addContainerGap(121, Short.MAX_VALUE))); clientTabbedPane.addTab("Update", updatePanel); logoutButton.setText("Logout"); logoutButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { logoutButtonActionPerformed(evt); } }); cancelButton.setText("Cancel"); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); loggedInAsLabel.setText("Logged in as :"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addGap(6, 6, 6) .addComponent(loggedInAsLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(userNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addComponent(logoutButton, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(39, 39, 39) .addComponent(cancelButton, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(45, 45, 45)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(clientTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 491, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(clientTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 485, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton).addComponent(logoutButton)) .addGroup(jPanel1Layout.createSequentialGroup().addGap(2, 2, 2) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(loggedInAsLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(userNameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(47, Short.MAX_VALUE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width - 515) / 2, (screenSize.height - 590) / 2, 515, 590); }
From source file:src.gui.ItSIMPLE.java
private JToolBar getPlanDatabaseToolBar() { JToolBar planDatabaseToolBar = new JToolBar(); planDatabaseToolBar.setRollover(true); // create the buttons //select plans from data base JButton searchButton = new JButton("Search", new ImageIcon("resources/images/searchdatabase.png")); searchButton.setToolTipText("Search plans in the database"); searchButton.addActionListener(new java.awt.event.ActionListener() { @Override// ww w. j a v a 2 s. c o m public void actionPerformed(ActionEvent e) { //RUN search plan from database searchPlanInDatabaseAction.actionPerformed(e); } }); planDatabaseToolBar.add(searchButton); final JButton filterButton = new JButton("Filter", new ImageIcon("resources/images/filtersearchdatabase.png")); filterButton .setToolTipText("Filter the search for plans in the database (use colunms of table 'plan' only)"); filterButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { //hide/show filter panel if (planFilterPanel.isVisible()) { planFilterPanel.setVisible(false); filterButton.setText("Filter"); } else { planFilterPanel.setVisible(true); filterButton.setText("Don't filter"); } } }); planDatabaseToolBar.add(filterButton); planDatabaseToolBar.addSeparator(); //insert plan into data base JButton addPlanToDatabaseButton = new JButton("Add Plan", new ImageIcon("resources/images/addplantodatabase.png")); addPlanToDatabaseButton.setToolTipText("Add current plan to the database"); addPlanToDatabaseButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { //RUN plan evaluation edit insertPlanIntoDatabaseAction.actionPerformed(e); } }); planDatabaseToolBar.add(addPlanToDatabaseButton); //load plan from data base JButton loadPlanFromDatabaseButton = new JButton("Load Plan", new ImageIcon("resources/images/getfromdatabase.png")); loadPlanFromDatabaseButton.setToolTipText("Load selected plan into itSIMPLE"); loadPlanFromDatabaseButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { //RUN loading plan loadPlanFromDatabaseAction.actionPerformed(e); } }); planDatabaseToolBar.add(loadPlanFromDatabaseButton); //delete plan from data base JButton deletePlanFromDatabaseButton = new JButton("Delete Plan", new ImageIcon("resources/images/deleteplanfromdatabase.png")); deletePlanFromDatabaseButton.setToolTipText("Delete selected plan"); deletePlanFromDatabaseButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { //RUN loading plan deletePlanFromDatabaseAction.actionPerformed(e); } }); planDatabaseToolBar.add(deletePlanFromDatabaseButton); //update plan from data base JButton updatePlanFromDatabaseButton = new JButton("Update Plan", new ImageIcon("resources/images/updateplanfromdatabase.png")); updatePlanFromDatabaseButton.setToolTipText("Update current plan"); updatePlanFromDatabaseButton.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(ActionEvent e) { //RUN update plan updatePlanFromDatabaseAction.actionPerformed(e); } }); planDatabaseToolBar.add(updatePlanFromDatabaseButton); return planDatabaseToolBar; }
From source file:musite.ui.MusiteResultPanel.java
/** This method is called from within the constructor to * initialize the form.//from www. j a v a 2 s . c om * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; resDispPanel = new javax.swing.JPanel(); javax.swing.JPanel modelPanel = new javax.swing.JPanel(); modelComboBox = new javax.swing.JComboBox(); javax.swing.JPanel accPanel = new javax.swing.JPanel(); proteinListComboBox = new javax.swing.JComboBox(); javax.swing.JPanel optionPanel = new javax.swing.JPanel(); phosphoCheckBox = new javax.swing.JCheckBox(); alphabetCheckBox = new javax.swing.JCheckBox(); displayTabbedPane = new javax.swing.JTabbedPane(); sequenceScrollPane = new javax.swing.JScrollPane(); sitesScrollPane = new javax.swing.JScrollPane(); javax.swing.JPanel adjustPanel = new javax.swing.JPanel(); javax.swing.JPanel threholdPanel = new javax.swing.JPanel(); javax.swing.JPanel sliderBasePanel = new javax.swing.JPanel(); sliderTitleComboBox = new javax.swing.JComboBox(); javax.swing.JPanel specificityPanel = new javax.swing.JPanel(); javax.swing.JLabel specificityLabel = new javax.swing.JLabel(); specificityTextField = new javax.swing.JTextField(); javax.swing.JLabel percLabel = new javax.swing.JLabel(); javax.swing.JLabel scoreCutoffLabel = new javax.swing.JLabel(); scoreCutoffTextField = new javax.swing.JTextField(); specificitySlider = new javax.swing.JSlider(); javax.swing.JPanel exportPanel = new javax.swing.JPanel(); exportComboBox = new javax.swing.JComboBox(); javax.swing.JPanel closePanel = new javax.swing.JPanel(); javax.swing.JButton saveButton = new javax.swing.JButton(); setLayout(new java.awt.GridBagLayout()); resDispPanel.setLayout(new java.awt.GridBagLayout()); modelPanel.setVisible(result.getModels().size() > 1); modelPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Select model")); modelPanel.setLayout(new javax.swing.BoxLayout(modelPanel, javax.swing.BoxLayout.LINE_AXIS)); PredictionModel[] models = result.getModels().toArray(new PredictionModel[0]); java.util.Arrays.sort(models, new java.util.Comparator<PredictionModel>() { public int compare(PredictionModel model1, PredictionModel model2) { String name1 = model1.getName(); String name2 = model2.getName(); if (name1 == null) return name2 == null ? 0 : -1; if (name2 == null) return 1; return name1.compareTo(name2); } }); modelComboBox.setModel(new javax.swing.DefaultComboBoxModel(models)); modelComboBox.setSelectedIndex(0); modelComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { modelComboBoxActionPerformed(evt); } }); modelPanel.add(modelComboBox); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 3); resDispPanel.add(modelPanel, gridBagConstraints); accPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Select protein(s)")); accPanel.setLayout(new java.awt.GridBagLayout()); Vector pros = new Vector(result.proteins()); //pros.add("Display all listed proteins"); proteinListComboBox.setModel(new javax.swing.DefaultComboBoxModel(pros)); proteinListComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { proteinListComboBoxActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 3); accPanel.add(proteinListComboBox, gridBagConstraints); optionPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 3, 3)); phosphoCheckBox.setText("List predicted phosphoproteins only"); phosphoCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { phosphoCheckBoxActionPerformed(evt); } }); optionPanel.add(phosphoCheckBox); alphabetCheckBox.setText("List alphabetically (according to accessions)"); alphabetCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { alphabetCheckBoxActionPerformed(evt); } }); optionPanel.add(alphabetCheckBox); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; accPanel.add(optionPanel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; resDispPanel.add(accPanel, gridBagConstraints); displayTextPane = new ViewResultTextPane(); sequenceScrollPane.setViewportView(displayTextPane); displayTabbedPane.addTab("Sequence(s)", sequenceScrollPane); displayTable = new ViewResultTable(); sitesScrollPane.setViewportView(displayTable); displayTabbedPane.addTab("Predicted Sites", sitesScrollPane); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; resDispPanel.add(displayTabbedPane, gridBagConstraints); adjustPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Stringency setting")); adjustPanel.setLayout(new java.awt.GridBagLayout()); threholdPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 0)); sliderBasePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Sliding according to")); sliderBasePanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 5, 0)); sliderTitleComboBox.setMinimumSize(new java.awt.Dimension(150, 18)); sliderTitleComboBox.setPreferredSize(new java.awt.Dimension(150, 22)); sliderTitleComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sliderTitleComboBoxActionPerformed(evt); } }); sliderBasePanel.add(sliderTitleComboBox); threholdPanel.add(sliderBasePanel); specificityPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Cutoff")); specificityPanel.setLayout(new java.awt.GridBagLayout()); specificityLabel.setText("Specificity:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(3, 3, 3, 0); specificityPanel.add(specificityLabel, gridBagConstraints); specificityTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); specificityTextField.setMinimumSize(new java.awt.Dimension(60, 19)); specificityTextField.setPreferredSize(new java.awt.Dimension(60, 19)); specificityTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { specificityTextFieldActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 1); specificityPanel.add(specificityTextField, gridBagConstraints); percLabel.setText("%"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(0, 1, 0, 20); specificityPanel.add(percLabel, gridBagConstraints); scoreCutoffLabel.setText("Score:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridy = 0; specificityPanel.add(scoreCutoffLabel, gridBagConstraints); scoreCutoffTextField.setHorizontalAlignment(javax.swing.JTextField.RIGHT); scoreCutoffTextField.setMinimumSize(new java.awt.Dimension(60, 19)); scoreCutoffTextField.setPreferredSize(new java.awt.Dimension(60, 19)); scoreCutoffTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { scoreCutoffTextFieldActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(0, 3, 0, 20); specificityPanel.add(scoreCutoffTextField, gridBagConstraints); threholdPanel.add(specificityPanel); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; adjustPanel.add(threholdPanel, gridBagConstraints); specificitySlider.setPaintLabels(true); specificitySlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { specificitySliderStateChanged(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; adjustPanel.add(specificitySlider, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); resDispPanel.add(adjustPanel, gridBagConstraints); exportPanel.setLayout(new javax.swing.BoxLayout(exportPanel, javax.swing.BoxLayout.LINE_AXIS)); exportComboBox.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "Export this result as...", "Tab-delimited text file" })); exportComboBox.setMinimumSize(new java.awt.Dimension(200, 18)); exportComboBox.setPreferredSize(new java.awt.Dimension(200, 22)); exportComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exportComboBoxActionPerformed(evt); } }); exportPanel.add(exportComboBox); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); resDispPanel.add(exportPanel, gridBagConstraints); closePanel.setLayout(new javax.swing.BoxLayout(closePanel, javax.swing.BoxLayout.LINE_AXIS)); saveButton.setText("Save As..."); saveButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveButtonActionPerformed(evt); } }); closePanel.add(saveButton); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); resDispPanel.add(closePanel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; add(resDispPanel, gridBagConstraints); }
From source file:cfa.vo.sed.science.stacker.SedStackerFrame.java
/** This method is called from within the constructor to * initialize the form./*from w w w.j a va2 s .c o m*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new org.jdesktop.beansbinding.BindingGroup(); javax.swing.ButtonGroup buttonGroup1 = new javax.swing.ButtonGroup(); javax.swing.ButtonGroup buttonGroup2 = new javax.swing.ButtonGroup(); jPopupMenu1 = new javax.swing.JPopupMenu(); javax.swing.JMenuItem jMenuItem1 = new javax.swing.JMenuItem(); jPopupMenu2 = new javax.swing.JPopupMenu(); javax.swing.JMenuItem jMenuItem2 = new javax.swing.JMenuItem(); jButton1 = new javax.swing.JButton(); javax.swing.JPanel jPanel1 = new javax.swing.JPanel(); stackPanel = new javax.swing.JScrollPane(); jList1 = new javax.swing.JList(); javax.swing.JPanel jPanel5 = new javax.swing.JPanel(); correctFlux = new javax.swing.JCheckBox(); jTextField8 = new javax.swing.JTextField(); javax.swing.JLabel jLabel11 = new javax.swing.JLabel(); redshiftButton = new javax.swing.JButton(); javax.swing.JLabel jLabel6 = new javax.swing.JLabel(); jRadioButton3 = new javax.swing.JRadioButton(); jRadioButton4 = new javax.swing.JRadioButton(); integrationXMaxText = new javax.swing.JTextField(); integrationMinMaxUnit = new WiderJComboBox(); integrationYUnit = new WiderJComboBox(); integrationValueText = new javax.swing.JTextField(); integrationNormType = new javax.swing.JComboBox(); javax.swing.JLabel integrationNormToLabel = new javax.swing.JLabel(); javax.swing.JLabel integrationXMinLabel = new javax.swing.JLabel(); integrationXMinText = new javax.swing.JTextField(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); javax.swing.JLabel atPointXLabel = new javax.swing.JLabel(); javax.swing.JLabel atPointYLabel = new javax.swing.JLabel(); atPointXText = new javax.swing.JTextField(); atPointYType = new javax.swing.JComboBox(); atPointXUnit = new javax.swing.JComboBox(); atPointYText = new javax.swing.JTextField(); atPointYUnit = new javax.swing.JComboBox(); normalizeButton = new javax.swing.JButton(); javax.swing.JSeparator jSeparator1 = new javax.swing.JSeparator(); javax.swing.JLabel integrationXMaxLabel = new javax.swing.JLabel(); javax.swing.JCheckBox jCheckBox1 = new javax.swing.JCheckBox(); javax.swing.JCheckBox jCheckBox2 = new javax.swing.JCheckBox(); javax.swing.JPanel jPanel4 = new javax.swing.JPanel(); addButton = new javax.swing.JButton(); removeButton = new javax.swing.JButton(); javax.swing.JScrollPane jScrollPane2 = new javax.swing.JScrollPane(); sedsTable = new javax.swing.JTable(); javax.swing.JPanel jPanel6 = new javax.swing.JPanel(); javax.swing.JLabel jLabel7 = new javax.swing.JLabel(); stackStatisticComboBox = new javax.swing.JComboBox(); smoothCheckBox = new javax.swing.JCheckBox(); javax.swing.JLabel jLabel8 = new javax.swing.JLabel(); jTextField6 = new javax.swing.JTextField(); logBinningCheckBox = new javax.swing.JCheckBox(); javax.swing.JLabel jLabel9 = new javax.swing.JLabel(); binsizeTextField = new javax.swing.JTextField(); stackBinSizeUnitsComboBox = new javax.swing.JComboBox(); javax.swing.JLabel jLabel10 = new javax.swing.JLabel(); stackButton = new javax.swing.JButton(); stackYUnitComboBox = new javax.swing.JComboBox(); javax.swing.JLabel jLabel1 = new javax.swing.JLabel(); javax.swing.JPanel jPanel2 = new javax.swing.JPanel(); resetButton = new javax.swing.JButton(); javax.swing.JButton deleteButton = new javax.swing.JButton(); createSedButton = new javax.swing.JButton(); jPopupMenu1.setName("jPopupMenu1"); // NOI18N jMenuItem1.setText("Rename..."); jMenuItem1.setName("jMenuItem1"); // NOI18N jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jPopupMenu1.add(jMenuItem1); jPopupMenu2.setName("jPopupMenu2"); // NOI18N jMenuItem2.setText("Change redshift..."); jMenuItem2.setName("jMenuItem2"); // NOI18N jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem2ActionPerformed(evt); } }); jPopupMenu2.add(jMenuItem2); setClosable(true); setDefaultCloseOperation(javax.swing.WindowConstants.HIDE_ON_CLOSE); setIconifiable(true); setResizable(true); setTitle("SED Stacker"); jButton1.setText("Create New Stack"); jButton1.setName("jButton1"); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { newStack(evt); } }); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Open Stacks")); jPanel1.setName("jPanel1"); // NOI18N stackPanel.setName("stackPanel"); // NOI18N jList1.setModel(new javax.swing.AbstractListModel() { String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); jList1.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jList1.setName("jList1"); // NOI18N org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${stacks}"); org.jdesktop.swingbinding.JListBinding jListBinding = org.jdesktop.swingbinding.SwingBindings .createJListBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, eLProperty, jList1); jListBinding.setSourceUnreadableValue(null); bindingGroup.addBinding(jListBinding); org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedStack}"), jList1, org.jdesktop.beansbinding.BeanProperty.create("selectedElement")); bindingGroup.addBinding(binding); jList1.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { jList1MousePressed(evt); } public void mouseReleased(java.awt.event.MouseEvent evt) { jList1MouseReleased(evt); } }); stackPanel.setViewportView(jList1); org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(stackPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, stackPanel)); jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Redshift and Normalize")); jPanel5.setName("jPanel5"); // NOI18N correctFlux.setText("Correct flux"); correctFlux.setName("correctFlux"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.redshiftConfiguration.correctFlux}"), correctFlux, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); jTextField8.setName("jTextField8"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.redshiftConfiguration.toRedshift}"), jTextField8, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); jLabel11.setText("Move to redshift:"); jLabel11.setName("jLabel11"); // NOI18N redshiftButton.setText("Redshift"); redshiftButton.setName("redshiftButton"); // NOI18N redshiftButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { redshiftButtonActionPerformed(evt); } }); jLabel6.setText("Add or multiply normalization constant:"); jLabel6.setName("jLabel6"); // NOI18N buttonGroup2.add(jRadioButton3); jRadioButton3.setText("Add"); jRadioButton3.setName("jRadioButton3"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.add}"), jRadioButton3, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); buttonGroup2.add(jRadioButton4); jRadioButton4.setText("Multiply"); jRadioButton4.setName("jRadioButton4"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.multiply}"), jRadioButton4, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); integrationXMaxText.setName("integrationXMaxText"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.xmax}"), integrationXMaxText, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationXMaxText, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationMinMaxUnit.setModel(new DefaultComboBoxModel(loadEnum(XUnit.class))); integrationMinMaxUnit.setToolTipText("null"); integrationMinMaxUnit.setName("integrationMinMaxUnit"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.XUnits}"), integrationMinMaxUnit, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationMinMaxUnit, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationYUnit.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "erg/s/cm2", "Jy-Hz", "Watt/m2", "erg/s", "Watt" })); integrationYUnit.setName("integrationYUnit"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty .create("${selectedConfig.normConfiguration.integrateValueYUnits}"), integrationYUnit, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationYUnit, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationValueText.setName("integrationValueText"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.YValue}"), integrationValueText, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty .create("${selectedConfig.normConfiguration.integrateYTextEnabled}"), integrationValueText, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationNormType .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Value", "Average", "Median" })); integrationNormType.setName("integrationNormType"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.stats}"), integrationNormType, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationNormType, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationNormToLabel.setText("Normalize to"); integrationNormToLabel.setName("integrationNormToLabel"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationNormToLabel, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationXMinLabel.setText("X Min:"); integrationXMinLabel.setName("integrationXMinLabel"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationXMinLabel, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); integrationXMinText.setName("integrationXMinText"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.xmin}"), integrationXMinText, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationXMinText, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); buttonGroup1.add(jRadioButton1); jRadioButton1.setText("Integration"); jRadioButton1.setName("jRadioButton1"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.integrate}"), jRadioButton1, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); buttonGroup1.add(jRadioButton2); jRadioButton2.setText("At point"); jRadioButton2.setName("jRadioButton2"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.atPoint}"), jRadioButton2, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); atPointXLabel.setText("X:"); atPointXLabel.setName("atPointXLabel"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton2, org.jdesktop.beansbinding.ELProperty.create("${selected}"), atPointXLabel, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); atPointYLabel.setText("Y:"); atPointYLabel.setName("atPointYLabel"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton2, org.jdesktop.beansbinding.ELProperty.create("${selected}"), atPointYLabel, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); atPointXText.setName("atPointXText"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.atPointXValue}"), atPointXText, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton2, org.jdesktop.beansbinding.ELProperty.create("${selected}"), atPointXText, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); atPointYType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Value", "Average", "Median" })); atPointYType.setName("atPointYType"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.atPointStats}"), atPointYType, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton2, org.jdesktop.beansbinding.ELProperty.create("${selected}"), atPointYType, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); atPointXUnit.setModel(new DefaultComboBoxModel(loadEnum(XUnit.class))); atPointXUnit.setName("atPointXUnit"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.atPointXUnits}"), atPointXUnit, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton2, org.jdesktop.beansbinding.ELProperty.create("${selected}"), atPointXUnit, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); atPointYText.setName("atPointYText"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.atPointYValue}"), atPointYText, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty .create("${selectedConfig.normConfiguration.atPointYTextEnabled}"), atPointYText, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); atPointYUnit.setModel(new DefaultComboBoxModel(loadEnum(SPVYUnit.class))); atPointYUnit.setName("atPointYUnit"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.normConfiguration.atPointYUnits}"), atPointYUnit, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton2, org.jdesktop.beansbinding.ELProperty.create("${selected}"), atPointYUnit, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); normalizeButton.setText("Normalize"); normalizeButton.setName("normalizeButton"); // NOI18N normalizeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { normalizeButtonActionPerformed(evt); } }); jSeparator1.setName("jSeparator1"); // NOI18N integrationXMaxLabel.setText("X Max:"); integrationXMaxLabel.setName("integrationXMaxLabel"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jRadioButton1, org.jdesktop.beansbinding.ELProperty.create("${selected}"), integrationXMaxLabel, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); jCheckBox1.setText("Create SED"); jCheckBox1.setToolTipText("Create and view SED after redshifting"); jCheckBox1.setName("jCheckBox1"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${createSedAfterRedshift}"), jCheckBox1, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); jCheckBox2.setText("Create SED"); jCheckBox2.setToolTipText("Create and view SED after normalizing"); jCheckBox2.setName("jCheckBox2"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${createSedAfterNormalize}"), jCheckBox2, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout .setHorizontalGroup(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup().addContainerGap().add(jPanel5Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(jSeparator1) .add(jPanel5Layout.createSequentialGroup().add(jLabel11) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jTextField8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 76, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(correctFlux) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jCheckBox1).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(redshiftButton)) .add(jPanel5Layout.createSequentialGroup().add(jPanel5Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup().add(jRadioButton2) .add(26, 26, 26) .add(jPanel5Layout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup() .add(atPointXLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(atPointXText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3).add(atPointXUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel5Layout.createSequentialGroup() .add(atPointYLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(atPointYType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(atPointYText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 78, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(7, 7, 7) .add(atPointYUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(jPanel5Layout.createSequentialGroup().add(jPanel5Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(jPanel5Layout.createSequentialGroup() .add(integrationNormToLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(integrationNormType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(jPanel5Layout.createSequentialGroup().add(jRadioButton1) .add(8, 8, 8).add(integrationXMinLabel).add(3, 3, 3) .add(integrationXMinText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(integrationXMaxLabel).add(3, 3, 3))) .add(jPanel5Layout .createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING, false) .add(jPanel5Layout .createSequentialGroup() .add(integrationXMaxText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(integrationMinMaxUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel5Layout.createSequentialGroup().add( integrationValueText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 73, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(integrationYUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(jPanel5Layout.createSequentialGroup().add(jLabel6) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jRadioButton3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jRadioButton4))) .add(0, 0, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup().add(0, 0, Short.MAX_VALUE) .add(jCheckBox2) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(normalizeButton))) .addContainerGap())); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createSequentialGroup() .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(correctFlux) .add(jTextField8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel11)) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(redshiftButton).add(jCheckBox1))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel6).add(jRadioButton3).add(jRadioButton4)) .add(18, 18, 18) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jRadioButton1) .add(integrationMinMaxUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(integrationXMaxText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(integrationXMinText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(integrationXMinLabel).add(integrationXMaxLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(integrationYUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(integrationValueText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(integrationNormType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(integrationNormToLabel)) .add(11, 11, 11) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jRadioButton2) .add(jPanel5Layout.createSequentialGroup().add(jPanel5Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel5Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(atPointXText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(atPointXLabel)) .add(atPointXUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel5Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(atPointYLabel) .add(atPointYType, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(atPointYText, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(atPointYUnit, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(normalizeButton).add(jCheckBox2)) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Added SEDs")); jPanel4.setName("jPanel4"); // NOI18N addButton.setText("Add..."); addButton.setName("addButton"); // NOI18N addButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { addButtonActionPerformed(evt); } }); removeButton.setText("Remove"); removeButton.setName("removeButton"); // NOI18N removeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { removeButtonActionPerformed(evt); } }); jScrollPane2.setName("jScrollPane2"); // NOI18N sedsTable.setModel(new StackTableModel()); sedsTable.setName("sedsTable"); // NOI18N sedsTable.getTableHeader().setReorderingAllowed(false); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedSeds}"), sedsTable, org.jdesktop.beansbinding.BeanProperty.create("selectedElements")); bindingGroup.addBinding(binding); sedsTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { sedsTableMousePressed(evt); } }); jScrollPane2.setViewportView(sedsTable); org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout .setHorizontalGroup(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup() .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(addButton).add(removeButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 653, Short.MAX_VALUE))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel4Layout.createSequentialGroup().add(addButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(removeButton)) .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 160, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)); jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Stacking Options")); jPanel6.setName("jPanel6"); // NOI18N jLabel7.setText("Statistic:"); jLabel7.setName("jLabel7"); // NOI18N stackStatisticComboBox .setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Average", "Weighted Avg", "Sum" })); stackStatisticComboBox.setName("stackStatisticComboBox"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.statistic}"), stackStatisticComboBox, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); smoothCheckBox.setText("Smooth"); smoothCheckBox.setName("smoothCheckBox"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.smooth}"), smoothCheckBox, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); jLabel8.setText("Box Size:"); jLabel8.setName("jLabel8"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, smoothCheckBox, org.jdesktop.beansbinding.ELProperty.create("${selected}"), jLabel8, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); jTextField6.setName("jTextField6"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.smoothBinsize}"), jTextField6, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, smoothCheckBox, org.jdesktop.beansbinding.ELProperty.create("${selected}"), jTextField6, org.jdesktop.beansbinding.BeanProperty.create("enabled")); bindingGroup.addBinding(binding); logBinningCheckBox.setText("Logarithmic Binning"); logBinningCheckBox.setToolTipText( "java.lang.String \"Note: If logarithmic binning is on, the Bin Size is also logarithmic (e.g., a bin size of 1.0 with logarithmic binning spans 1 decade).\""); // NOI18N logBinningCheckBox.setName("logBinningCheckBox"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.logbin}"), logBinningCheckBox, org.jdesktop.beansbinding.BeanProperty.create("selected")); bindingGroup.addBinding(binding); jLabel9.setText("Bin Size:"); jLabel9.setName("jLabel9"); // NOI18N binsizeTextField.setName("binsizeTextField"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.binsize}"), binsizeTextField, org.jdesktop.beansbinding.BeanProperty.create("text")); bindingGroup.addBinding(binding); stackBinSizeUnitsComboBox.setModel(new DefaultComboBoxModel(loadEnum(XUnit.class))); stackBinSizeUnitsComboBox.setName("stackBinSizeUnitsComboBox"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.binsizeUnit}"), stackBinSizeUnitsComboBox, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); jLabel10.setText("Bin Size Units:"); jLabel10.setName("jLabel10"); // NOI18N stackButton.setText("Stack!"); stackButton.setName("stackButton"); // NOI18N stackButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stackButtonActionPerformed(evt); } }); stackYUnitComboBox.setModel(new DefaultComboBoxModel(loadEnum(SPVYUnit.class))); stackYUnitComboBox.setName("stackYUnitComboBox"); // NOI18N binding = org.jdesktop.beansbinding.Bindings.createAutoBinding( org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this, org.jdesktop.beansbinding.ELProperty.create("${selectedConfig.stackConfiguration.YUnits}"), stackYUnitComboBox, org.jdesktop.beansbinding.BeanProperty.create("selectedItem")); bindingGroup.addBinding(binding); jLabel1.setText("Y Axis:"); jLabel1.setName("jLabel1"); // NOI18N org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout.setHorizontalGroup(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel6Layout.createSequentialGroup().addContainerGap().add(jPanel6Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel6Layout.createSequentialGroup().add(0, 0, Short.MAX_VALUE).add(stackButton) .addContainerGap()) .add(jPanel6Layout.createSequentialGroup().add(29, 29, 29).add(jLabel8) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jTextField6) .add(17, 17, 17)) .add(jPanel6Layout.createSequentialGroup() .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel6Layout.createSequentialGroup().add(jLabel10) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(stackBinSizeUnitsComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 116, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel6Layout.createSequentialGroup().add(jPanel6Layout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel7).add(jLabel1)) .add(jPanel6Layout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel6Layout.createSequentialGroup().add(12, 12, 12) .add(stackYUnitComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 143, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel6Layout.createSequentialGroup() .addPreferredGap( org.jdesktop.layout.LayoutStyle.UNRELATED) .add(stackStatisticComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 143, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(smoothCheckBox).add(logBinningCheckBox) .add(jPanel6Layout.createSequentialGroup().add(jLabel9).add(43, 43, 43).add( binsizeTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))); jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel6Layout.createSequentialGroup().addContainerGap() .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel7).add(stackStatisticComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(stackYUnitComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel1)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel9).add(binsizeTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel10).add(stackBinSizeUnitsComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(9, 9, 9).add(logBinningCheckBox) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(smoothCheckBox) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel8).add(jTextField6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18).add(stackButton).add(18, 18, 18))); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Managment")); jPanel2.setName("jPanel2"); // NOI18N resetButton.setText("Reset"); resetButton.setToolTipText("Reset SEDs to their original values"); resetButton.setName("resetButton"); // NOI18N resetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { resetButtonActionPerformed(evt); } }); deleteButton.setText("Delete"); deleteButton.setToolTipText("Delete the currently selected Stack"); deleteButton.setName("deleteButton"); // NOI18N deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); createSedButton.setText("Create SED"); createSedButton.setToolTipText("Create new SED of the current Stack."); createSedButton.setName("createSedButton"); // NOI18N createSedButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { createSedButtonActionPerformed(evt); } }); 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(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(resetButton).add(createSedButton).add(deleteButton)) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().addContainerGap().add(resetButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(deleteButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(createSedButton).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, false) .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jButton1).add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(0, 10, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup() .add(jButton1).addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 301, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(jPanel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jPanel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); bindingGroup.bind(); pack(); }
From source file:org.executequery.gui.browser.TableDataTab.java
private JPanel createCanEditTableNotePanel() { final JPanel panel = new JPanel(new GridBagLayout()); canEditTableLabel = new UpdatableLabel(); JButton hideButton = new LinkButton(new AbstractAction() { public void actionPerformed(ActionEvent e) { panel.setVisible(false);//from w w w . ja v a 2s . c om } }); hideButton.setText("Hide"); JButton alwaysHideButton = new LinkButton(new AbstractAction() { public void actionPerformed(ActionEvent e) { panel.setVisible(false); alwaysShowCanEditNotePanel = false; SystemProperties.setBooleanProperty(Constants.USER_PROPERTIES_KEY, "browser.always.show.table.editable.label", false); EventMediator.fireEvent( new DefaultUserPreferenceEvent(TableDataTab.this, null, UserPreferenceEvent.ALL)); } }); alwaysHideButton.setText("Always Hide"); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx++; gbc.weightx = 1.0; gbc.insets = new Insets(5, 5, 5, 5); gbc.anchor = GridBagConstraints.WEST; panel.add(canEditTableLabel, gbc); gbc.gridx++; gbc.weightx = 0; gbc.anchor = GridBagConstraints.EAST; panel.add(hideButton, gbc); gbc.gridx++; gbc.insets.left = 15; gbc.insets.right = 10; panel.add(alwaysHideButton, gbc); panel.setBorder(UIUtils.getDefaultLineBorder()); return panel; }
From source file:org.executequery.gui.drivers.AbstractDriverPanel.java
private void init() { ReflectiveAction action = new ReflectiveAction(this); JButton browseButton = new DefaultButton(action, getString("AbstractDriverPanel.addLibraryButton"), "browseDrivers"); JButton removeButton = new DefaultButton(action, getString("AbstractDriverPanel.addRemoveButton"), "removeDrivers"); JButton findButton = new DefaultInlineFieldButton(action); findButton.setText(getString("AbstractDriverPanel.addFindButton")); findButton.setActionCommand("findDriverClass"); jarPathListModel = new DefaultListModel(); nameField = textFieldWithKey("AbstractDriverPanel.driverNameToolTip"); descField = textFieldWithKey("AbstractDriverPanel.descriptionToolTip"); // classField = textFieldWithKey("AbstractDriverPanel.classNameToolTip"); classComboModel = new DynamicComboBoxModel(); classField = WidgetFactory.createComboBox(classComboModel); classField.setToolTipText(getString("AbstractDriverPanel.classNameToolTip")); classField.setEditable(true);/*ww w . j ava 2 s .c o m*/ jarPathList = new JList(jarPathListModel); jarPathList.setToolTipText(getString("AbstractDriverPanel.pathToolTip")); JScrollPane jarPathListScrollPane = new JScrollPane(jarPathList) { private int height = 120; @Override public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); size.height = height; return size; } @Override public Dimension getMinimumSize() { Dimension size = super.getMinimumSize(); size.height = height; return size; } }; nameField.addFocusListener(new DriverNameFieldListener(this)); databaseNameCombo = WidgetFactory.createComboBox(createDatabaseComboValues()); databaseNameCombo.setToolTipText(getString("AbstractDriverPanel.databaseToolTip")); databaseNameCombo.addItemListener(this); urlComboModel = new DynamicComboBoxModel(); driverUrlCombo = WidgetFactory.createComboBox(urlComboModel); driverUrlCombo.setToolTipText(getString("AbstractDriverPanel.jdbcUrlToolTip")); driverUrlCombo.setEditable(true); JPanel base = new TextFieldPanel(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridy++; gbc.insets = new Insets(10, 10, 5, 0); gbc.anchor = GridBagConstraints.NORTHWEST; base.add(labelWithKey("AbstractDriverPanel.driverNameLabel"), gbc); gbc.gridy++; gbc.insets.top = 0; base.add(labelWithKey("AbstractDriverPanel.descriptionLabel"), gbc); gbc.gridy++; base.add(labelWithKey("AbstractDriverPanel.databaseLabel"), gbc); gbc.gridy++; base.add(labelWithKey("AbstractDriverPanel.jdbcUrlLabel"), gbc); gbc.gridy++; base.add(labelWithKey("AbstractDriverPanel.pathLabel"), gbc); gbc.gridy += 4; base.add(labelWithKey("AbstractDriverPanel.classNameLabel"), gbc); gbc.gridy = 0; gbc.gridx = 1; gbc.insets.right = 10; gbc.insets.top = 10; gbc.weightx = 1.0; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.gridwidth = GridBagConstraints.REMAINDER; base.add(nameField, gbc); gbc.gridy++; gbc.insets.top = 0; base.add(descField, gbc); gbc.gridy++; base.add(databaseNameCombo, gbc); gbc.gridy++; base.add(driverUrlCombo, gbc); gbc.gridy++; gbc.gridwidth = 1; gbc.insets.right = 0; gbc.gridheight = 2; gbc.insets.top = 5; base.add(jarPathListScrollPane, gbc); gbc.gridx = 2; gbc.weightx = 0; gbc.insets.right = 10; gbc.gridheight = 1; gbc.insets.left = 5; gbc.fill = GridBagConstraints.HORIZONTAL; base.add(browseButton, gbc); gbc.gridy++; gbc.insets.top = 0; base.add(removeButton, gbc); gbc.gridy += 3; gbc.gridx = 1; gbc.weightx = 1.0; gbc.insets.right = 0; gbc.insets.left = 10; gbc.insets.top = 0; base.add(classField, gbc); gbc.gridx = 2; gbc.weightx = 0; gbc.weighty = 1.0; gbc.insets.right = 10; gbc.insets.left = 5; gbc.fill = GridBagConstraints.HORIZONTAL; base.add(findButton, gbc); add(base, BorderLayout.CENTER); }
From source file:org.genedb.jogra.plugins.TermRationaliser.java
/** * Return a new JFrame which is the main interface to the Rationaliser. *//* w w w .j a va 2 s. c o m*/ public JFrame getMainPanel() { /* JFRAME */ frame.setTitle(WINDOW_TITLE); frame.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); frame.setLayout(new BorderLayout()); /* MENU */ JMenuBar menuBar = new JMenuBar(); JMenu actions_menu = new JMenu("Actions"); JMenuItem actions_mitem_1 = new JMenuItem("Refresh lists"); actions_mitem_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { initModels(); } }); actions_menu.add(actions_mitem_1); JMenu about_menu = new JMenu("About"); JMenuItem about_mitem_1 = new JMenuItem("About"); about_mitem_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { JOptionPane.showMessageDialog(null, "Term Rationaliser \n" + "Wellcome Trust Sanger Institute, UK \n" + "2009", "Term Rationaliser", JOptionPane.PLAIN_MESSAGE); } }); about_menu.add(about_mitem_1); menuBar.add(about_menu); menuBar.add(actions_menu); frame.add(menuBar, BorderLayout.NORTH); /* MAIN BOX */ Box center = Box.createHorizontalBox(); //A box that displays contents from left to right center.add(Box.createHorizontalStrut(5)); //Invisible fixed-width component /* FROM LIST AND PANEL */ fromList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); //Allow multiple products to be selected fromList.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent arg0) { if (arg0.getKeyCode() == KeyEvent.VK_RIGHT) { synchroniseLists(fromList, toList); //synchronise from left to right } } @Override public void keyReleased(KeyEvent arg0) { } @Override public void keyTyped(KeyEvent arg0) { } }); Box fromPanel = this.createRationaliserPanel(FROM_LIST_NAME, fromList); //Box on left hand side fromPanel.add(Box.createVerticalStrut(55)); //Add some space center.add(fromPanel); //Add to main box center.add(Box.createHorizontalStrut(3)); //Add some space /* MIDDLE PANE */ Box middlePane = Box.createVerticalBox(); ClassLoader classLoader = this.getClass().getClassLoader(); //Needed to access the images later on ImageIcon leftButtonIcon = new ImageIcon(classLoader.getResource("left_arrow.gif")); ImageIcon rightButtonIcon = new ImageIcon(classLoader.getResource("right_arrow.gif")); leftButtonIcon = new ImageIcon(leftButtonIcon.getImage().getScaledInstance(20, 20, Image.SCALE_SMOOTH)); //TODO: Investigate simpler way to resize an icon! rightButtonIcon = new ImageIcon(rightButtonIcon.getImage().getScaledInstance(20, 20, Image.SCALE_SMOOTH)); //TODO: Investigate simpler way to resize an icon! JButton rightSynch = new JButton(rightButtonIcon); rightSynch.setToolTipText("Synchronise TO list. \n Shortcut: Right-arrow key"); rightSynch.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { synchroniseLists(fromList, toList); } }); JButton leftSynch = new JButton(leftButtonIcon); leftSynch.setToolTipText("Synchronise FROM list. \n Shortcut: Left-arrow key"); leftSynch.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { synchroniseLists(toList, fromList); } }); middlePane.add(rightSynch); middlePane.add(leftSynch); center.add(middlePane); //Add middle pane to main box center.add(Box.createHorizontalStrut(3)); /* TO LIST AND PANEL */ toList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); //Single product selection in TO list toList.addKeyListener(new KeyListener() { @Override public void keyPressed(KeyEvent arg0) { if (arg0.getKeyCode() == KeyEvent.VK_LEFT) { synchroniseLists(toList, fromList); //synchronise from right to left } } @Override public void keyReleased(KeyEvent arg0) { } @Override public void keyTyped(KeyEvent arg0) { } }); Box toPanel = this.createRationaliserPanel(TO_LIST_NAME, toList); Box newTerm = Box.createVerticalBox(); textField = new JTextArea(1, 1); //textfield to let the user edit the name of an existing term textField.setMaximumSize(new Dimension(Toolkit.getDefaultToolkit().getScreenSize().height, 10)); textField.setForeground(Color.BLUE); JScrollPane jsp = new JScrollPane(textField); //scroll pane so that there is a horizontal scrollbar jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); newTerm.add(jsp); TitledBorder editBorder = BorderFactory.createTitledBorder("Edit term name"); editBorder.setTitleColor(Color.DARK_GRAY); newTerm.setBorder(editBorder); toPanel.add(newTerm); //add textfield to panel center.add(toPanel); //add panel to main box center.add(Box.createHorizontalStrut(5)); frame.add(center); //add the main panel to the frame initModels(); //load the lists with data /* BOTTOM HALF OF FRAME */ Box main = Box.createVerticalBox(); TitledBorder border = BorderFactory.createTitledBorder("Information"); border.setTitleColor(Color.DARK_GRAY); /* INFORMATION BOX */ Box info = Box.createVerticalBox(); Box scope = Box.createHorizontalBox(); scope.add(Box.createHorizontalStrut(5)); scope.add(scopeLabel); //label showing the scope of the terms scope.add(Box.createHorizontalGlue()); Box productCount = Box.createHorizontalBox(); productCount.add(Box.createHorizontalStrut(5)); productCount.add(productCountLabel); //display the label showing the number of terms productCount.add(Box.createHorizontalGlue()); info.add(scope); info.add(productCount); info.setBorder(border); /* ACTION BUTTONS */ Box actionButtons = Box.createHorizontalBox(); actionButtons.add(Box.createHorizontalGlue()); actionButtons.add(Box.createHorizontalStrut(10)); JButton findFix = new JButton(new FindClosestMatchAction()); actionButtons.add(findFix); actionButtons.add(Box.createHorizontalStrut(10)); RationaliserAction ra = new RationaliserAction(); // RationaliserAction2 ra2 = new RationaliserAction2(); JButton go = new JButton(ra); actionButtons.add(go); actionButtons.add(Box.createHorizontalGlue()); /* MORE INFORMATION TOGGLE */ Box buttonBox = Box.createHorizontalBox(); final JButton toggle = new JButton("Hide information <<"); buttonBox.add(Box.createHorizontalStrut(5)); buttonBox.add(toggle); buttonBox.add(Box.createHorizontalGlue()); Box textBox = Box.createHorizontalBox(); final JScrollPane scrollPane = new JScrollPane(information); scrollPane.setPreferredSize(new Dimension(frame.getWidth(), 100)); scrollPane.setVisible(true); textBox.add(Box.createHorizontalStrut(5)); textBox.add(scrollPane); ActionListener actionListener = new ActionListener() { public void actionPerformed(ActionEvent actionEvent) { if (toggle.getText().equals("Show information >>")) { scrollPane.setVisible(true); toggle.setText("Hide information <<"); frame.setPreferredSize(new Dimension(frame.getWidth(), frame.getHeight() + 100)); frame.pack(); } else if (toggle.getText().equals("Hide information <<")) { scrollPane.setVisible(false); toggle.setText("Show information >>"); frame.setPreferredSize(new Dimension(frame.getWidth(), frame.getHeight() - 100)); frame.pack(); } } }; toggle.addActionListener(actionListener); main.add(Box.createVerticalStrut(5)); main.add(info); main.add(Box.createVerticalStrut(5)); main.add(Box.createVerticalStrut(5)); main.add(actionButtons); main.add(Box.createVerticalStrut(10)); main.add(buttonBox); main.add(textBox); frame.add(main, BorderLayout.SOUTH); frame.pack(); frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); frame.setVisible(true); //initModels(); return frame; }
From source file:org.graphwalker.GUI.App.java
private JButton makeNavigationButton(String imageName, String actionCommand, String toolTipText, String altText, boolean enabled) { // Look for the image. String imgLocation = "resources/icons/" + imageName + ".png"; URL imageURL = App.class.getResource(imgLocation); // Create and initialize the button. JButton button = new JButton(); button.setActionCommand(actionCommand); button.setToolTipText(toolTipText);//from w w w . j av a2 s . c om button.addActionListener(this); button.setEnabled(enabled); if (imageURL != null) { // image found button.setIcon(new ImageIcon(imageURL, altText)); } else { // no image found button.setText(altText); logger.error("Resource not found: " + imgLocation); } return button; }
From source file:org.jets3t.apps.cockpitlite.ToggleAclDialog.java
/** * Initialises all GUI elements./* ww w . j a va 2s. c o m*/ */ private void initGui() { // Initialise skins factory. skinsFactory = SkinsFactory.getInstance(applicationProperties); // Set Skinned Look and Feel. LookAndFeel lookAndFeel = skinsFactory.createSkinnedMetalTheme("SkinnedLookAndFeel"); try { UIManager.setLookAndFeel(lookAndFeel); } catch (UnsupportedLookAndFeelException e) { log.error("Unable to set skinned LookAndFeel", e); } this.setResizable(false); this.setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); JHtmlLabel messageLabel = skinsFactory.createSkinnedJHtmlLabel("ToggleAclDialogMessage", hyperlinkListener); messageLabel.setText("File privacy setting:"); messageLabel.setHorizontalAlignment(JLabel.CENTER); privateRadioButton = skinsFactory.createSkinnedJRadioButton("ToggleAclDialogPrivateRadioButton"); privateRadioButton.setText("Private file"); publicRadioButton = skinsFactory.createSkinnedJRadioButton("ToggleAclDialogPublicRadioButton"); publicRadioButton.setText("Public file"); ButtonGroup buttonGroup = new ButtonGroup(); buttonGroup.add(privateRadioButton); buttonGroup.add(publicRadioButton); publicRadioButton.setSelected(isPublicObject); privateRadioButton.setSelected(!isPublicObject); JButton okButton = skinsFactory.createSkinnedJButton("ToggleAclDialogOkButton"); okButton.setName("OK"); okButton.setText("OK"); okButton.addActionListener(this); this.getRootPane().setDefaultButton(okButton); JPanel buttonsPanel = skinsFactory.createSkinnedJPanel("ToggleAclDialogButtonsPanel"); buttonsPanel.setLayout(new GridBagLayout()); buttonsPanel.add(privateRadioButton, new GridBagConstraints(0, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); buttonsPanel.add(publicRadioButton, new GridBagConstraints(1, 0, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); buttonsPanel.add(okButton, new GridBagConstraints(0, 1, 2, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, insetsZero, 0, 0)); int row = 0; this.getContentPane().setLayout(new GridBagLayout()); this.getContentPane().add(messageLabel, new GridBagConstraints(0, row++, 1, 1, 1, 0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, insetsDefault, 0, 0)); this.getContentPane().add(buttonsPanel, new GridBagConstraints(0, row++, 1, 1, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL, insetsDefault, 0, 0)); this.pack(); this.setLocationRelativeTo(this.getOwner()); }