/// <summary>
        /// Performs data checks on diversion station data. </summary>
        /// <param name="props"> A property list for specific properties
        /// on checking this data. </param>
        /// <param name="des_vector"> Vector of data to check. </param>
        private void checkDiversionStationData(PropList props, System.Collections.IList des_vector)
        {
            // create elements for the checks and check file
            string[] header = StateMod_Diversion.getDataHeader();
            System.Collections.IList data = new List <object>();
            string title = "Diversion Station";

            // perform the general validation using the Data Table Model
            StateMod_Data_TableModel tm = new StateMod_Diversion_Data_TableModel(des_vector, false);

            System.Collections.IList @checked = performDataValidation(tm, title);
            //String [] columnHeader = getDataTableModelColumnHeader( tm );
            string[] columnHeader = getColumnHeader(tm);

            //	 do specific checks
            int size = 0;

            if (des_vector != null)
            {
                size = des_vector.Count;
            }
            data = doSpecificDataChecks(des_vector, props);
            // add the data and checks to the check file
            // provides basic header information for this data check table
            string info = "The following diversion stations (" + data.Count +
                          " out of " + size +
                          ") have no .....";

            // create data models for Check file
            CheckFile_DataModel dm     = new CheckFile_DataModel(data, header, title, info, data.Count, size);
            CheckFile_DataModel gen_dm = new CheckFile_DataModel(@checked, columnHeader, title + " Missing or Invalid Data", "", __gen_problems, size);

            __check_file.addData(dm, gen_dm);
        }
Example #2
0
        /// <summary>
        /// Creates a JScrollWorksheet for the current data and returns it. </summary>
        /// <returns> a JScrollWorksheet containing the data Vector passed in to the constructor. </returns>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: protected RTi.Util.GUI.JScrollWorksheet buildJScrollWorksheet() throws Exception
        protected internal override JScrollWorksheet buildJScrollWorksheet()
        {
            StateMod_Diversion_Data_TableModel   tableModel   = new StateMod_Diversion_Data_TableModel(_data, _editable);
            StateMod_Diversion_Data_CellRenderer cellRenderer = new StateMod_Diversion_Data_CellRenderer(tableModel);

            // _props is defined in the super class
            return(new JScrollWorksheet(cellRenderer, tableModel, _props));
        }
 /// <summary>
 /// Constructor. </summary>
 /// <param name="tableModel"> the table model for which this class renders the cells. </param>
 public StateMod_Diversion_Data_CellRenderer(StateMod_Diversion_Data_TableModel tableModel)
 {
     __tableModel = tableModel;
 }