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

## Class s2iInstCktTableModel

    java.lang.Object
      |
      +--javax.swing.table.AbstractTableModel
            |
            +--s2iInstCktTableModel

public class s2iInstCktTableModel
extends javax.swing.table.AbstractTableModel

A TableModel class to keep the list of instantiated top-level subckts.

Author:
  Anish Malhotra, Cadence Design Systems
See Also:
  Serialized Form

Field Summary
`private static int` | `colLimit` Number of instance columns (elem + def + nodes) to allocate space for.
`protected java.lang.Object[][]` | `data` The instance data.
`protected int` | `maxCol` Number of columns currently in use (widest row).
`protected int` | `rowCtr` Number of rows currently in use.
`private static int` | `rowLimit` Number of instance rows to allocate space for.

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

Constructor Summary
`s2iInstCktTableModel()`

Method Summary
`void` | `addInstance(java.lang.String CktDef)` Add a new row for an instance.
`java.util.Vector` | `archive()` Connvert the table data to a Vector of Strings, which can be stored.
`void` | `clearAll()` Clear all data from the table.
`int` | `getColumnCount()` Return the number of columns in the widest row.
`java.lang.String` | `getColumnName(int col)` Get the name of a column by position
`java.util.Enumeration` | `getNodes()` Get an enumeration of unique node names present in the data model.
`int` | `getRowCount()` Return the number of rows defined.
`java.lang.Object` | `getValueAt(int row, int col)` Return the value of a cell by position.
`boolean` | `isCellBlank(int row, int col)` Determine if the value of a cell is null
`boolean` | `isCellEditable(int row, int col)` Determine if the user can edit a cell value.
`static void` | `main(java.lang.String[] args)` A main method for testing this class.
`void` | `printdataNcol()` Print the table data to stdout in DEBUG mode.
`void` | `setValueAt(java.lang.Object value, int row, int col)` Set a cell value.

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

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

Field Detail

### rowLimit

    private static final int rowLimit

  Number of instance rows to allocate space for.

### colLimit

    private static final int colLimit

  Number of instance columns (elem + def + nodes) to allocate space for.

### data

    protected java.lang.Object[][] data

  The instance data.

### rowCtr

    protected int rowCtr

  Number of rows currently in use.

### maxCol

    protected int maxCol

  Number of columns currently in use (widest row).

Constructor Detail

### s2iInstCktTableModel

    public s2iInstCktTableModel()

Method Detail

### clearAll

    public void clearAll()

  Clear all data from the table.

### getColumnCount

    public int getColumnCount()

  Return the number of columns in the widest row.
  Returns:
    Number of columns
  Overrides:
    getColumnCount in class javax.swing.table.AbstractTableModel

### getRowCount

    public int getRowCount()

  Return the number of rows defined.
  Returns:
    Number of rows
  Overrides:
    getRowCount in class javax.swing.table.AbstractTableModel

### getColumnName

    public java.lang.String getColumnName(int col)

  Get the name of a column by position
  Parameters:
    `column` - number (first column is 0)
  Returns:
    Name of column
  Overrides:
    getColumnName in class javax.swing.table.AbstractTableModel

### getValueAt

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

  Return the value of a cell by position.
  Parameters:
    `row` - The cell row
    `col` - The cell column
  Returns:
    Cell contents (may be null)
  Overrides:
    getValueAt in class javax.swing.table.AbstractTableModel

### isCellBlank

    public boolean isCellBlank(int row,
                               int col)

  Determine if the value of a cell is null
  Parameters:
    `row` - The cell row
    `col` - The cell column
  Returns:
    true if cell value is null)

### addInstance

    public void addInstance(java.lang.String CktDef)

  Add a new row for an instance. The instance is given as a String of words.
  Parameters:
    `CktDef` - The String of instance tokens

### printdataNcol

    public void printdataNcol()

  Print the table data to stdout in DEBUG mode.

### archive

    public java.util.Vector archive()

  Connvert the table data to a Vector of Strings, which can be stored.
  Returns:
    The Vector of instance token Strings

### getNodes

    public java.util.Enumeration getNodes()

  Get an enumeration of unique node names present in the data model.
  Returns:
    Enumeration of node name Strings

### isCellEditable

    public boolean isCellEditable(int row,
                                  int col)

  Determine if the user can edit a cell value.
  Parameters:
    `row` - The cell row
    `col` - The cell column
  Returns:
    true if the cell can be edited
  Overrides:
    isCellEditable in class javax.swing.table.AbstractTableModel

### setValueAt

    public void setValueAt(java.lang.Object value,
                           int row,
                           int col)

  Set a cell value.
  Parameters:
    `value` - The value to set the cell to
    `row` - The cell row
    `col` - The cell column
  Overrides:
    setValueAt in class javax.swing.table.AbstractTableModel

### main

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

  A main method for testing this class. This will add a few dummy circuits and then print out data and col Names
  Parameters:
    `args` - unused

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