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

org.diirt.datasource.graphene.IntensityGraph2DExpression Maven / Gradle / Ivy

There is a newer version: 3.1.7
Show newest version
/**
 * Copyright (C) 2010-14 diirt developers. See COPYRIGHT.TXT
 * All rights reserved. Use is subject to license terms. See LICENSE.TXT
 */
package org.diirt.datasource.graphene;

import org.diirt.graphene.IntensityGraph2DRendererUpdate;
import org.diirt.datasource.expression.DesiredRateExpression;
import org.diirt.datasource.expression.DesiredRateExpressionImpl;
import static org.diirt.datasource.graphene.ExpressionLanguage.functionOf;

/**
 *
 * @author carcassi
 */
public class IntensityGraph2DExpression extends DesiredRateExpressionImpl implements Graph2DExpression {

    IntensityGraph2DExpression(DesiredRateExpression arrayData) {
        super(ExpressionLanguage.createList(arrayData),
                new IntensityGraph2DFunction(functionOf(arrayData)),
                "Histogram Graph");
    }
    
    @Override
    public void update(IntensityGraph2DRendererUpdate update) {
        ((IntensityGraph2DFunction) getFunction()).getUpdateQueue().writeValue(update);
    }

    @Override
    public IntensityGraph2DRendererUpdate newUpdate() {
        return new IntensityGraph2DRendererUpdate();
    }
}