[Schmitzm-commits] r2417 - trunk/schmitzm-jfree/src/main/java/de/schmitzm/jfree/chart/style
scm-commit at wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 10 11:08:46 CEST 2015
Author: mojays
Date: 2015-09-10 11:08:46 +0200 (Thu, 10 Sep 2015)
New Revision: 2417
Modified:
trunk/schmitzm-jfree/src/main/java/de/schmitzm/jfree/chart/style/ChartRendererStyle.java
Log:
ChartRendererStyle: methods to access series properties by series key
Modified: trunk/schmitzm-jfree/src/main/java/de/schmitzm/jfree/chart/style/ChartRendererStyle.java
===================================================================
--- trunk/schmitzm-jfree/src/main/java/de/schmitzm/jfree/chart/style/ChartRendererStyle.java 2015-09-02 15:10:58 UTC (rev 2416)
+++ trunk/schmitzm-jfree/src/main/java/de/schmitzm/jfree/chart/style/ChartRendererStyle.java 2015-09-10 09:08:46 UTC (rev 2417)
@@ -324,6 +324,16 @@
}
/**
+ * Returns the color, a series is painted with.
+ * @param seriesKey series key
+ * @return {@code null} if no specific color is set for the series
+ */
+ public Color getSeriesPaint(String seriesKey) {
+ int series = getSeriesIndex(seriesKey);
+ return series >= 0 ? seriesPaint.get(series) : null;
+ }
+
+ /**
* Sets the color, a series is painted with.
* @param series series index
* @param color color for the series (can be {@code null} to reset
@@ -344,6 +354,16 @@
}
/**
+ * Returns the line width, a series is painted with.
+ * @param seriesKey series key
+ * @return {@code null} if no specific width is set for the series
+ */
+ public Integer getSeriesLineWidth(String seriesKey) {
+ int series = getSeriesIndex(seriesKey);
+ return series >= 0 ? seriesWidth.get(series) : null;
+ }
+
+ /**
* Sets the line width, a series is painted with.
* @param series series index
* @param width line width for the series (can be {@code null} to reset
@@ -365,6 +385,17 @@
}
/**
+ * Returns the dash attributes, a series is painted with.
+ * @param seriesKey series key
+ * @return {@code null} if no specific dashing is set for the series
+ * @see BasicStroke
+ */
+ public Float[] getSeriesLineDashAttibutes(String seriesKey) {
+ int series = getSeriesIndex(seriesKey);
+ return series >= 0 ? seriesDashAttr.get(series) : null;
+ }
+
+ /**
* Sets the dash attributes, a series is painted with.
* @param series series index
* @param width dash attributes for the series (can be {@code null} to reset
@@ -487,6 +518,16 @@
}
/**
+ * Returns the style of the series tooltip in the legend.
+ * @param seriesKey series key
+ * @return {@code null} if property is not set for the series
+ */
+ public ChartLabelStyle getSeriesLegendTooltip(String seriesKey) {
+ int series = getSeriesIndex(seriesKey);
+ return series >= 0 ? seriesLegendTooltip.get(series) : null;
+ }
+
+ /**
* Sets the style of the series tooltip in the legend.
* @param series series index
* @param labelStyle the style for the series tooltip in the legend (can be
More information about the Schmitzm-commits
mailing list