/// <summary> /// 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]; } StateMod_Reservoir r = (StateMod_Reservoir)_data.get(row); switch (col) { case COL_ID: return(r.getID()); case COL_NAME: return(r.getName()); case COL_NODE_ID: return(r.getCgoto()); case COL_SWITCH: return(new int?(r.getSwitch())); case COL_ONE_FILL_DATE: return(new int?((int)r.getRdate())); case COL_MIN_CONTENT: return(new double?(r.getVolmin())); case COL_MAX_CONTENT: return(new double?(r.getVolmax())); case COL_MAX_RELEASE: return(new double?(r.getFlomax())); case COL_DEAD_STORAGE: return(new double?(r.getDeadst())); case COL_DAILY_ID: return(r.getCresdy()); case COL_NUM_OWNERS: return(new int?(r.getNowner())); case COL_NUM_PRECIP_STA: int nptpx = StateMod_ReservoirClimate.getNumPrecip(r.getClimates()); return(new int?(nptpx)); case COL_NUM_EVAP_STA: int nevap = StateMod_ReservoirClimate.getNumEvap(r.getClimates()); return(new int?(nevap)); case COL_NUM_CURVE_ROWS: System.Collections.IList v = r.getAreaCaps(); if (v == null) { return(new int?(0)); } else { return(new int?(v.Count)); } default: return(""); } }