|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
org.geotools.gui.swing.referencing.CoordinateTableModel
A table of direct positions. All coordinates contained in this table have the same coordinate reference system, which is specified at construction time.
This table model provides a way to display invalid coordinates in a different color. Invalide coordinates are defined here as coordinates outside the CRS valid area. This color display can be enabled by the following code:
CoordinateTableModel model = new CoordinateTableModel(crs); JTable view = new JTable(model); TableCellRenderer renderer = new CoordinateTableModel.CellRenderer(); view.setDefaultRenderer(Double.class, renderer);
| Nested Class Summary | |
static class |
CoordinateTableModel.CellRenderer
A cell renderer for the coordinate table model. |
| Field Summary |
| Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
| Constructor Summary | |
CoordinateTableModel(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
Creates an initially empty table model using the specified coordinate reference system. |
|
| Method Summary | |
void |
add(java.util.Collection newPositions)
Adds a collection of direct positions to this table. |
void |
add(org.opengis.spatialschema.geometry.DirectPosition newPosition)
Adds a direct position to this table. |
java.lang.Class |
getColumnClass(int columnIndex)
Returns tye type of data for the specified column. |
int |
getColumnCount()
Returns the number of columns. |
java.lang.String |
getColumnName(int columnIndex)
Returns the name for the specified column. |
org.opengis.referencing.crs.CoordinateReferenceSystem |
getCRS()
Returns the CRS for this table model |
java.util.List |
getPositions()
Returns all direct positions in this table. |
int |
getRowCount()
Returns the number of rows in the table. |
java.lang.Object |
getValueAt(int rowIndex,
int columnIndex)
Returns the value in the table at the specified postion. |
boolean |
isCellEditable(int rowIndex,
int colIndex)
Specifies that the user can fill all rows in the table. |
boolean |
isValidCoordinate(int rowIndex)
Returns if the position at the specified row is inside the CRS valid area. |
void |
setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
Sets the value for the specified cell. |
java.lang.String |
toString()
Returns a string representation of this table. |
| 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, wait, wait, wait |
| Constructor Detail |
public CoordinateTableModel(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
| Method Detail |
public org.opengis.referencing.crs.CoordinateReferenceSystem getCRS()
public java.util.List getPositions()
add(DirectPosition),
add(Collection)public int getRowCount()
public int getColumnCount()
public java.lang.String getColumnName(int columnIndex)
public java.lang.Class getColumnClass(int columnIndex)
public void add(org.opengis.spatialschema.geometry.DirectPosition newPosition)
public void add(java.util.Collection newPositions)
public java.lang.Object getValueAt(int rowIndex,
int columnIndex)
rowIndex - Cell row number.columnIndex - Cell column number.
public void setValueAt(java.lang.Object value,
int rowIndex,
int columnIndex)
value - The new value for the cell.rowIndex - Row number of the cell modified.columnIndex - Column number of the cell modified.
public boolean isCellEditable(int rowIndex,
int colIndex)
public boolean isValidCoordinate(int rowIndex)
CoordinateTableModel.CellRenderer in order to determine if this row should
be colorized.
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||