@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()); } }
private void updateProgress() { ProgressIndicator indicator = ProgressManager.getInstance().getProgressIndicator(); if (indicator != null) { indicator.setFraction(indicator.getFraction() + myProgressStep); } }
@Override public double getFraction() { return myIndicator.getFraction(); }