/// <summary> /// From AbstractTableModel; returns the data that should be placed in the JTable /// at the given row and column. </summary> /// <param name="row"> the row for which to return data. </param> /// <param name="col"> the column for which to return data. </param> /// <returns> the data that should be placed in the JTable at the given row and col. </returns> public virtual object getValueAt(int row, int col) { // make sure the row numbers are never sorted ... if (_sortOrder != null) { row = _sortOrder[row]; } switch (col) { case COL_GROUP: return(__dataset.getComponentForComponentType(__dataset.lookupComponentGroupTypeForComponent(__data[row])).getComponentName()); case COL_COMP: return(__dataset.getComponentForComponentType(__data[row]).getComponentName()); case COL_NAME: return(__dataset.getComponentForComponentType(__data[row]).getDataFileName()); case COL_DIRTY: if (__dataset.getComponentForComponentType(__data[row]).isDirty()) { return("YES"); } else { return(""); } /* * return "" + __dataset.getComponentForComponentType( * __data[row]).isDirty(); * // + " (" + __data[row] + ")"; */ default: return(""); } }
/// <summary> /// From AbstractTableModel; returns the data that should be placed in the JTable /// at the given row and column. </summary> /// <param name="row"> the row for which to return data. </param> /// <param name="col"> the column for which to return data. </param> /// <returns> the data that should be placed in the JTable at the given row and col. </returns> public virtual object getValueAt(int row, int col) { if (_sortOrder != null) { row = _sortOrder[row]; } switch (col) { case COL_DESC: string group = __dataset.getComponentForComponentType(__dataset.lookupComponentGroupTypeForComponent(__data[row])).getComponentName(); return(group + ": " + __dataset.getComponentForComponentType(__data[row]).getComponentName()); goto case COL_FILE; case COL_FILE: return(__dataset.getComponentForComponentType(__data[row]).getDataFileName()); default: return(""); } }