/// <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_Plan smp = (StateMod_Plan)_data.get(row); switch (col) { case COL_ID: return(smp.getID()); case COL_NAME: return(smp.getName()); case COL_RIVER_NODE_ID: return(smp.getCgoto()); case COL_ON_OFF: return(new int?(smp.getSwitch())); case COL_TYPE: return(new int?(smp.getIPlnTyp())); case COL_EFFICIENCY: return(new int?(smp.getPeffFlag())); case COL_RETURN_FLOW_TABLE: return(new int?(smp.getIPrf())); case COL_FAILURE_SWITCH: return(new int?(smp.getIPfail())); case COL_INITIAL_STORAGE: return(new double?(smp.getPsto1())); case COL_SOURCE: return(smp.getPsource()); default: return(""); } }
/// <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_Plan smd = (StateMod_Plan)_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_TYPE: return(new int?(smd.getIPlnTyp())); case COL_RETURN_TYPE: return(new int?(smd.getIPrf())); case COL_FAILURE_SWITCH: return(new int?(smd.getIPfail())); case COL_INITIAL_STORAGE: return(new double?(smd.getPsto1())); case COL_SOURCE_ID: return(smd.getPsource()); case COL_SOURCE_ACCOUNT: return(smd.getIPAcc()); case COL_EFF_FLAG: return(new int?(smd.getPeffFlag())); case COL_EFF_01: case COL_EFF_02: case COL_EFF_03: case COL_EFF_04: case COL_EFF_05: case COL_EFF_06: case COL_EFF_07: case COL_EFF_08: case COL_EFF_09: case COL_EFF_10: case COL_EFF_11: case COL_EFF_12: int peffFlag = smd.getPeffFlag(); if (peffFlag == 1) { return(new double?(smd.getPeff(col - COL_EFF_01))); } else { return(""); } default: return(""); } }