org.deegree_impl.graphics.legend
Class LegendFactory

java.lang.Object
  extended byorg.deegree_impl.graphics.legend.LegendFactory

public class LegendFactory
extends java.lang.Object

Version:
$Revision: 1.15 $
Author:
$author$

Field Summary
private  java.lang.String label
           
private  java.lang.String legendtitle
           
private  java.lang.String legendtitlefilterproperty
           
 
Constructor Summary
LegendFactory()
           
 
Method Summary
 java.awt.image.BufferedImage[] createAllThumbnails(StyledLayerDescriptor sld, int width, int height)
           
 LegendElement createLegendElement(java.awt.image.BufferedImage legendImage)
          creates a LegendElement using the passed BufferedImage
 LegendElement createLegendElement(Style style, int width, int height, java.lang.String title)
          creates a LegendElement from a SLD Style.
 LegendElementCollection createLegendElementCollection()
          creates an empty LegendElementCollection
 LegendElementCollection createLegendElementCollection(LegendElement[] legendElements)
          creates a LegendElementCollection and fills it with the passed LegendElements.
static LegendView createLegendView(LegendElementCollection[] collection)
           
 java.lang.String getLabel()
          returns the label set to LegendElement.
protected  java.lang.String getLegendTitle()
           
private  java.lang.String getOperationString(int operationID)
           
private  java.lang.String getPropertyNameFromFilter(Filter filter)
          gets the property-names for creating the legend text
private  java.lang.String getPropertyNameFromOperation(Operation operation)
           
 void setLabel(java.lang.String label)
          sets the label of the LegendElement
private  void setLegendTitle(java.lang.String string)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

label

private java.lang.String label

legendtitle

private java.lang.String legendtitle

legendtitlefilterproperty

private java.lang.String legendtitlefilterproperty
Constructor Detail

LegendFactory

public LegendFactory()
Method Detail

createLegendElement

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

Returns:
LegendElement

createLegendElement

public LegendElement createLegendElement(Style 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.

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.

Returns:
LegendElementCollection

createLegendView

public static LegendView createLegendView(LegendElementCollection[] collection)
Returns:

createAllThumbnails

public java.awt.image.BufferedImage[] createAllThumbnails(StyledLayerDescriptor sld,
                                                          int width,
                                                          int height)
                                                   throws LegendException
Parameters:
sld -
width -
height -
Returns:
Throws:
LegendException

getPropertyNameFromFilter

private java.lang.String getPropertyNameFromFilter(Filter filter)
                                            throws LegendException
gets the property-names for creating the legend text

Throws:
LegendException

getPropertyNameFromOperation

private java.lang.String getPropertyNameFromOperation(Operation operation)
                                               throws LegendException
Parameters:
operation -
Returns:
Throws:
LegendException

getOperationString

private java.lang.String getOperationString(int operationID)
Parameters:
operationID -
Returns:

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:

setLegendTitle

private void setLegendTitle(java.lang.String string)
Parameters:
string -