/// <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_Diversion smd = (StateMod_Diversion)_data.get(row); switch (col) { case COL_ID: return(smd.getID()); case COL_NAME: return(smd.getName()); case COL_RIVER_NODE_ID: return(smd.getCgoto()); case COL_ON_OFF: return(new int?(smd.getSwitch())); case COL_CAPACITY: return(new double?(smd.getDivcap())); case COL_REPLACE_RES_OPTION: return(new int?(smd.getIreptype())); case COL_DAILY_ID: return(smd.getCdividy()); case COL_USER_NAME: return(smd.getUsername()); case COL_DEMAND_TYPE: return(new int?(smd.getIdvcom())); case COL_AREA: return(new double?(smd.getArea())); case COL_USE_TYPE: return(new int?(smd.getIrturn())); case COL_DEMAND_SOURCE: return(new int?(smd.getDemsrc())); case COL_EFF_ANNUAL: return(new double?(smd.getDivefc())); case COL_EFF_01: return(new double?(smd.getDiveff(0))); case COL_EFF_02: return(new double?(smd.getDiveff(1))); case COL_EFF_03: return(new double?(smd.getDiveff(2))); case COL_EFF_04: return(new double?(smd.getDiveff(3))); case COL_EFF_05: return(new double?(smd.getDiveff(4))); case COL_EFF_06: return(new double?(smd.getDiveff(5))); case COL_EFF_07: return(new double?(smd.getDiveff(6))); case COL_EFF_08: return(new double?(smd.getDiveff(7))); case COL_EFF_09: return(new double?(smd.getDiveff(8))); case COL_EFF_10: return(new double?(smd.getDiveff(9))); case COL_EFF_11: return(new double?(smd.getDiveff(10))); case COL_EFF_12: return(new double?(smd.getDiveff(11))); default: return(""); } }