src.gov.nasa.worldwindx.applications.dataimporter.FileSetTableModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of worldwindx Show documentation
Show all versions of worldwindx Show documentation
World Wind is a collection of components that interactively display 3D geographic information within Java applications or applets.
/*
* Copyright (C) 2013 United States Government as represented by the Administrator of the
* National Aeronautics and Space Administration.
* All Rights Reserved.
*/
package gov.nasa.worldwindx.applications.dataimporter;
import gov.nasa.worldwind.avlist.AVKey;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.beans.*;
import java.util.*;
/**
* The table model for the file-set table.
*
* @author tag
* @version $Id: FileSetTableModel.java 1180 2013-02-15 18:40:47Z tgaskins $
*/
public class FileSetTableModel extends AbstractTableModel implements PropertyChangeListener
{
protected static final String[] columnTitles =
new String[]{"Key", "Preview", "Dataset Name", "Scale", "Type", "Files"};
protected Set fileSets = new TreeSet(new Comparator()
{
@Override
public int compare(FileSet fileSet, FileSet fileSet1)
{
return fileSet.getName().compareTo(fileSet1.getName());
}
});
public FileSetTableModel(FileSetMap fileSetMap)
{
this.setFileSetMap(fileSetMap);
}
public void setFileSetMap(FileSetMap fileSetMap)
{
this.clearFileSets();
if (fileSetMap != null)
{
for (Map.Entry