Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/exports/sq/SQOverviewGenerator.java @ 3425:7babd4e92c8b
Disabled legends in SQ relation overview generator.
flys-artifacts/trunk@5080 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 20 Jul 2012 07:50:08 +0000 |
parents | 3fc5c914b1c1 |
children |
comparison
equal
deleted
inserted
replaced
3424:3fc5c914b1c1 | 3425:7babd4e92c8b |
---|---|
56 /** | 56 /** |
57 * Produce output. | 57 * Produce output. |
58 * @param artifactAndFacet current facet and artifact. | 58 * @param artifactAndFacet current facet and artifact. |
59 * @param attr theme for facet | 59 * @param attr theme for facet |
60 */ | 60 */ |
61 @Override | |
61 public void doOut( | 62 public void doOut( |
62 ArtifactAndFacet artifactAndFacet, | 63 ArtifactAndFacet artifactAndFacet, |
63 Document attr, | 64 Document attr, |
64 boolean visible | 65 boolean visible |
65 ) { | 66 ) { |
85 try { | 86 try { |
86 Document cAttr = getAttribute(context, collectionAttribute, name); | 87 Document cAttr = getAttribute(context, collectionAttribute, name); |
87 g.init(request, out, context); | 88 g.init(request, out, context); |
88 | 89 |
89 helper.doOut(g, name, name, cAttr, context); | 90 helper.doOut(g, name, name, cAttr, context); |
90 charts.add(g.generateChart()); | 91 JFreeChart chart = g.generateChart(); |
92 chart.removeLegend(); | |
93 charts.add(chart); | |
91 } | 94 } |
92 catch (IOException e) { | 95 catch (IOException e) { |
93 logger.warn(e); | 96 logger.warn(e); |
94 } | 97 } |
95 catch (ArtifactDatabaseException e) { | 98 catch (ArtifactDatabaseException e) { |
96 logger.warn(e); | 99 logger.warn(e); |
97 } | 100 } |
98 } | 101 } |
99 } | 102 } |
100 | 103 |
104 @Override | |
101 public void init(Document request, OutputStream out, CallContext context) { | 105 public void init(Document request, OutputStream out, CallContext context) { |
102 this.request = request; | 106 this.request = request; |
103 this.out = out; | 107 this.out = out; |
104 this.context = context; | 108 this.context = context; |
105 charts = new ArrayList<JFreeChart>(); | 109 charts = new ArrayList<JFreeChart>(); |
106 } | 110 } |
107 | 111 |
112 @Override | |
108 public void setMasterArtifact(Artifact master) { | 113 public void setMasterArtifact(Artifact master) { |
109 this.master = master; | 114 this.master = master; |
110 } | 115 } |
111 | 116 |
117 @Override | |
112 public void setCollection(FLYSArtifactCollection collection) { | 118 public void setCollection(FLYSArtifactCollection collection) { |
113 this.collection = collection; | 119 this.collection = collection; |
114 } | 120 } |
115 | 121 |
122 @Override | |
116 public void generate() throws IOException { | 123 public void generate() throws IOException { |
117 logger.debug("SQOverviewGenerator.generate"); | 124 logger.debug("SQOverviewGenerator.generate"); |
118 | 125 |
119 int[] size = getSize(); | 126 int[] size = getSize(); |
120 | 127 |
140 result.createGraphics().drawImage(img, horPos, vertPos, null); | 147 result.createGraphics().drawImage(img, horPos, vertPos, null); |
141 } | 148 } |
142 ImageIO.write(result, "png", out); | 149 ImageIO.write(result, "png", out); |
143 } | 150 } |
144 | 151 |
152 @Override | |
145 public void setSettings(Settings settings) { | 153 public void setSettings(Settings settings) { |
146 this.settings = settings; | 154 this.settings = settings; |
147 } | 155 } |
148 | 156 |
157 @Override | |
149 public Settings getSettings() { | 158 public Settings getSettings() { |
150 return this.settings; | 159 return this.settings; |
151 } | 160 } |
152 | 161 |
153 | 162 |