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

org.diirt.graphene.profile.impl.ProfileAreaGraph2D 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.graphene.profile.impl;

import java.awt.Graphics2D;
import java.util.LinkedHashMap;
import org.diirt.graphene.AreaGraph2DRenderer;
import org.diirt.graphene.Cell1DDataset;
import org.diirt.graphene.Graph2DRendererUpdate;
import org.diirt.graphene.profile.ProfileGraph2D;
import org.diirt.graphene.profile.utils.DatasetFactory;

/**
 * Handles profiling for AreaGraph2DRenderer.
 * Takes a Cell1DDataset dataset and repeatedly renders 
 * through a Cell1DDataset.
 * 
 * @author asbarber
 */
public class ProfileAreaGraph2D extends ProfileGraph2D{

    @Override
    protected Cell1DDataset getDataset() {
        return DatasetFactory.makeCell1DGaussianRandomData(getNumDataPoints());
    }

    @Override
    protected AreaGraph2DRenderer getRenderer(int imageWidth, int imageHeight) {
        return new AreaGraph2DRenderer(imageWidth, imageHeight);
    }

    @Override
    protected void render(Graphics2D graphics, AreaGraph2DRenderer renderer, Cell1DDataset data) {
        renderer.draw(graphics, data);
    }
   
    @Override
    public LinkedHashMap getVariations() {
        LinkedHashMap map = new LinkedHashMap<>();
        
        map.put("None", null);

        return map;
    }

    @Override
    public String getGraphTitle() {
        return "AreaGraph2D";
    }
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy