lritdcs.SearchCritTimeDialog Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opendcs Show documentation
Show all versions of opendcs Show documentation
A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.
The newest version!
/*
* $Id$
*
* $Log$
* Revision 1.2 2009/11/11 17:15:29 shweta
* LRIT update
*
* Revision 1.1 2008/04/04 18:21:16 cvs
* Added legacy code to repository
*
* Revision 1.3 2006/02/20 22:01:04 mmaloney
* dev
*
* Revision 1.2 2004/05/18 22:52:41 mjmaloney
* dev
*
* Revision 1.1 2004/05/18 18:11:51 mjmaloney
* dev
*
*/
package lritdcs;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.Iterator;
import java.util.StringTokenizer;
import lrgs.common.SearchCriteria;
import lrgs.common.DcpAddress;
import ilex.util.AsciiUtil;
public class SearchCritTimeDialog extends JDialog {
JPanel panel1 = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
JPanel jPanel1 = new JPanel();
JButton okButton = new JButton();
FlowLayout flowLayout1 = new FlowLayout();
JButton cancelButton = new JButton();
JPanel jPanel2 = new JPanel();
JLabel jLabel1 = new JLabel();
JLabel whichScLabel = new JLabel();
JPanel jPanel3 = new JPanel();
JLabel jLabel2 = new JLabel();
JTextField addressField = new JTextField();
JLabel jLabel3 = new JLabel();
JTextField channelField = new JTextField();
JLabel jLabel4 = new JLabel();
JTextField netlistField = new JTextField();
FlowLayout flowLayout2 = new FlowLayout();
GridBagLayout gridBagLayout1 = new GridBagLayout();
JLabel jLabel5 = new JLabel();
JLabel jLabel6 = new JLabel();
JTextField sinceField = new JTextField();
JTextField untilField = new JTextField();
SearchCriteria origSC;
SearchCriteria copySC;
boolean okPressed;
public SearchCritTimeDialog(Frame frame, String title, boolean modal) {
super(frame, title, modal);
try {
jbInit();
pack();
}
catch(Exception ex) {
ex.printStackTrace();
}
origSC = null;
okPressed = false;
}
public SearchCritTimeDialog() {
this(null, "", false);
}
public SearchCritTimeDialog(Frame parent, String what, SearchCriteria sc)
{
this(parent, "", true);
whichScLabel.setText(what);
origSC = sc;
copySC = new SearchCriteria(origSC);
fillValues();
}
private void fillValues()
{
String s = copySC.getLrgsSince();
sinceField.setText(s == null ? "" : s);
s = copySC.getLrgsUntil();
untilField.setText(s == null ? "" : s);
StringBuffer sb = new StringBuffer();
for(Iterator it = copySC.ExplicitDcpAddrs.iterator(); it.hasNext(); )
{
DcpAddress da = (DcpAddress)it.next();
sb.append(da.toString() + " ");
}
addressField.setText(sb.toString());
sb.setLength(0);
if (copySC.channels != null)
{
for(int i=0; i