view flys-client/src/main/java/de/intevation/flys/client/shared/model/ChartInfo.java @ 561:460b8e0f0563

Parse the min/max axes ranges for the ChartInfo and modified the zoom and pan actions to match the current server implementation. flys-client/trunk@2096 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 09 Jun 2011 10:57:42 +0000
parents 6050d49eaba3
children ea2191b1299d
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.io.Serializable;

import de.intevation.flys.client.shared.Transform2D;


/**
 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
 */
public class ChartInfo implements Serializable {

    protected Axis[] xAxes;
    protected Axis[] yAxes;

    protected Transform2D[] transformer;


    public ChartInfo() {
    }


    public ChartInfo(Axis[] xAxes, Axis[] yAxes, Transform2D[] transformer) {
        this.xAxes       = xAxes;
        this.yAxes       = yAxes;
        this.transformer = transformer;
    }


    public Transform2D getTransformer(int pos) {
        if (pos >= 0 && pos < transformer.length) {
            return transformer[pos];
        }

        return null;
    }


    public int getXAxisCount() {
        return xAxes.length;
    }


    public int getYAxisCount() {
        return yAxes.length;
    }


    public Axis getXAxis(int pos) {
        if (pos >= 0 && pos < xAxes.length) {
            return xAxes[pos];
        }

        return null;
    }


    public Axis getYAxis(int pos) {
        if (pos >= 0 && pos < yAxes.length) {
            return yAxes[pos];
        }

        return null;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org