public class RasterMapCatalog
extends javax.swing.table.AbstractTableModel
RasterMapEntry,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
HTTP_RADAR_WEATHER_GOV_CONUS_RADAR_IMG_LATEST_RADARONLY_GIF
The URL where the United States National Weather Service provides radar weather map overlay images,
|
java.util.ArrayList<RasterMapEntry> |
imageList
Collection of raster images to overlay in the containing RasterMapOverlay.
|
static java.lang.String |
RASTER_MAP_PREFS_NODE
Name of Java Preferences node containing RasterMapEntry persistence information.
|
java.awt.event.ActionListener |
WXRASTER_ACTION_LISTENER
ActionListener for reloading updated NWS weather raster.
|
| Constructor and Description |
|---|
RasterMapCatalog(GeographicalMap geoMap,
RasterMapOverlay rasterMapOverlay)
Create a RasterMapCatalog instance for a given GeographicalMap window's RasterMapOverlay.
|
| Modifier and Type | Method and Description |
|---|---|
int |
add(RasterMapEntry rme)
Add the specified RasterMapEntry to the persisted list of raster map overlays.
|
void |
deleteRow(int rowIndex)
Delete an entire RasterMapEntry from the catalog.
|
java.lang.Class<?> |
getColumnClass(int columnIndex)
Returns the data Class for the specified column.
|
int |
getColumnCount()
Returns the number of columns in the model.
|
java.lang.String |
getColumnName(int column)
Returns the localized name for the column.
|
int |
getRowCount()
Returns the number of rows in the model.
|
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value for the cell at
columnIndex and
rowIndex. |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Indicate which columns can be edited.
|
static java.util.Date |
loadReloadableWebMap(RasterMapEntry rme,
long now)
Load a fresh raster image and its associated world file from a web source.
|
void |
remove(int index)
Remove the indexed record from the persisted RasterMapCatalog.
|
void |
setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
Store a new value for an editable table cell.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListenerpublic static final java.lang.String HTTP_RADAR_WEATHER_GOV_CONUS_RADAR_IMG_LATEST_RADARONLY_GIF
public static final java.lang.String RASTER_MAP_PREFS_NODE
public java.util.ArrayList<RasterMapEntry> imageList
public final java.awt.event.ActionListener WXRASTER_ACTION_LISTENER
public RasterMapCatalog(GeographicalMap geoMap, RasterMapOverlay rasterMapOverlay)
geoMap - GeographicalMap using this instance of RasterMapCatalograsterMapOverlay - RasterMapOverlay using this instance of RasterMapCatalogpublic static java.util.Date loadReloadableWebMap(RasterMapEntry rme, long now) throws java.io.IOException
rme - RasterMapEntry for the web-sourced overlay layernow - current time in milliseconds since Jan 1970 UTCjava.io.IOException - if image or world file cannot be downloadedpublic int add(RasterMapEntry rme)
rme - RasterMapEntry to addpublic void remove(int index)
index - zero-based int index of the record to removepublic java.lang.Class<?> getColumnClass(int columnIndex)
getColumnClass in interface javax.swing.table.TableModelgetColumnClass in class javax.swing.table.AbstractTableModelcolumnIndex - the column being queriedpublic java.lang.String getColumnName(int column)
getColumnName in interface javax.swing.table.TableModelgetColumnName in class javax.swing.table.AbstractTableModelcolumn - the column being queriedcolumnpublic boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface javax.swing.table.TableModelisCellEditable in class javax.swing.table.AbstractTableModelrowIndex - the row being queriedcolumnIndex - the column being queriedpublic void setValueAt(java.lang.Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface javax.swing.table.TableModelsetValueAt in class javax.swing.table.AbstractTableModelaValue - value to assign to cellrowIndex - row of cellcolumnIndex - column of cellpublic int getColumnCount()
getRowCount()public int getRowCount()
JTable uses this method to determine how many rows it
should display. This method should be quick, as it
is called frequently during rendering.getColumnCount()public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
columnIndex and
rowIndex.rowIndex - the row whose value is to be queriedcolumnIndex - the column whose value is to be queriedpublic void deleteRow(int rowIndex)
rowIndex - zero-based row index into the catalog table model