public void addModel(Model model) {

    models.add(model);
    resizeTable(models.size(), columns);
    rows = models.size();
    data[models.size() - 1][0] = model.getName();
    data[models.size() - 1][1] = model.getType();
    data[models.size() - 1][2] = model.isShouldImport();
    fireTableDataChanged();
  }
  public void updateRow(int row, Model model) {

    data[row][0] = model.getName();
    data[row][1] = model.getType();
    data[row][2] = model.isShouldImport();
    fireTableCellUpdated(row, 0);
    fireTableCellUpdated(row, 1);
    fireTableCellUpdated(row, 2);
    fireTableDataChanged();
  }
  public void removeModel(Model model) {

    models.remove(model);
    data = new Object[models.size()][columns];
    rows = models.size();

    int index = 0;

    for (Model m : models) {

      data[index][0] = m.getName();
      data[index][1] = m.getType();
      data[index][2] = m.isShouldImport();

      index++;
    }

    fireTableDataChanged();
  }
  public void setModels(List<Model> models) {

    log.info("Loading " + models.size() + " models.");

    this.models = models;

    columns = 3;
    data = new Object[models.size()][columns];

    rows = models.size();

    int index = 0;

    for (Model model : models) {
      data[index][0] = model.getName();
      data[index][1] = model.getType();
      data[index][2] = model.isShouldImport();
      index++;
    }

    fireTableDataChanged();
  }