deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.graphics.legend
Class LegendFactory

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

public class LegendFactory
extends 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
 BufferedImage[] createAllThumbnails(StyledLayerDescriptor sld, int width, int height, String mime)
           
 LegendElement createLegendElement(AbstractStyle style, int width, int height, String title)
          creates a LegendElement from a SLD Style.
 LegendElement createLegendElement(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.
 String getLabel()
          returns the label set to LegendElement.
protected  String getLegendTitle()
           
 void setLabel(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(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,
                                         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 BufferedImage[] createAllThumbnails(StyledLayerDescriptor sld,
                                           int width,
                                           int height,
                                           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(String label)
sets the label of the LegendElement

Parameters:
label - label of the LegendElement

getLabel

public 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 String getLegendTitle()
Returns:
the title of the legend.

deegree 2.3 (2010/04/09 10:10 build-4-official)

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