com.ptc.wgmecad.table
Class ConfigDefTableModel

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended byjavax.swing.table.DefaultTableModel
          extended bycom.ptc.wgmecad.table.TableMdlSR
              extended bycom.ptc.wgmecad.table.ConfigDefTableModel
All Implemented Interfaces:
Serializable, TableModel

public class ConfigDefTableModel
extends TableMdlSR

See Also:
Serialized Form

Field Summary
private static String boardFilename
           
private static Class[] colClass
           
private static String[] colNames
           
private static String DefaultIncludeColumnName
           
private static int DefaultIncludeColumnNameNumber
           
private static String designFileNameColumnName
           
private static int designFileNameColumnNumber
           
private static String designFilePathColumnName
           
private static int designFilePathColumnNumber
           
private static String EPM_DescribesColumnName
           
private static int EPM_DescribesColumnNumber
           
private static String EPM_DocumentColumnName
           
private static int EPM_DocumentColumnNumber
           
private static String fileGroupColumnName
           
private static int fileGroupColumnNumber
           
(package private)  HashMap firstFileGroupRowOccurence
           
private static String LockedColumnName
           
private static int LockedColumnNameNumber
           
(package private) static org.apache.log4j.Logger logger
           
private static String schematicFilename
           
 
Fields inherited from class com.ptc.wgmecad.table.TableMdlSR
argReg
 
Fields inherited from class javax.swing.table.DefaultTableModel
columnIdentifiers, dataVector
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
ConfigDefTableModel(SecondaryArgumentRegister sargReg)
           
 
Method Summary
 Class getColumnClass(int columnIndex)
           
 boolean isCellEditable(int viewrow, int viewcolumn)
          Sets a cell as editable or not All our cells are editable except for EPM_Describes when: 1.
protected  void onTableModelUpdate(TableModelEvent e)
           
private  void rebuildDependentDescribes(int row, String describesFileGroup, String describesValue)
          call this anytime a describes link changes
private  void rebuildFileGroupOccurences()
          call this anytime a filegroup name changes It maintains a hashmap of the first row that a filegroup name occurs in.
 void setValueAt(Object aValue, int row, int column)
           
 void updateArgumentMapFromModel()
          removes all current hook arguments from the arg map, and dumps the current contens of the table model into the map.
private  void validateData()
          call this anytime a filegroup name changes // beta: implement this, as well as info dialog about why describes not editable at a certain time.
 
Methods inherited from class javax.swing.table.DefaultTableModel
addColumn, addColumn, addColumn, addRow, addRow, convertToVector, convertToVector, getColumnCount, getColumnName, getDataVector, getRowCount, getValueAt, insertRow, insertRow, moveRow, newDataAvailable, newRowsAdded, removeRow, rowsRemoved, setColumnCount, setColumnIdentifiers, setColumnIdentifiers, setDataVector, setDataVector, setNumRows, setRowCount
 
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

LockedColumnName

private static final String LockedColumnName

DefaultIncludeColumnName

private static final String DefaultIncludeColumnName

EPM_DocumentColumnName

private static final String EPM_DocumentColumnName

fileGroupColumnName

private static final String fileGroupColumnName

designFilePathColumnName

private static final String designFilePathColumnName

designFileNameColumnName

private static final String designFileNameColumnName

EPM_DescribesColumnName

private static final String EPM_DescribesColumnName

LockedColumnNameNumber

private static final int LockedColumnNameNumber
See Also:
Constant Field Values

DefaultIncludeColumnNameNumber

private static final int DefaultIncludeColumnNameNumber
See Also:
Constant Field Values

EPM_DocumentColumnNumber

private static final int EPM_DocumentColumnNumber
See Also:
Constant Field Values

fileGroupColumnNumber

private static final int fileGroupColumnNumber
See Also:
Constant Field Values

designFilePathColumnNumber

private static final int designFilePathColumnNumber
See Also:
Constant Field Values

designFileNameColumnNumber

private static final int designFileNameColumnNumber
See Also:
Constant Field Values

EPM_DescribesColumnNumber

private static final int EPM_DescribesColumnNumber
See Also:
Constant Field Values

boardFilename

private static final String boardFilename
See Also:
Constant Field Values

schematicFilename

private static final String schematicFilename
See Also:
Constant Field Values

logger

static org.apache.log4j.Logger logger

colNames

private static final String[] colNames

firstFileGroupRowOccurence

HashMap firstFileGroupRowOccurence

colClass

private static final Class[] colClass
Constructor Detail

ConfigDefTableModel

public ConfigDefTableModel(SecondaryArgumentRegister sargReg)
Method Detail

rebuildFileGroupOccurences

private void rebuildFileGroupOccurences()
call this anytime a filegroup name changes It maintains a hashmap of the first row that a filegroup name occurs in. Only this row should have an editable design link.


rebuildDependentDescribes

private void rebuildDependentDescribes(int row,
                                       String describesFileGroup,
                                       String describesValue)
call this anytime a describes link changes


validateData

private void validateData()
call this anytime a filegroup name changes // beta: implement this, as well as info dialog about why describes not editable at a certain time.


setValueAt

public void setValueAt(Object aValue,
                       int row,
                       int column)
Specified by:
setValueAt in interface TableModel
Overrides:
setValueAt in class TableMdlSR

onTableModelUpdate

protected void onTableModelUpdate(TableModelEvent e)
Specified by:
onTableModelUpdate in class TableMdlSR

isCellEditable

public boolean isCellEditable(int viewrow,
                              int viewcolumn)
Sets a cell as editable or not All our cells are editable except for EPM_Describes when: 1. the filegroup is nameless (then on main object) 2. the filegroup describes the board or schematic zip (included in case 1) 3. the filegroup has already been described using the field in a previous row.

Parameters:
viewrow -
viewcolumn -
Returns:

getColumnClass

public Class getColumnClass(int columnIndex)

updateArgumentMapFromModel

public void updateArgumentMapFromModel()
Description copied from class: TableMdlSR
removes all current hook arguments from the arg map, and dumps the current contens of the table model into the map. This assumes that the EXE_COL contains the correct hook arguments. Note that this removes any persistence data for the hook arguments - they will all be persisted. The rationale is that once the user messes with it in the GUI, they are setting up longer term settings.

Specified by:
updateArgumentMapFromModel in class TableMdlSR