public void setTablaPrincipal(java.util.List val) {
   DefaultTableModel modelo = ((DefaultTableModel) this.tablaPrincipal.getModel());
   for (int i = 0; i < val.size(); i++) {
     modelo.addRow(((java.util.ArrayList) val.get(i)).toArray());
   }
   this.calculaSumas();
 }
Example #2
0
  /**
   * Gets the data from the <tt>ConfigurationService</tt> that will construct the
   * <tt>PropsTableModel</tt> for the properties table.
   *
   * @return The data necessary to initialize the <tt>PropsTableModel</tt>
   */
  private Object[][] initTableModel() {
    ConfigurationService confService = PropertiesEditorActivator.getConfigurationService();
    java.util.List<String> properties = confService.getAllPropertyNames();
    Object[][] data = new Object[properties.size()][];
    int i = 0;

    for (String property : properties) {
      data[i++] = new Object[] {property, confService.getProperty(property)};
    }

    return data;
  }
 public void loadData(boolean forceReload) {
   ICFFreeSwitchSchemaObj schemaObj = swingSchema.getSchema();
   if ((containingCluster == null) || forceReload) {
     CFSecurityAuthorization auth = schemaObj.getAuthorization();
     long containingClusterId = auth.getSecClusterId();
     containingCluster = schemaObj.getClusterTableObj().readClusterByIdIdx(containingClusterId);
   }
   if ((listOfTenant == null) || forceReload) {
     arrayOfTenant = null;
     listOfTenant =
         schemaObj
             .getTenantTableObj()
             .readTenantByClusterIdx(containingCluster.getRequiredId(), swingIsInitializing);
     if (listOfTenant != null) {
       Object objArray[] = listOfTenant.toArray();
       if (objArray != null) {
         int len = objArray.length;
         arrayOfTenant = new ICFSecurityTenantObj[len];
         for (int i = 0; i < len; i++) {
           arrayOfTenant[i] = (ICFSecurityTenantObj) objArray[i];
         }
         Arrays.sort(arrayOfTenant, compareTenantByQualName);
       }
     }
   }
 }
 public void loadData(boolean forceReload) {
   ICFSecuritySchemaObj schemaObj = swingSchema.getSchema();
   if ((listOfISOTimezone == null) || forceReload) {
     arrayOfISOTimezone = null;
     listOfISOTimezone =
         schemaObj.getISOTimezoneTableObj().readAllISOTimezone(swingIsInitializing);
     if (listOfISOTimezone != null) {
       Object objArray[] = listOfISOTimezone.toArray();
       if (objArray != null) {
         int len = objArray.length;
         arrayOfISOTimezone = new ICFSecurityISOTimezoneObj[len];
         for (int i = 0; i < len; i++) {
           arrayOfISOTimezone[i] = (ICFSecurityISOTimezoneObj) objArray[i];
         }
         Arrays.sort(arrayOfISOTimezone, compareISOTimezoneByQualName);
       }
     }
   }
 }
 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);
       }
     }
   }
 }
 public int getRowCount() {
   return data.size();
 }
 public void updateValue(String newValue, int rowIndex, int columnIndex) {
   String[] row = data.get(rowIndex);
   row[columnIndex] = newValue;
 }
 public void setValueAt(String[] value) {
   String[] row = new String[getColumnCount()];
   row = value;
   data.add(row);
 }
 public Object getValueAt(int rowIndex, int columnIndex) {
   String[] row = data.get(rowIndex);
   return row[columnIndex];
 }
 public DataModel() {
   for (int i = 0; i < data.size(); i++) {
     data.add(new String[getColumnCount()]);
   }
 }