/// <summary> /// Constructor. </summary> /// <param name="dataset"> the dataset for which to display information in the worksheet. </param> /// <exception cref="Exception"> if an invalid data or dmi was passed in. </exception> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET: //ORIGINAL LINE: public StateMod_Save_TableModel(StateMod_DataSet dataset) throws Exception public StateMod_Save_TableModel(StateMod_DataSet dataset) { __dataset = dataset; // get the array of the ints that refer to the groups in // the data set. int[] groups = __dataset.getComponentGroupNumbers(); System.Collections.IList ints = new List <object>(); DataSetComponent dsc = null; System.Collections.IList v = null; // Go through each of the groups and get their data out. Group data // consists of the DataSetComponents the group contains. For each // of the group's DataSetComponents, if it has data, then add its // component type to the accumulation vector. for (int i = 0; i < groups.Length; i++) { dsc = __dataset.getComponentForComponentType(groups[i]); v = (System.Collections.IList)dsc.getData(); if (v == null) { v = new List <object>(); } for (int j = 0; j < v.Count; j++) { dsc = (DataSetComponent)v[j]; // get the dirty components -- they can be saved // (or not). if (dsc.isDirty()) { ints.Add(new int?(dsc.getComponentType())); } } } // now transfer the numbers of the DataSetComponents with data into // an int array from the Vector. __data = new int[ints.Count]; for (int i = 0; i < ints.Count; i++) { __data[i] = ((int?)ints[i]).Value; } _rows = __data.Length; }