/* * EuroCarbDB, a framework for carbohydrate bioinformatics * * Copyright (c) 2006-2009, Eurocarb project, or third-party contributors as * indicated by the @author tags or express copyright attribution * statements applied by the authors. * * This copyrighted material is made available to anyone wishing to use, modify, * copy, or redistribute it subject to the terms and conditions of the GNU * Lesser General Public License, as published by the Free Software Foundation. * A copy of this license accompanies this distribution in the file LICENSE.txt. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * for more details. * * Last commit: $Rev: 1210 $ by $Author: glycoslave $ on $Date:: 2009-06-12 #$ */ /* * GAGDialog.java * * Created on 28 February 2007, 17:04 */ /** * * @author aceroni */ public class GAGDialog extends java.awt.Dialog { /** Creates new form GAGDialog */ public GAGDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); field_reduced = new javax.swing.JCheckBox(); jLabel6 = new javax.swing.JLabel(); field_unsaturated = new javax.swing.JCheckBox(); jLabel7 = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); button_ok = new javax.swing.JButton(); button_cancel = new javax.swing.JButton(); field_min_no_units = new javax.swing.JSpinner(); field_max_no_units = new javax.swing.JSpinner(); field_min_no_acetyls = new javax.swing.JSpinner(); field_min_no_sulfates = new javax.swing.JSpinner(); jLabel8 = new javax.swing.JLabel(); field_max_no_acetyls = new javax.swing.JSpinner(); field_max_no_sulfates = new javax.swing.JSpinner(); jLabel9 = new javax.swing.JLabel(); field_derivatization = new javax.swing.JComboBox(); jScrollPane1 = new javax.swing.JScrollPane(); field_gag_families = new javax.swing.JList(); jLabel10 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); field_modifications = new javax.swing.JList(); field_allow_unlikely_acetylation = new javax.swing.JCheckBox(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); field_allow_redend_loss = new javax.swing.JCheckBox(); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); jLabel1.setText("GAG families"); jLabel2.setText("# units"); jLabel3.setText("Min"); jLabel4.setText("# acetyls"); jLabel5.setText("# sulfates"); field_reduced.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); field_reduced.setMargin(new java.awt.Insets(0, 0, 0, 0)); jLabel6.setText("reduced"); field_unsaturated.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); field_unsaturated.setMargin(new java.awt.Insets(0, 0, 0, 0)); jLabel7.setText("unsaturated"); button_ok.setText("OK"); button_cancel.setText("Cancel"); jLabel8.setText("Max"); jLabel9.setText("derivatized"); field_derivatization.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); field_gag_families.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]; } }); field_gag_families.setVisibleRowCount(5); jScrollPane1.setViewportView(field_gag_families); jLabel10.setText("modifications"); field_modifications.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]; } }); field_modifications.setVisibleRowCount(4); jScrollPane2.setViewportView(field_modifications); field_allow_unlikely_acetylation.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); field_allow_unlikely_acetylation.setMargin(new java.awt.Insets(0, 0, 0, 0)); jLabel12.setText("Allow unlikely"); jLabel13.setText("acetylation"); jLabel14.setText("Allow loss of"); jLabel15.setText("reducing end"); field_allow_redend_loss.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); field_allow_redend_loss.setMargin(new java.awt.Insets(0, 0, 0, 0)); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(68, 68, 68) .add(button_ok) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(button_cancel)) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE) .add(layout.createSequentialGroup() .add(jLabel1) .add(21, 21, 21) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)))) .add(layout.createSequentialGroup() .addContainerGap() .add(jLabel13)) .add(layout.createSequentialGroup() .addContainerGap() .add(jLabel15)) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel10) .add(jLabel12) .add(jLabel9) .add(jLabel7) .add(jLabel6) .add(jLabel5) .add(jLabel4) .add(jLabel2) .add(jLabel14)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, field_allow_redend_loss) .add(layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(jLabel3) .add(60, 60, 60)) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, field_min_no_sulfates, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE) .add(field_min_no_acetyls, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, field_reduced) .add(org.jdesktop.layout.GroupLayout.LEADING, field_unsaturated) .add(org.jdesktop.layout.GroupLayout.LEADING, field_derivatization, 0, 91, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, field_min_no_units, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 91, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel8) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, field_max_no_units) .add(org.jdesktop.layout.GroupLayout.LEADING, field_max_no_acetyls, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) .add(field_max_no_sulfates))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(org.jdesktop.layout.GroupLayout.LEADING, field_allow_unlikely_acetylation) .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 194, Short.MAX_VALUE)))) .addContainerGap()) ); layout.linkSize(new java.awt.Component[] {field_max_no_units, field_min_no_units}, org.jdesktop.layout.GroupLayout.HORIZONTAL); layout.linkSize(new java.awt.Component[] {button_cancel, button_ok}, org.jdesktop.layout.GroupLayout.HORIZONTAL); layout.setVerticalGroup( layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addContainerGap() .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel1) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 90, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(0, 0, 0) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel3) .add(jLabel8)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_max_no_units, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(field_min_no_units, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel2)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_min_no_acetyls, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(field_max_no_acetyls, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel4)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_min_no_sulfates, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(field_max_no_sulfates, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel5)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_reduced) .add(jLabel6)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_unsaturated) .add(jLabel7)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_derivatization, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(jLabel9)) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel10) .add(62, 62, 62)) .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jScrollPane2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(field_allow_unlikely_acetylation) .add(jLabel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel13) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(jLabel14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(field_allow_redend_loss)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(jLabel15) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jSeparator1, 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(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(button_ok) .add(button_cancel)) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents /** Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog setVisible(false); dispose(); }//GEN-LAST:event_closeDialog /** * @param args the command line arguments */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new GAGDialog(new java.awt.Frame(), true).setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton button_cancel; private javax.swing.JButton button_ok; private javax.swing.JCheckBox field_allow_redend_loss; private javax.swing.JCheckBox field_allow_unlikely_acetylation; private javax.swing.JComboBox field_derivatization; private javax.swing.JList field_gag_families; private javax.swing.JSpinner field_max_no_acetyls; private javax.swing.JSpinner field_max_no_sulfates; private javax.swing.JSpinner field_max_no_units; private javax.swing.JSpinner field_min_no_acetyls; private javax.swing.JSpinner field_min_no_sulfates; private javax.swing.JSpinner field_min_no_units; private javax.swing.JList field_modifications; private javax.swing.JCheckBox field_reduced; private javax.swing.JCheckBox field_unsaturated; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JSeparator jSeparator1; // End of variables declaration//GEN-END:variables }