teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5863: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5863: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.model; ingo@1157: teichmann@5831: import org.dive4elements.artifacts.Message; ingo@1157: ingo@1157: ingo@1157: public class CalculationMessage implements Message { ingo@1157: ingo@1157: protected String message; ingo@1157: protected int steps; ingo@1157: protected int currentStep; ingo@1157: ingo@1157: ingo@1157: public CalculationMessage() { ingo@1157: } ingo@1157: ingo@1157: ingo@1157: public CalculationMessage(int steps, int currentStep, String message) { ingo@1157: this.steps = steps; ingo@1157: this.currentStep = currentStep; ingo@1157: this.message = message; ingo@1157: } ingo@1157: ingo@1157: ingo@1157: public int getSteps() { ingo@1157: return steps; ingo@1157: } ingo@1157: ingo@1157: ingo@1157: public int getCurrentStep() { ingo@1157: return currentStep; ingo@1157: } ingo@1157: ingo@1157: ingo@1157: public String getMessage() { ingo@1157: return message; ingo@1157: } ingo@1157: ingo@1157: ingo@1157: @Override ingo@1157: public String getText() { ingo@1157: return ingo@1157: String.valueOf(currentStep) + "/" + String.valueOf(steps) + ingo@1157: " - " + getMessage(); ingo@1157: } ingo@1157: } sascha@3083: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :