OMS (v3.0.25)

oms3.io
Class MemoryTable

java.lang.Object
  extended by oms3.io.MemoryTable
All Implemented Interfaces:
javax.swing.table.TableModel, CSTable

public class MemoryTable
extends java.lang.Object
implements CSTable, javax.swing.table.TableModel

Table, that can be managed.

Author:
Olaf David

Constructor Summary
MemoryTable()
           
MemoryTable(CSTable src)
           
MemoryTable(CSTable src, boolean skipContent)
           
 
Method Summary
 void addRow(java.lang.Object... row)
           
 void addRows(java.util.List<java.lang.String[]> r)
           
 void addTableModelListener(javax.swing.event.TableModelListener l)
           
 void clearRows()
           
 java.lang.Class<?> getColumnClass(int columnIndex)
           
 int getColumnCount()
          get the number of columns in the table
 java.util.Map<java.lang.String,java.lang.String> getColumnInfo(int column)
          Get the info for a column.
 java.lang.String getColumnName(int column)
          Get the column name.
 java.util.Map<java.lang.String,java.lang.String> getInfo()
          Get the annotations for the table
 java.lang.String getName()
          Get the name of the table
 int getRowCount()
           
 java.util.List<java.lang.String[]> getRows()
           
 java.util.List<java.lang.String[]> getRows(int from, int to)
           
 java.lang.Object getValueAt(int rowIndex, int columnIndex)
           
 boolean isCellEditable(int rowIndex, int columnIndex)
           
 java.util.Iterator<java.lang.String[]> iterator()
           
 void removeTableModelListener(javax.swing.event.TableModelListener l)
           
 java.lang.Iterable<java.lang.String[]> rows()
          get the row iterator.
 java.lang.Iterable<java.lang.String[]> rows(int skipRow)
          get the row iterator and skip the first rows.
 void setColumns(java.lang.String... columns)
           
 void setName(java.lang.String name)
           
 void setValueAt(java.lang.Object aValue, int rowIndex, int columnIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryTable

public MemoryTable(CSTable src,
                   boolean skipContent)

MemoryTable

public MemoryTable(CSTable src)

MemoryTable

public MemoryTable()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: CSTable
Get the name of the table

Specified by:
getName in interface CSTable
Returns:
the name

getInfo

public java.util.Map<java.lang.String,java.lang.String> getInfo()
Description copied from interface: CSTable
Get the annotations for the table

Specified by:
getInfo in interface CSTable
Returns:
the annotations for the propertyset.

getColumnCount

public int getColumnCount()
Description copied from interface: CSTable
get the number of columns in the table

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Specified by:
getColumnCount in interface CSTable
Returns:
the number of columns.

getColumnName

public java.lang.String getColumnName(int column)
Description copied from interface: CSTable
Get the column name.

Specified by:
getColumnName in interface javax.swing.table.TableModel
Specified by:
getColumnName in interface CSTable
Returns:
the column name.

setColumns

public void setColumns(java.lang.String... columns)

iterator

public java.util.Iterator<java.lang.String[]> iterator()

getRowCount

public int getRowCount()
Specified by:
getRowCount in interface javax.swing.table.TableModel

getColumnClass

public java.lang.Class<?> getColumnClass(int columnIndex)
Specified by:
getColumnClass in interface javax.swing.table.TableModel

isCellEditable

public boolean isCellEditable(int rowIndex,
                              int columnIndex)
Specified by:
isCellEditable in interface javax.swing.table.TableModel

getValueAt

public java.lang.Object getValueAt(int rowIndex,
                                   int columnIndex)
Specified by:
getValueAt in interface javax.swing.table.TableModel

setValueAt

public void setValueAt(java.lang.Object aValue,
                       int rowIndex,
                       int columnIndex)
Specified by:
setValueAt in interface javax.swing.table.TableModel

addTableModelListener

public void addTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
addTableModelListener in interface javax.swing.table.TableModel

removeTableModelListener

public void removeTableModelListener(javax.swing.event.TableModelListener l)
Specified by:
removeTableModelListener in interface javax.swing.table.TableModel

setName

public void setName(java.lang.String name)

addRow

public void addRow(java.lang.Object... row)

addRows

public void addRows(java.util.List<java.lang.String[]> r)

clearRows

public void clearRows()

getRows

public java.util.List<java.lang.String[]> getRows(int from,
                                                  int to)

getRows

public java.util.List<java.lang.String[]> getRows()

getColumnInfo

public java.util.Map<java.lang.String,java.lang.String> getColumnInfo(int column)
Description copied from interface: CSTable
Get the info for a column.

Specified by:
getColumnInfo in interface CSTable
Returns:
a map with KVP for column meta data.

rows

public java.lang.Iterable<java.lang.String[]> rows()
Description copied from interface: CSTable
get the row iterator.

Specified by:
rows in interface CSTable
Returns:
row iterator

rows

public java.lang.Iterable<java.lang.String[]> rows(int skipRow)
Description copied from interface: CSTable
get the row iterator and skip the first rows.

Specified by:
rows in interface CSTable
Parameters:
skipRow - the # rows to skip
Returns:
row iterator

OMS (v3.0.25)

Generated 2010-08-11 08:44:20 MDT, USDA-ARS-ASRU/CSU, 2150 Center Ave, Fort Collins, CO 80526, U.S.A.