Author: dan.j.allen
Date: 2008-10-28 17:58:47 -0400 (Tue, 28 Oct 2008)
New Revision: 9458
Modified:
trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
trunk/src/pdf/org/jboss/seam/pdf/ui/UICategoryChartBase.java
Log:
JBSEAM-2463 - useful for disabling border on legend
Modified: trunk/doc/Seam_Reference_Guide/en-US/Itext.xml
===================================================================
--- trunk/doc/Seam_Reference_Guide/en-US/Itext.xml 2008-10-28 19:17:24 UTC (rev 9457)
+++ trunk/doc/Seam_Reference_Guide/en-US/Itext.xml 2008-10-28 21:58:47 UTC (rev 9458)
@@ -1471,6 +1471,12 @@
<listitem>
<para>
+
<literal>legendOutlinePaint</literal>— The color of the border
around
+ the legend.</para>
+ </listitem>
+
+ <listitem>
+ <para>
<literal>orientation</literal>
— The orientation of the plot, either
<code>vertical</code> (the
default) or <code>horizontal</code>. </para>
</listitem>
@@ -1670,6 +1676,12 @@
<listitem>
<para>
+
<literal>legendOutlinePaint</literal>— The color of the border
around
+ the legend.</para>
+ </listitem>
+
+ <listitem>
+ <para>
<literal>orientation</literal>
— The orientation of the plot, either
<code>vertical</code> (the
default) or <code>horizontal</code>. </para>
</listitem>
Modified: trunk/src/pdf/org/jboss/seam/pdf/ui/UICategoryChartBase.java
===================================================================
--- trunk/src/pdf/org/jboss/seam/pdf/ui/UICategoryChartBase.java 2008-10-28 19:17:24 UTC
(rev 9457)
+++ trunk/src/pdf/org/jboss/seam/pdf/ui/UICategoryChartBase.java 2008-10-28 21:58:47 UTC
(rev 9458)
@@ -2,6 +2,7 @@
import javax.faces.context.FacesContext;
+import org.jfree.chart.block.BlockBorder;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.renderer.category.CategoryItemRenderer;
@@ -21,6 +22,7 @@
private String legendBackgroundPaint;
private String legendItemPaint;
+ private String legendOutlinePaint;
private String domainAxisLabel;
private String domainAxisPaint;
@@ -134,6 +136,14 @@
this.legendItemPaint = legendItemPaint;
}
+ public String getLegendOutlinePaint() {
+ return (String) valueBinding("legendOutlinePaint", legendOutlinePaint);
+ }
+
+ public void setLegendOutlinePaint(String legendOutlinePaint) {
+ this.legendOutlinePaint = legendOutlinePaint;
+ }
+
public String getDomainGridlinePaint()
{
return (String) valueBinding("domainGridlinePaint",
domainGridlinePaint);
@@ -229,22 +239,23 @@
titlePaint = (String) values[6];
legendBackgroundPaint = (String) values[7];
legendItemPaint = (String) values[8];
- domainAxisLabel = (String) values[9];
- domainAxisPaint = (String) values[10];
- domainGridlinesVisible = (Boolean) values[11];
- domainGridlinePaint = (String) values[12];
- domainGridlineStroke = (String) values[13];
- rangeAxisLabel = (String) values[14];
- rangeAxisPaint = (String) values[15];
- rangeGridlinesVisible = (Boolean) values[16];
- rangeGridlinePaint = (String) values[17];
- rangeGridlineStroke = (String) values[18];
+ legendOutlinePaint = (String) values[9];
+ domainAxisLabel = (String) values[10];
+ domainAxisPaint = (String) values[11];
+ domainGridlinesVisible = (Boolean) values[12];
+ domainGridlinePaint = (String) values[13];
+ domainGridlineStroke = (String) values[14];
+ rangeAxisLabel = (String) values[15];
+ rangeAxisPaint = (String) values[16];
+ rangeGridlinesVisible = (Boolean) values[17];
+ rangeGridlinePaint = (String) values[18];
+ rangeGridlineStroke = (String) values[19];
}
@Override
public Object saveState(FacesContext context)
{
- Object[] values = new Object[19];
+ Object[] values = new Object[20];
values[0] = super.saveState(context);
values[1] = orientation;
values[2] = legend;
@@ -254,16 +265,17 @@
values[6] = titlePaint;
values[7] = legendBackgroundPaint;
values[8] = legendItemPaint;
- values[9] = domainAxisLabel;
- values[10] = domainAxisPaint;
- values[11] = domainGridlinesVisible;
- values[12] = domainGridlinePaint;
- values[13] = domainGridlineStroke;
- values[14] = rangeAxisLabel;
- values[15] = rangeAxisPaint;
- values[16] = rangeGridlinesVisible;
- values[17] = rangeGridlinePaint;
- values[18] = rangeGridlineStroke;
+ values[9] = legendOutlinePaint;
+ values[10] = domainAxisLabel;
+ values[11] = domainAxisPaint;
+ values[12] = domainGridlinesVisible;
+ values[13] = domainGridlinePaint;
+ values[14] = domainGridlineStroke;
+ values[15] = rangeAxisLabel;
+ values[16] = rangeAxisPaint;
+ values[17] = rangeGridlinesVisible;
+ values[18] = rangeGridlinePaint;
+ values[19] = rangeGridlineStroke;
return values;
}
@@ -379,6 +391,9 @@
{
chartLegend.setBackgroundPaint(findColor(getLegendBackgroundPaint()));
}
+ if (findColor(getLegendOutlinePaint())!= null) {
+ chartLegend.setBorder(new BlockBorder(findColor(getLegendOutlinePaint())));
+ }
if (findColor(getLegendItemPaint()) != null)
{
chartLegend.setItemPaint(findColor(getLegendItemPaint()));
Show replies by date