コード例 #1
0
  @Override
  public synchronized void initStateFrom(@NotNull final ProgressIndicator indicator) {
    myRunning = indicator.isRunning();
    myCanceled = indicator.isCanceled();
    myFraction = indicator.getFraction();
    myIndeterminate = indicator.isIndeterminate();
    myText = indicator.getText();

    myText2 = indicator.getText2();

    myFraction = indicator.getFraction();

    if (indicator instanceof ProgressIndicatorStacked) {
      ProgressIndicatorStacked stacked = (ProgressIndicatorStacked) indicator;

      myNonCancelableCount = stacked.getNonCancelableCount();

      myTextStack = new Stack<String>(stacked.getTextStack());

      myText2Stack = new Stack<String>(stacked.getText2Stack());

      myFractionStack = new DoubleArrayList(stacked.getFractionStack());
    }
  }
コード例 #2
0
 private void updateProgress() {
   ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator();
   if (indicator != null) {
     indicator.setFraction(indicator.getFraction() + myProgressStep);
   }
 }
コード例 #3
0
 @Override
 public double getFraction() {
   return myIndicator.getFraction();
 }