/// <summary> /// Performs general and specific data checks on delay table assignment data. </summary> /// <param name="props"> A property list for specific properties. </param> /// <param name="data_vector"> Vector of data to check. </param> private void checkDelayTableAssignmentData(PropList props, System.Collections.IList data_vector) { // Create elements for the checks and check file string[] header = StateCU_CropCharacteristics.getDataHeader(); System.Collections.IList data = new List <object>(); string title = "Delay Table Assignment"; // Perform the general validation using the Data Table Model StateCU_Data_TableModel tm = new StateCU_DelayTableAssignment_Data_TableModel(data_vector); System.Collections.IList @checked = performDataValidation(tm, title); //String [] columnHeader = getDataTableModelColumnHeader( tm ); string[] columnHeader = getColumnHeader(tm); // Do specific checks int size = 0; if (data_vector != null) { size = data_vector.Count; } data = doSpecificDataChecks(data_vector, props); // Add the data and checks to the check file. // Provides basic header information for this data check table string info = "The following " + title + " (" + 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); }
/// <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() { StateCU_DelayTableAssignment_Data_TableModel tableModel = new StateCU_DelayTableAssignment_Data_TableModel(_data, _editable); StateCU_DelayTableAssignment_Data_CellRenderer cellRenderer = new StateCU_DelayTableAssignment_Data_CellRenderer(tableModel); // _props is defined in the super class return(new JScrollWorksheet(cellRenderer, tableModel, _props)); }
/// <summary> /// Constructor. </summary> /// <param name="data"> the data to display in the worksheet. Can be null or empty. </param> /// <param name="titleString"> the String to display as the GUI title. </param> /// <param name="editable"> whether the data in the JFrame can be edited or not. If true /// the data can be edited, if false they can not. </param> /// <exception cref="Exception"> if there is an error building the worksheet. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public StateCU_DelayTableAssignment_Data_JFrame(java.util.List<StateCU_DelayTableAssignment_Data_TableModel> data, String titleString, boolean editable) throws Exception public StateCU_DelayTableAssignment_Data_JFrame(IList <StateCU_DelayTableAssignment_Data_TableModel> data, string titleString, bool editable) : base(data, titleString, editable) { JPanel panel = new JPanel(); panel.setLayout(new GridBagLayout()); JLabel label = new JLabel("Show totals: "); JGUIUtil.addComponent(panel, label, 0, 0, 1, 1, 0, 0, GridBagConstraints.NONE, GridBagConstraints.WEST); __checkBox = new JCheckBox((string)null, true); __checkBox.addActionListener(this); JGUIUtil.addComponent(panel, __checkBox, 1, 0, 1, 1, 1, 1, GridBagConstraints.NONE, GridBagConstraints.WEST); getContentPane().add("North", panel); pack(); setSize(370, getHeight()); __tableModel = (StateCU_DelayTableAssignment_Data_TableModel)_worksheet.getTableModel(); __tableModel.setJWorksheet(_worksheet); }
/// <summary> /// Constructor. </summary> /// <param name="tableModel"> the table model for which to render cells </param> public StateCU_DelayTableAssignment_Data_CellRenderer(StateCU_DelayTableAssignment_Data_TableModel tableModel) { __tableModel = tableModel; }