/*
* 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 #$
*/
/*
* SearchDialog.java
*
* Created on 07 August 2008, 16:40
*/
/**
*
* @author aceroni
*/
public class SearchDialog extends javax.swing.JDialog {
/** Creates new form SearchDialog */
public SearchDialog(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() {
panel_canvas = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
field_source = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
field_type = new javax.swing.JTextField();
jSeparator1 = new javax.swing.JSeparator();
button_search_core = new javax.swing.JButton();
button_search_terminal = new javax.swing.JButton();
button_search = new javax.swing.JButton();
button_cancel = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
field_database = new javax.swing.JComboBox();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
panel_canvas.setBackground(java.awt.Color.white);
panel_canvas.setPreferredSize(new java.awt.Dimension(600, 400));
panel_canvas.setRequestFocusEnabled(false);
org.jdesktop.layout.GroupLayout panel_canvasLayout = new org.jdesktop.layout.GroupLayout(panel_canvas);
panel_canvas.setLayout(panel_canvasLayout);
panel_canvasLayout.setHorizontalGroup(
panel_canvasLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 693, Short.MAX_VALUE)
);
panel_canvasLayout.setVerticalGroup(
panel_canvasLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(0, 400, Short.MAX_VALUE)
);
jLabel1.setText("Source");
field_source.setText("jTextField1");
jLabel2.setText("Type");
field_type.setText("jTextField1");
button_search_core.setText("Search core");
button_search_terminal.setText("Search terminal");
button_search.setText("Search");
button_cancel.setText("Cancel");
jLabel3.setText("Database");
field_database.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
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()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.add(jLabel2)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(field_type, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 233, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(jLabel1)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(field_source, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE))
.add(jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 693, Short.MAX_VALUE)))
.add(layout.createSequentialGroup()
.add(139, 139, 139)
.add(button_search)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(button_search_core)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(button_search_terminal)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(button_cancel))
.add(layout.createSequentialGroup()
.addContainerGap()
.add(jLabel3)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
.add(field_database, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 216, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
.add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.add(panel_canvas, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 693, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
.add(layout.createSequentialGroup()
.addContainerGap()
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel3)
.add(field_database, 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(panel_canvas, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(12, 12, 12)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
.add(jLabel2)
.add(jLabel1)
.add(field_type, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.add(field_source, 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(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
.add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER)
.add(button_search_core)
.add(button_search_terminal)
.add(button_search)
.add(button_cancel))
.addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
SearchDialog dialog = new SearchDialog(new javax.swing.JFrame(), true);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton button_cancel;
private javax.swing.JButton button_search;
private javax.swing.JButton button_search_core;
private javax.swing.JButton button_search_terminal;
private javax.swing.JComboBox field_database;
private javax.swing.JTextField field_source;
private javax.swing.JTextField field_type;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JPanel panel_canvas;
// End of variables declaration//GEN-END:variables
}