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

org.deegree.graphics.legend
Class LegendElementCollection

java.lang.Object
  extended by org.deegree.graphics.legend.LegendElement
      extended by org.deegree.graphics.legend.LegendElementCollection

public class LegendElementCollection
extends LegendElement

LegendElementCollection is a collection of LegendElements and is a LegendElement too. It can be used to group elements or to create more complex elements.

Version:
$Revision: 7363 $ $Date: 2007-05-29 20:47:55 +0200 (Di, 29 Mai 2007) $
Author:
Andreas Poth

Field Summary
(package private)  java.util.ArrayList<LegendElement> collection
           
(package private)  java.lang.String title
           
 
Fields inherited from class org.deegree.graphics.legend.LegendElement
active, bi, bufferBetweenLegendAndLabel, height, label, labelPosition, orientation, ruleslist, width
 
Constructor Summary
LegendElementCollection()
          empty constructor
LegendElementCollection(java.lang.String title)
           
 
Method Summary
 void addLegendElement(LegendElement legendElement)
          adds a LegendElement to the collection.
 java.awt.image.BufferedImage exportAsImage(java.lang.String mime)
          exports the LegendElement as BufferedImage
 LegendElement[] getLegendElements()
           
 int getSize()
          returns the number of legend elements as an int
 java.lang.String getTitle()
          returns the title of the LegendElement
 void setTitle(java.lang.String title)
          sets the title of the LegendElement.
 
Methods inherited from class org.deegree.graphics.legend.LegendElement
addRule, calculateFontMetrics, drawLineStringLegend, drawPointLegend, drawPolygonLegend, getBufferBetweenLegendAndLabel, getHeight, getLabel, getLabelOrientation, getLabelPlacement, getRules, getWidth, isActive, setActive, setBufferBetweenLegendAndLabel, setHeight, setLabel, setLabelOrientation, setLabelPlacement, setRules, setWidth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

collection

java.util.ArrayList<LegendElement> collection

title

java.lang.String title
Constructor Detail

LegendElementCollection

public LegendElementCollection()
empty constructor


LegendElementCollection

public LegendElementCollection(java.lang.String title)
Parameters:
title -
Method Detail

addLegendElement

public void addLegendElement(LegendElement legendElement)
adds a LegendElement to the collection.

Parameters:
legendElement - to add

getLegendElements

public LegendElement[] getLegendElements()
Returns:
all legend elements

setTitle

public void setTitle(java.lang.String title)
sets the title of the LegendElement. The title will be displayed on top of the LegendElementCollection

Parameters:
title - title of the LegendElement

getTitle

public java.lang.String getTitle()
returns the title of the LegendElement

Returns:
the title of the LegendElement

getSize

public int getSize()
returns the number of legend elements as an int

Returns:
number of legend elements

exportAsImage

public java.awt.image.BufferedImage exportAsImage(java.lang.String mime)
                                           throws LegendException
Description copied from class: LegendElement
exports the LegendElement as BufferedImage

Overrides:
exportAsImage in class LegendElement
Parameters:
mime - the mime type of the requested legend (like image/png, etc)
Returns:
the legend as image
Throws:
LegendException

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