# HG changeset patch # User Felix Wolfsteller # Date 1349690966 -7200 # Node ID 174ff436971b64c6b4fc9bc22602c4752b7e96c3 # Parent c3b959de4d83084482e6aa48bcbd362b79d40784 Added Percentage-Input state to extreme value analysis state model. diff -r c3b959de4d83 -r 174ff436971b flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Mon Oct 08 11:01:20 2012 +0200 +++ b/flys-artifacts/ChangeLog Mon Oct 08 12:09:26 2012 +0200 @@ -1,3 +1,11 @@ +2012-10-08 Felix Wolfsteller + + * flys-artifacts/doc/conf/artifacts/winfo.xm: Introduce another + dummyish state for extreme value analysis. + + * flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/PercentInput.java: + New State to get percentage as input. + 2012-10-08 Felix Wolfsteller * flys-artifacts/doc/conf/artifacts/winfo.xm: Introduce dummyish states for diff -r c3b959de4d83 -r 174ff436971b flys-artifacts/doc/conf/artifacts/winfo.xml --- a/flys-artifacts/doc/conf/artifacts/winfo.xml Mon Oct 08 11:01:20 2012 +0200 +++ b/flys-artifacts/doc/conf/artifacts/winfo.xml Mon Oct 08 12:09:26 2012 +0200 @@ -172,10 +172,16 @@ - + + + + + + + @@ -582,6 +588,12 @@ + + + + diff -r c3b959de4d83 -r 174ff436971b flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/PercentInput.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/extreme/PercentInput.java Mon Oct 08 12:09:26 2012 +0200 @@ -0,0 +1,44 @@ +package de.intevation.flys.artifacts.states.extreme; + +import org.apache.log4j.Logger; + +import de.intevation.artifactdatabase.data.StateData; +import de.intevation.artifacts.CallContext; +import de.intevation.flys.artifacts.states.DefaultState; + + +/** + * @author Raimund Renkert + */ +public class PercentInput extends DefaultState { + + /** The logger used in this class. */ + private static Logger logger = Logger.getLogger(PercentInput.class); + + public static final String PARAMETER_NAME = "percent"; + + + /** + * The default constructor that initializes an empty State object. + */ + public PercentInput () { + } + + + /** Tell UI what to display for input. */ + @Override + protected String getUIProvider() { + return "percent_input"; + } + + + @Override + protected String[] getDefaultsFor(CallContext context, StateData data) { + if (data != null && data.getName().equals(PARAMETER_NAME)) { + return new String[] {"5", "5"}; + } + + return null; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :