decodes.dbeditor.SiteSelectPanel 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.1.1.1 2014/05/19 15:28:59 mmaloney
* OPENDCS 6.0 Initial Checkin
*
* Revision 1.12 2013/07/10 19:24:01 mmaloney
* Don't modify list if site delete fails.
*
* Revision 1.11 2013/07/10 19:21:45 mmaloney
* Don't modify list if site delete fails.
*
* Revision 1.10 2013/07/10 19:15:24 mmaloney
* Don't modify list if site delete fails.
*
* Revision 1.9 2010/12/05 15:51:02 mmaloney
* cleanup
*
* Revision 1.8 2010/12/05 15:46:57 mmaloney
* Allow app to change the SiteSelectPanel being used in SiteSelectDialog. This was broken before.
*
* Revision 1.7 2010/02/23 22:52:32 mjmaloney
* Double-click modifications to usgs-modified code.
*
* Revision 1.6 2009/08/12 19:55:24 mjmaloney
* usgs merge
*
* Revision 1.5 2009/01/22 00:31:33 mjmaloney
* DB Caching improvements to make msgaccess start quicker.
* Remove the need to cache the entire database.
*
* Revision 1.4 2008/11/20 18:49:21 mjmaloney
* merge from usgs mods
*
*/
package decodes.dbeditor;
import java.awt.*;
import java.awt.event.*;
import java.util.Vector;
import java.util.Iterator;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import javax.swing.*;
import java.util.ResourceBundle;
import ilex.util.Logger;
import ilex.util.TextUtil;
import decodes.db.*;
import decodes.gui.*;
import decodes.util.DecodesSettings;
@SuppressWarnings("serial")
public class SiteSelectPanel extends JPanel
{
static ResourceBundle genericLabels = DbEditorFrame.getGenericLabels();
static ResourceBundle dbeditLabels = DbEditorFrame.getDbeditLabels();
static String descriptionLabel = genericLabels.getString("description");
BorderLayout borderLayout1 = new BorderLayout();
JScrollPane jScrollPane1 = new JScrollPane();
SiteSelectTableModel model;
SortingListTable siteTable;
SiteSelectDialog parentDialog = null;
SiteListPanel parentPanel = null;
public SiteSelectPanel()
{
model = new SiteSelectTableModel(this);
int cc = model.getColumnCount();
int widths[] = new int[cc];
for(int i=0; i 0 && ss2.length() == 0)
return -1;
else if (ss1.length() == 0 && ss2.length() > 0)
return 1;
if (nameType != null && nameType.equalsIgnoreCase("hdb"))
{
if (!ss1.equals("") && !ss2.equals(""))
{
int i1 = 0;
int i2 = 0;
try
{
i1 = Integer.parseInt(ss1);
}
catch (Exception ex)
{
Logger.instance().warning(
" SiteSelectPanel - SiteNameComparator " +
" Can not sort column by hdb site name type." +
" HDB site name is not a number. Site: " + ss1);
return 1;
}
try
{
i2 = Integer.parseInt(ss2);
}
catch (Exception ex)
{
Logger.instance().warning(
" SiteSelectPanel - SiteNameComparator " +
" Can not sort column by hdb site name type." +
" HDB site name is not a number. Site: " + ss2);
return -1;
}
return i1 - i2;
}
}
return ss1.compareToIgnoreCase(ss2);
}
public boolean equals(Object ob)
{
return false;
}
}