All Downloads are FREE. Search and download functionalities are using the official Maven repository.

oms3.dsl.analysis.Plot Maven / Gradle / Ivy

There is a newer version: 0.8.1
Show newest version
package oms3.dsl.analysis;

import oms3.dsl.*;
import java.util.ArrayList;
import java.util.List;
import oms3.SimConst;

/**
 * 
 * @author od
 */
public class Plot implements Buildable {

    Axis x;
    List y = new ArrayList();
    String title;
    String view = SimConst.MULTI;

    public void setView(String view) {
        this.view = view;
    }

    public String getView() {
        return view;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    Axis getX() {
        return x;
    }

    List getY() {
        return y;
    }

    @Override
    public Buildable create(Object name, Object value) {
        if (name.equals("x")) {
            x = new Axis();
            return x;
        } else if (name.equals("y")) {
            Axis a = new Axis();
            y.add(a);
            return a;
        } else if (name.equals("calc")) {
            Calc a = new Calc();
            y.add(a);
            return a;
        }
        throw new IllegalArgumentException("plot cannot handle :" + name);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy