Package org.eobjects.datacleaner.widgets

Examples of org.eobjects.datacleaner.widgets.DCProgressBar


      }
    });
  }

  public void setExpectedRows(final Table table, final int expectedRows) {
    final DCProgressBar progressBar = getProgressBar(table, expectedRows);
    final DCLabel tableLabel = DCLabel.bright(table.getName());
    final DCLabel rowsLabel = DCLabel.bright("Approx. " + expectedRows + " rows");
    rowsLabel.setFont(WidgetUtils.FONT_SMALL);

    SwingUtilities.invokeLater(new Runnable() {
View Full Code Here


  }

  private DCProgressBar getProgressBar(Table table, int expectedRows) {

    synchronized (_progressBars) {
      DCProgressBar progressBar = _progressBars.get(table);
      if (progressBar == null) {
        if (expectedRows == -1) {
          expectedRows = Integer.MAX_VALUE;
        }
        progressBar = new DCProgressBar(0, expectedRows);
        _progressBars.put(table, progressBar);

        // remove loading indicators
        _loadingIcon.setVisible(false);
        _loadingLabel.setVisible(false);
      } else {
        if (expectedRows != -1) {
          progressBar.setMaximum(expectedRows);
        }
      }
      return progressBar;
    }
  }
View Full Code Here

      return progressBar;
    }
  }

  public void updateProgress(final Table table, final int currentRow) {
    final DCProgressBar progressBar = getProgressBar(table, -1);
    progressBar.setValueIfHigherAndSignificant(currentRow);

    if (_verboseLogging) {
      boolean log = false;
      synchronized (_verboseCounter) {
        Integer previousCount = _verboseCounter.get(table);
View Full Code Here

      _currentBytesLabels[i].setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);

      _expectedBytesLabels[i] = new JLabel("??? bytes");
      _expectedBytesLabels[i].setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);

      _progressBars[i] = new DCProgressBar(0, 100);

      _infoLabels[i] = new JLabel("Downloading file '" + file.getName() + "'", JLabel.CENTER);
      _infoLabels[i].setForeground(WidgetUtils.BG_COLOR_BRIGHTEST);
    }
View Full Code Here

  public void setProgress(File file, Long bytes) {
    int index = getIndex(file);

    DecimalFormat formatter = new DecimalFormat("###,###");
    _currentBytesLabels[index].setText(formatter.format(bytes));
    DCProgressBar progressBar = _progressBars[index];
    progressBar.setValueIfHigherAndSignificant((int) (bytes / 100));
  }
View Full Code Here

TOP

Related Classes of org.eobjects.datacleaner.widgets.DCProgressBar

Copyright © 2018 www.massapicom. 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.