public class VerticesTableModel
extends javax.swing.table.AbstractTableModel
Modifier and Type | Field and Description |
---|---|
static double |
d2r
Degrees to radians.
|
static java.lang.String |
ID
Class identification name with source code version and date.
|
static double |
inc
Inclination of MRO's orbit in radians.
|
static double |
r2d
Radians to degrees.
|
static double |
ra
Mars equatorial radius in km.
|
static double |
rc
Mars polar radius in km.
|
Constructor and Description |
---|
VerticesTableModel() |
Modifier and Type | Method and Description |
---|---|
void |
addRow()
Adds a new row with default values to the end of the list.
|
void |
addRow(java.lang.Object[] row)
Adds a new row with the given values to the end of the list.
|
java.lang.Class |
getColumnClass(int col)
Gets the class of a column by number.
|
int |
getColumnCount()
Gets the number of columns.
|
java.lang.String |
getColumnName(int col)
Gets the name of a column by number.
|
int |
getRowCount()
Gets the number of vertices.
|
java.lang.Object |
getValueAt(int row,
int col)
Gets the value at a given cell.
|
java.lang.String |
getVertices()
Gets the vertices as a serialized list of lon, lat values.
|
static java.lang.String |
getVertices(double clat,
double clon,
double himg,
double wimg)
Returns the string-ified version of ROI vertices when given a center
latitude-longitude and a footprint height and width.
|
void |
insertRow(int row)
Inserts a new row at the given row number, the insert will be after the
current row with the same number, moving all other by one.
|
boolean |
isCellEditable(int row,
int col)
Returns true if a cell is editable.
|
void |
removeAllRows()
Removes all ROI rows from the table, effective reinitializing the model.
|
void |
removeRow(int row)
Removes the row at the offset given.
|
void |
setValueAt(java.lang.Object value,
int row,
int col)
Sets the value for a given cell.
|
void |
setVertices(java.lang.String vertices)
Set the vertices from a String of lon-lat vertices.
|
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
public static final java.lang.String ID
public static final double d2r
public static final double r2d
public static final double ra
public static final double rc
public static final double inc
public int getRowCount()
public int getColumnCount()
public java.lang.Object getValueAt(int row, int col)
row
- row number starting from zerocol
- col number starting from zeropublic java.lang.Class getColumnClass(int col)
getColumnClass
in interface javax.swing.table.TableModel
getColumnClass
in class javax.swing.table.AbstractTableModel
col
- col number (starting from zero)public java.lang.String getColumnName(int col)
getColumnName
in interface javax.swing.table.TableModel
getColumnName
in class javax.swing.table.AbstractTableModel
col
- col number (starts from zero)public void setValueAt(java.lang.Object value, int row, int col)
setValueAt
in interface javax.swing.table.TableModel
setValueAt
in class javax.swing.table.AbstractTableModel
row
- row number starting from zerocol
- col number starting from zerovalue
- public boolean isCellEditable(int row, int col)
isCellEditable
in interface javax.swing.table.TableModel
isCellEditable
in class javax.swing.table.AbstractTableModel
row
- row number starting from zerocol
- col number starting from zeropublic void addRow()
public void addRow(java.lang.Object[] row)
row
- String row, String lat, String lonpublic void insertRow(int row)
row
- Row number to insertpublic void removeRow(int row)
row
- offsetpublic void removeAllRows()
public java.lang.String getVertices()
public void setVertices(java.lang.String vertices) throws java.text.ParseException
vertices
- Comma separated vertices (lon,lat,lon,lat ...)java.text.ParseException
- Invalid list of verticespublic static java.lang.String getVertices(double clat, double clon, double himg, double wimg)
clat
- Center planetocentric latitudeclon
- Center planetographic longitudehimg
- Height of footprint in kilometerswimg
- Width of footprint in kilometersCopyright \ (C) Arizona Board of Regents on behalf of the \ Planetary Image Research Laboratory, Lunar and \ Planetary Laboratory at the University of Arizona