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

net.finmath.plots.GraphStyle Maven / Gradle / Ivy

Go to download

finmath lib plot extensions provide convenient plotting methods by providing consistent wrappers to plot libraries (like JFreeChart or JavaFX).

The newest version!
/*
 * (c) Copyright Christian P. Fries, Germany. Contact: [email protected].
 *
 * Created on 21 May 2018
 */
package net.finmath.plots;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Shape;
import java.awt.Stroke;

/**
 * A stile for a given graph specifying color, shape and stroke.
 * If shape is null, no points will be drawn.
 * If stroke is null, no line will be drawn.
 *
 * @author Christian Fries
 */
public class GraphStyle {

	private final Shape shape;
	private final Stroke stroke;
	private final Color color;
	private final Color fillColor;

	public GraphStyle(final Shape shape, final Stroke stroke, final Color color, final Color fillColor) {
		super();
		this.shape = shape;
		this.stroke = stroke;
		this.color = color;
		this.fillColor = fillColor;
	}

	public GraphStyle(final Shape shape, final Stroke stroke, final Color color) {
		this(shape, stroke, color, null);
	}

	public GraphStyle(final Shape shape) {
		this(shape, new BasicStroke(), null, null);
	}

	public Shape getShape() {
		return shape;
	}

	public Stroke getStroke() {
		return stroke;
	}

	public Color getColor() {
		return color;
	}

	public Color getFillColor() {
		return fillColor;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy