teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.jfree; christian@3254: teichmann@6905: import org.dive4elements.river.themes.ThemeDocument; christian@3254: christian@3254: import java.awt.BasicStroke; christian@3254: import java.awt.Color; christian@3254: christian@3254: import org.jfree.chart.plot.ValueMarker; christian@3254: christian@3254: /** christian@3254: * Marker that represents a single value. christian@3254: * @author Christian Lins christian@3254: */ christian@3254: public class StyledValueMarker extends ValueMarker { christian@3254: christian@3254: private static final long serialVersionUID = -3607777705307785140L; christian@3254: teichmann@6905: public StyledValueMarker(double value, ThemeDocument theme) { christian@3254: super(value); sascha@3256: teichmann@6905: Color color = theme.parseAreaBackgroundColor(); christian@3254: if(color == null) { christian@3254: color = Color.BLACK; christian@3254: } christian@3254: this.setPaint(color); sascha@3256: teichmann@6905: int size = theme.parsePointWidth(); christian@3254: setStroke(new BasicStroke(size)); christian@3254: } christian@3254: } sascha@3259: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :