view flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterLocationState.java @ 2273:7b8d59436be3

Set proper bounds for date axes in the chart info document; tell the transformation matrix which type it is (date/number). flys-artifacts/trunk@3930 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 06 Feb 2012 14:37:30 +0000
parents ee7e774ed5b4
children cc6b8af44728
line wrap: on
line source
package de.intevation.flys.artifacts.states;

import de.intevation.flys.artifacts.FLYSArtifact;

import de.intevation.flys.utils.FLYSUtils;

import org.apache.log4j.Logger;

/**
 * Get me a double startpoint.
 */
public class EnterLocationState extends InputDoubleState {

    private static final Logger logger =
        Logger.getLogger(EnterLocationState.class);


    @Override
    protected String getUIProvider() {
        return "location_panel";
    }


    @Override
    protected Object getLower(FLYSArtifact flys) {
        double[] lowerUpper = FLYSUtils.getRiverMinMax(flys);

        return lowerUpper != null
            ? lowerUpper[0]
            : 0;
    }


    @Override
    protected Object getUpper(FLYSArtifact flys) {
        double[] lowerUpper = FLYSUtils.getRiverMinMax(flys);

        return lowerUpper != null
            ? lowerUpper[1]
            : 0;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org