public void setSwingDataCollection(Collection<ICFBamId64GenObj> value) { final String S_ProcName = "setSwingDataCollection"; swingDataCollection = value; if (swingDataCollection == null) { arrayOfId64Gen = new ICFBamId64GenObj[0]; } else { int len = value.size(); arrayOfId64Gen = new ICFBamId64GenObj[len]; Iterator<ICFBamId64GenObj> iter = swingDataCollection.iterator(); int idx = 0; while (iter.hasNext() && (idx < len)) { arrayOfId64Gen[idx++] = iter.next(); } if (idx < len) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator did not fully populate the array copy"); } if (iter.hasNext()) { throw CFLib.getDefaultExceptionFactory() .newRuntimeException( getClass(), S_ProcName, "Collection iterator had left over items when done populating array copy"); } Arrays.sort(arrayOfId64Gen, compareId64GenByQualName); } PickerTableModel tblDataModel = getDataModel(); if (tblDataModel != null) { tblDataModel.fireTableDataChanged(); } }
public void loadData(boolean forceReload) { ICFBamSchemaObj schemaObj = swingSchema.getSchema(); if ((listOfAccessFrequency == null) || forceReload) { arrayOfAccessFrequency = null; listOfAccessFrequency = schemaObj.getAccessFrequencyTableObj().readAllAccessFrequency(swingIsInitializing); if (listOfAccessFrequency != null) { Object objArray[] = listOfAccessFrequency.toArray(); if (objArray != null) { int len = objArray.length; arrayOfAccessFrequency = new ICFBamAccessFrequencyObj[len]; for (int i = 0; i < len; i++) { arrayOfAccessFrequency[i] = (ICFBamAccessFrequencyObj) objArray[i]; } Arrays.sort(arrayOfAccessFrequency, compareAccessFrequencyByQualName); } } } }