Examples of BackupTableModel


Examples of org.nasutekds.guitools.controlpanel.datamodel.BackupTableModel

  {
    BackupDescriptor backup = null;
    int row = backupList.getSelectedRow();
    if (row != -1)
    {
      BackupTableModel model = (BackupTableModel)backupList.getModel();
      backup = model.get(row);
    }
    return backup;
  }
View Full Code Here

Examples of org.nasutekds.guitools.controlpanel.datamodel.BackupTableModel

    gbc.anchor = GridBagConstraints.CENTER;
    add(lRefreshingList, gbc);

    backupList = new JTable();
    // Done to provide a good size to the table.
    BackupTableModel model = new BackupTableModel();
    for (BackupDescriptor backup : createDummyBackupList())
    {
      model.add(backup);
    }
    backupList.setModel(model);
    backupList.getSelectionModel().setSelectionMode(
        ListSelectionModel.SINGLE_SELECTION);
    backupList.setShowGrid(false);
    backupList.setIntercellSpacing(new Dimension(0, 0));
    renderer = new BackupTableCellRenderer();
    renderer.setParentPath(new File(DUMMY_PARENT_PATH));
    for (int i=0; i<model.getColumnCount(); i++)
    {
      TableColumn col = backupList.getColumn(model.getColumnName(i));
      col.setCellRenderer(renderer);
    }
    backupList.setTableHeader(null);
    Utilities.updateTableSizes(backupList);
    tableScroll = Utilities.createScrollPane(backupList);
View Full Code Here

Examples of org.nasutekds.guitools.controlpanel.datamodel.BackupTableModel

       * {@inheritDoc}
       */
      public void backgroundTaskCompleted(Set<BackupInfo> returnValue,
          Throwable t)
      {
        BackupTableModel model = (BackupTableModel)backupList.getModel();
        model.clear();
        renderer.setParentPath(new File(parentPath));
        if (t == null)
        {
          if (returnValue.size() > 0)
          {
            for (BackupInfo backup : returnValue)
            {
              model.add(new BackupDescriptor(backup));
            }
            model.fireTableDataChanged();
            Utilities.updateTableSizes(backupList);
            tableScroll.setVisible(true);
            lRefreshingList.setVisible(false);
          }
          else
          {
            model.fireTableDataChanged();
            lRefreshingList.setText(NO_BACKUPS_FOUND.toString());
            lRefreshingList.setVisible(isLocal());
          }
          errorPane.setVisible(false);
          // This is done to perform checks against whether we require to
          // display an error message or not.
          configurationChanged(new ConfigurationChangeEvent(null,
              getInfo().getServerDescriptor()));
        }
        else
        {
          model.fireTableDataChanged();
          boolean displayError = true;
          if (t instanceof OpenDsException)
          {
            OpenDsException e = (OpenDsException)t;
            if (e.getMessageObject().getDescriptor().equals(
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.