25 |
* |
* |
26 |
* Contributors: |
* Contributors: |
27 |
* Martin O. J. Schmitz - initial API and implementation |
* Martin O. J. Schmitz - initial API and implementation |
28 |
* Stefan A. Krüger - additional utility classes |
* Stefan A. Tzeggai - additional utility classes |
29 |
******************************************************************************/ |
******************************************************************************/ |
30 |
/** |
/** |
31 |
Copyright 2008 Stefan Alfons Krüger and parts from some Geotools code |
Copyright 2008 Stefan Alfons Tzeggai and parts from some Geotools code |
32 |
|
|
33 |
atlas-framework - This file is part of the Atlas Framework |
atlas-framework - This file is part of the Atlas Framework |
34 |
|
|
92 |
* returns {@code null} even though the attribut is not nillable.</li> |
* returns {@code null} even though the attribut is not nillable.</li> |
93 |
* </ul> |
* </ul> |
94 |
* |
* |
95 |
* @author Stefan Alfons Krüger |
* @author Stefan Alfons Tzeggai |
96 |
*/ |
*/ |
97 |
public class LegendIconFeatureRenderer extends DefaultTreeCellRenderer { |
public class LegendIconFeatureRenderer extends DefaultTreeCellRenderer { |
98 |
// private static final Dimension SIZE = new Dimension(30,20); |
// private static final Dimension SIZE = new Dimension(30,20); |
262 |
|
|
263 |
if (bg != null) { |
if (bg != null) { |
264 |
// **************************************************************************** |
// **************************************************************************** |
265 |
// The following lines define the backgroup color for the rendered |
// The following lines define the background color for the rendered |
266 |
// images |
// images |
267 |
// **************************************************************************** |
// **************************************************************************** |
268 |
graphics.setBackground(bg); |
graphics.setBackground(bg); |
273 |
// Enable anti-aliasing for the legend symbols |
// Enable anti-aliasing for the legend symbols |
274 |
graphics.setRenderingHints(getHints()); |
graphics.setRenderingHints(getHints()); |
275 |
|
|
|
// TODO scaleDenominator = 100000000000000000000000000000d; Was ist das |
|
|
// fuer ein Quatsch? |
|
276 |
final NumberRange<Integer> scaleRange = NumberRange.create(Integer.MAX_VALUE,Integer.MAX_VALUE); |
final NumberRange<Integer> scaleRange = NumberRange.create(Integer.MAX_VALUE,Integer.MAX_VALUE); |
277 |
|
|
278 |
try { |
try { |
281 |
Symbolizer symbolizer = symbolizers[sIdx]; |
Symbolizer symbolizer = symbolizers[sIdx]; |
282 |
|
|
283 |
if (symbolizer instanceof TextSymbolizer) { |
if (symbolizer instanceof TextSymbolizer) { |
|
LOGGER |
|
|
.warn("createImageForRule for a TextSymbolizer. Sure we want that?"); |
|
284 |
continue; |
continue; |
285 |
} |
} |
286 |
|
|
319 |
* |
* |
320 |
* @param hints |
* @param hints |
321 |
* @author <a href="mailto:[email protected]">Stefan Alfons |
* @author <a href="mailto:[email protected]">Stefan Alfons |
322 |
* Krüger</a> |
* Tzeggai</a> |
323 |
*/ |
*/ |
324 |
public void setHints(Hints hints) { |
public void setHints(Hints hints) { |
325 |
getHints().add(hints); |
getHints().add(hints); |