teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.artifacts.states.extreme; felix@4058: felix@4058: import org.apache.log4j.Logger; felix@4058: teichmann@5831: import org.dive4elements.artifactdatabase.data.StateData; teichmann@5831: import org.dive4elements.artifacts.CallContext; teichmann@5831: import org.dive4elements.river.artifacts.states.DefaultState; felix@4058: felix@4058: felix@4058: /** felix@4058: * @author Raimund Renkert felix@4058: */ felix@4058: public class PercentInput extends DefaultState { felix@4058: teichmann@8202: /** The log used in this class. */ teichmann@8202: private static Logger log = Logger.getLogger(PercentInput.class); felix@4058: felix@4058: public static final String PARAMETER_NAME = "percent"; felix@4058: felix@4058: felix@4058: /** felix@4058: * The default constructor that initializes an empty State object. felix@4058: */ felix@4058: public PercentInput () { felix@4058: } felix@4058: felix@4058: felix@4058: /** Tell UI what to display for input. */ felix@4058: @Override felix@4058: protected String getUIProvider() { felix@4058: return "percent_input"; felix@4058: } felix@4058: felix@4058: felix@4058: @Override felix@4058: protected String[] getDefaultsFor(CallContext context, StateData data) { felix@4058: if (data != null && data.getName().equals(PARAMETER_NAME)) { felix@4058: return new String[] {"5", "5"}; felix@4058: } felix@4058: felix@4058: return null; felix@4058: } felix@4058: } felix@4058: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :