MetaDbfTableModel (OpenMap API)
Date: 2016-12-09

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

## com.bbn.openmap.dataAccess.shape
Class MetaDbfTableModel

    java.lang.Object
      javax.swing.table.AbstractTableModel
          com.bbn.openmap.dataAccess.shape.DbfTableModel
              com.bbn.openmap.dataAccess.shape.MetaDbfTableModel

All Implemented Interfaces:
  ShapeConstants, java.io.Serializable, java.lang.Iterable<java.util.List<java.lang.Object>>, java.util.EventListener, javax.swing.event.TableModelListener, javax.swing.table.TableModel

    public class MetaDbfTableModel

extends DbfTableModel
implements ShapeConstants

An extension of the DbfTableModel that allows editing of the format of the TbfTableModel, allowing addition and deletion of columns of the DbfTableModel. The original DbfTableModel column headers are scanned and put into records, and edited as rows. Be careful with this.

See Also:
  Serialized Form

Field Summary
`static int` | `META_LENGTH_COLUMN_NUMBER`
`static int` | `META_PLACES_COLUMN_NUMBER`
`static int` | `META_RECORDNAME_COLUMN_NUMBER`
`static int` | `META_TYPE_COLUMN_NUMBER`
`protected int` | `originalColumnNumber` Keeps track of the original columns.
`protected DbfTableModel` | `source`

Fields inherited from class com.bbn.openmap.dataAccess.shape.DbfTableModel
`_columnCount, _decimalCounts, _lengths, _names, _records, _types, DEBUG, dirty, DONE_MASK, exitOnClose, filePath, frame, logger, MODIFY_COLUMN_MASK, MODIFY_ROW_MASK, parent, SAVE_MASK, table, TYPE_AUTOINCREMENT, TYPE_BINARY, TYPE_CHARACTER, TYPE_DATE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_LOGICAL, TYPE_LONG, TYPE_MEMO, TYPE_NUMERIC, TYPE_OLE, TYPE_TIMESTAMP, writable, ZERO`

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

Fields inherited from interface com.bbn.openmap.dataAccess.shape.ShapeConstants
`DBF_ATTRIBUTE, DBF_AUTOINCREMENT, DBF_BINARY, DBF_CHARACTER, DBF_DATE, DBF_DOUBLE, DBF_FLOAT, DBF_LOGICAL, DBF_LONG, DBF_MEMO, DBF_NUMERIC, DBF_OLE, DBF_TIMESTAMP, DBF_TYPE_AUTOINCREMENT, DBF_TYPE_BINARY, DBF_TYPE_CHARACTER, DBF_TYPE_DATE, DBF_TYPE_DOUBLE, DBF_TYPE_FLOAT, DBF_TYPE_LOGICAL, DBF_TYPE_LONG, DBF_TYPE_MEMO, DBF_TYPE_NUMERIC, DBF_TYPE_OLE, DBF_TYPE_TIMESTAMP, PARAM_DBF, PARAM_SHP, PARAM_SHX, SHAPE_BOUNDS_ATTRIBUTE, SHAPE_DBF_DASHPATTERN, SHAPE_DBF_DASHPHASE, SHAPE_DBF_DESCRIPTION, SHAPE_DBF_FILLCOLOR, SHAPE_DBF_INFO_ATTRIBUTE, SHAPE_DBF_LINECOLOR, SHAPE_DBF_LINEWIDTH, SHAPE_DBF_SELECTCOLOR, SHAPE_FILE_HEADER_LENGTH, SHAPE_FILE_RECORD_HEADER_LENGTH, SHAPE_INDEX_ATTRIBUTE, SHAPE_MAX_MEASURE_ATTRIBUTE, SHAPE_MAX_Z_ATTRIBUTE, SHAPE_MEASURE_ATTRIBUTE, SHAPE_MIN_MEASURE_ATTRIBUTE, SHAPE_MIN_Z_ATTRIBUTE, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTIPATCH, SHAPE_TYPE_MULTIPOINT, SHAPE_TYPE_MULTIPOINTM, SHAPE_TYPE_MULTIPOINTZ, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINTM, SHAPE_TYPE_POINTZ, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGONM, SHAPE_TYPE_POLYGONZ, SHAPE_TYPE_POLYLINE, SHAPE_TYPE_POLYLINEM, SHAPE_TYPE_POLYLINEZ, SHAPE_Z_ATTRIBUTE`

Constructor Summary
`MetaDbfTableModel(DbfTableModel source)` Creates a blank DbfTableModel from the source DbfTableModel.

Method Summary
`void` | `addBlankRecord()` Create a new record, corresponding to a new column in the source DbfTableModel.
`void` | `exitWindowClosed()` Decide what to do when the window closes.
`java.lang.Object` | `getValueAt(int row, int column)` Retrieves a value for a specific column and row index
`protected void` | `init()` Set up the columns of this DbfTableModel, so the parameters of the source header rows are listed.
`boolean` | `isCellEditable(int rowIndex, int columnIndex)`
`static void` | `main(java.lang.String[] args)`
`java.util.List<java.lang.Object>` | `remove(int columnIndex)` Remove the record at the index.
`void` | `setValueAt(java.lang.Object object, int row, int column)` Sets an object at a certain location.
`void` | `showGUI(java.lang.String filename)`

Methods inherited from class com.bbn.openmap.dataAccess.shape.DbfTableModel
`add, add, add, addColumn, addRecord, append, appendWhitespaceOrTrim, cleanupChanges, commitEvents, deleteColumn, doAction, getBlankRecord, getColumnClass, getColumnCount, getColumnIndexForName, getColumnName, getDbfTableModel, getDecimalCount, getEmptyDefaultForType, getGUI, getLength, getObjectForType, getRecord, getRecords, getRowCount, getStringForType, getTable, getTable, getType, getWritable, headerClone, hideGUI, isExitOnClose, isNumericalType, isValidType, iterator, matches, read, remove, remove, remove, setColumnName, setDecimalCount, setExitOnClose, setLength, setType, setWritable, showGUI, tableChanged, test, write`

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

### META_RECORDNAME_COLUMN_NUMBER

    public static final int META_RECORDNAME_COLUMN_NUMBER

See Also:
  Constant Field Values

### META_TYPE_COLUMN_NUMBER

    public static final int META_TYPE_COLUMN_NUMBER

See Also:
  Constant Field Values

### META_LENGTH_COLUMN_NUMBER

    public static final int META_LENGTH_COLUMN_NUMBER

See Also:
  Constant Field Values

### META_PLACES_COLUMN_NUMBER

    public static final int META_PLACES_COLUMN_NUMBER

See Also:
  Constant Field Values

### source

    protected DbfTableModel source

### originalColumnNumber

    protected int originalColumnNumber

  Keeps track of the original columns. If a name is changed the row will be deleted in all the records.

Constructor Detail

### MetaDbfTableModel

    public MetaDbfTableModel(DbfTableModel source)

  Creates a blank DbfTableModel from the source DbfTableModel.

  Parameters:
    `source` - the DbfTableModel to be modified.

Method Detail

### init

    protected void init()

  Set up the columns of this DbfTableModel, so the parameters of the source header rows are listed.

### remove

    public java.util.List<java.lang.Object> remove(int columnIndex)

  Remove the record at the index. This extension decreases the originalColumnNumber which controls which rows[0] can be edited.

  Overrides:
    `remove` in class `DbfTableModel`

### isCellEditable

    public boolean isCellEditable(int rowIndex,
                                  int columnIndex)

  Specified by:
    `isCellEditable` in interface `javax.swing.table.TableModel`
  Overrides:
    `isCellEditable` in class `DbfTableModel`

### setValueAt

    public void setValueAt(java.lang.Object object,
                           int row,
                           int column)

  Sets an object at a certain location. The type is translated from integer values to names for easier use.

  Specified by:
    `setValueAt` in interface `javax.swing.table.TableModel`
  Overrides:
    `setValueAt` in class `DbfTableModel`

### getValueAt

    public java.lang.Object getValueAt(int row,
                                       int column)

  Retrieves a value for a specific column and row index

  Specified by:
    `getValueAt` in interface `javax.swing.table.TableModel`
  Overrides:
    `getValueAt` in class `DbfTableModel`
  Returns:
    Object A value for a specific column and row index

### addBlankRecord

    public void addBlankRecord()

  Create a new record, corresponding to a new column in the source DbfTableModel. Filled in with standard things that can be edited.

  Overrides:
    `addBlankRecord` in class `DbfTableModel`

### exitWindowClosed

    public void exitWindowClosed()

  Decide what to do when the window closes.

  Overrides:
    `exitWindowClosed` in class `DbfTableModel`

### showGUI

    public void showGUI(java.lang.String filename)

### main

    public static void main(java.lang.String[] args)

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

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details