deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.graphics.legend
Class LegendFactory

java.lang.Object
  extended by org.deegree.graphics.legend.LegendFactory

public class LegendFactory
extends java.lang.Object

factory class for creating legend elements/images to be used with WMS GetLegendGraphic request

Version:
$Revision: 18195 $
Author:
$author$

Constructor Summary
LegendFactory()
           
 
Method Summary
 java.awt.image.BufferedImage[] createAllThumbnails(StyledLayerDescriptor sld, int width, int height, java.lang.String mime)
           
 LegendElement createLegendElement(AbstractStyle style, int width, int height, java.lang.String title)
          creates a LegendElement from a SLD Style.
 LegendElement createLegendElement(java.awt.image.BufferedImage legendImage)
          creates a LegendElement using the passed BufferedImage
 LegendElementCollection createLegendElementCollection()
          creates an empty LegendElementCollection
 LegendElementCollection createLegendElementCollection(LegendElement[] legendElements)
          creates a LegendElementCollection and fills it with the passed LegendElements.
 java.lang.String getLabel()
          returns the label set to LegendElement.
protected  java.lang.String getLegendTitle()
           
 void setLabel(java.lang.String label)
          sets the label of the LegendElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LegendFactory

public LegendFactory()
Method Detail

createLegendElement

public LegendElement createLegendElement(java.awt.image.BufferedImage legendImage)
creates a LegendElement using the passed BufferedImage

Parameters:
legendImage - to build the legend from
Returns:
LegendElement

createLegendElement

public LegendElement createLegendElement(AbstractStyle style,
                                         int width,
                                         int height,
                                         java.lang.String title)
                                  throws LegendException
creates a LegendElement from a SLD Style. Depending on the Style the returned LegendElement may is a LegendElementCollection.

Parameters:
style -
width -
height -
title -
Returns:
LegendElement
Throws:
LegendException

createLegendElementCollection

public LegendElementCollection createLegendElementCollection()
creates an empty LegendElementCollection

Returns:
LegendElementCollection

createLegendElementCollection

public LegendElementCollection createLegendElementCollection(LegendElement[] legendElements)
creates a LegendElementCollection and fills it with the passed LegendElements.

Parameters:
legendElements - to fill
Returns:
LegendElementCollection

createAllThumbnails

public java.awt.image.BufferedImage[] createAllThumbnails(StyledLayerDescriptor sld,
                                                          int width,
                                                          int height,
                                                          java.lang.String mime)
                                                   throws LegendException
Parameters:
sld -
width -
height -
mime - of the thumbs
Returns:
an array of thumb nails, which may be empty
Throws:
LegendException

setLabel

public void setLabel(java.lang.String label)
sets the label of the LegendElement

Parameters:
label - label of the LegendElement

getLabel

public java.lang.String getLabel()
returns the label set to LegendElement. If no label is set, the method returns null

Returns:
label of the LegendElement or null

getLegendTitle

protected java.lang.String getLegendTitle()
Returns:
the title of the legend.

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org