Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ka2ddo.yaac.gui.rastermap
Class RasterMapCatalog

    java.lang.Object
      javax.swing.table.AbstractTableModel
          org.ka2ddo.yaac.gui.rastermap.RasterMapCatalog

All Implemented Interfaces:
  java.io.Serializable, javax.swing.table.TableModel

    public class RasterMapCatalog

extends javax.swing.table.AbstractTableModel

This class maintains a catalog of registered raster map images that can be superimposed over the MapBean. Each image has its RasterMapEntry describing the image.

See Also:
  `RasterMapEntry`, Serialized Form

Field Summary
`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`

Fields inherited from class javax.swing.table.AbstractTableModel
`listenerList`

Method Summary
`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.
`static RasterMapCatalog` | `getInstance()` Get the singleton instance of the RasterMapCatalog.
`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.

Methods inherited from class javax.swing.table.AbstractTableModel
`addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### HTTP_RADAR_WEATHER_GOV_CONUS_RADAR_IMG_LATEST_RADARONLY_GIF

    public static final 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,

  See Also:
    Constant Field Values

### imageList

    public java.util.ArrayList<RasterMapEntry> imageList

Method Detail

### getInstance

    public static RasterMapCatalog getInstance()

  Get the singleton instance of the RasterMapCatalog.

  Returns:
    singleton instance

### loadReloadableWebMap

    public static java.util.Date loadReloadableWebMap(RasterMapEntry rme,
                                                      long now)
                                               throws java.io.IOException

  Load a fresh raster image and its associated world file from a web source.

  Parameters:
    `rme` - RasterMapEntry for the web-sourced overlay layer
    `now` - current time in milliseconds since Jan 1970 UTC
  Returns:
    the Date when the loaded raster image will expire and should be loaded again
  Throws:
    `java.io.IOException` - if image or world file cannot be downloaded

### add

    public int add(RasterMapEntry rme)

  Add the specified RasterMapEntry to the persisted list of raster map overlays.

  Parameters:
    `rme` - RasterMapEntry to add
  Returns:
    int index of newly added entry

### remove

    public void remove(int index)

  Remove the indexed record from the persisted RasterMapCatalog.

  Parameters:
    `index` - zero-based int index of the record to remove

### getColumnClass

    public java.lang.Class<?> getColumnClass(int columnIndex)

  Returns the data Class for the specified column.

  Specified by:
    `getColumnClass` in interface `javax.swing.table.TableModel`
  Overrides:
    `getColumnClass` in class `javax.swing.table.AbstractTableModel`
  Parameters:
    `columnIndex` - the column being queried
  Returns:
    the Class object for the column's data

### getColumnName

    public java.lang.String getColumnName(int column)

  Returns the localized name for the column.

  Specified by:
    `getColumnName` in interface `javax.swing.table.TableModel`
  Overrides:
    `getColumnName` in class `javax.swing.table.AbstractTableModel`
  Parameters:
    `column` - the column being queried
  Returns:
    a string containing the name of `column`

### isCellEditable

    public boolean isCellEditable(int rowIndex,
                                  int columnIndex)

  Indicate which columns can be edited.

  Specified by:
    `isCellEditable` in interface `javax.swing.table.TableModel`
  Overrides:
    `isCellEditable` in class `javax.swing.table.AbstractTableModel`
  Parameters:
    `rowIndex` - the row being queried
    `columnIndex` - the column being queried
  Returns:
    false

### setValueAt

    public void setValueAt(java.lang.Object aValue,
                           int rowIndex,
                           int columnIndex)

  Store a new value for an editable table cell.

  Specified by:
    `setValueAt` in interface `javax.swing.table.TableModel`
  Overrides:
    `setValueAt` in class `javax.swing.table.AbstractTableModel`
  Parameters:
    `aValue` - value to assign to cell
    `rowIndex` - row of cell
    `columnIndex` - column of cell

### getColumnCount

    public int getColumnCount()

  Returns the number of columns in the model.

  Returns:
    the number of columns in the model
  See Also:
    `getRowCount()`

### getRowCount

    public int getRowCount()

  Returns the number of rows in the model. A `JTable` uses this method to determine how many rows it should display. This method should be quick, as it is called frequently during rendering.

  Returns:
    the number of rows in the model
  See Also:
    `getColumnCount()`

### getValueAt

    public java.lang.Object getValueAt(int rowIndex,
                                       int columnIndex)

  Returns the value for the cell at `columnIndex` and `rowIndex`.

  Parameters:
    `rowIndex` - the row whose value is to be queried
    `columnIndex` - the column whose value is to be queried
  Returns:
    the value Object at the specified cell

### deleteRow

    public void deleteRow(int rowIndex)

  Delete an entire RasterMapEntry from the catalog.

  Parameters:
    `rowIndex` - zero-based row index into the catalog table model

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD