org.deegree_impl.graphics.legend
Class LegendElementCollection_Impl

java.lang.Object
  extended byorg.deegree_impl.graphics.legend.LegendElement_Impl
      extended byorg.deegree_impl.graphics.legend.LegendElementCollection_Impl
All Implemented Interfaces:
LegendElement, LegendElementCollection

public class LegendElementCollection_Impl
extends LegendElement_Impl
implements LegendElementCollection

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: 1.7 $ $Date: 2004/06/01 15:55:05 $
Author:
Andreas Poth

Field Summary
(package private)  java.util.ArrayList collection
           
(package private)  java.lang.String title
           
 
Fields inherited from class org.deegree_impl.graphics.legend.LegendElement_Impl
active, bi, bufferBetweenLegendAndLabel, height, label, labelPosition, orientation, ruleslist, width
 
Fields inherited from interface org.deegree.graphics.legend.LegendElement
LP_BOTTOMCENTER, LP_BOTTOMLEFT, LP_BOTTOMRIGHT, LP_LEFT, LP_NOLABEL, LP_RIGHT, LP_TOPCENTER, LP_TOPLEFT, LP_TOPRIGHT
 
Constructor Summary
LegendElementCollection_Impl()
          empty constructor
LegendElementCollection_Impl(java.lang.String title)
          empty constructor
 
Method Summary
 void addLegendElement(LegendElement legendElement)
          adds a LegendElement to the collection.
 java.awt.image.BufferedImage exportAsImage()
          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_impl.graphics.legend.LegendElement_Impl
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
 
Methods inherited from interface org.deegree.graphics.legend.LegendElement
getLabel, getLabelOrientation, getLabelPlacement, setActive, setLabel, setLabelOrientation, setLabelPlacement
 

Field Detail

collection

java.util.ArrayList collection

title

java.lang.String title
Constructor Detail

LegendElementCollection_Impl

public LegendElementCollection_Impl()
empty constructor


LegendElementCollection_Impl

public LegendElementCollection_Impl(java.lang.String title)
empty constructor

Method Detail

addLegendElement

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

Specified by:
addLegendElement in interface LegendElementCollection
Parameters:
legendElement - to add

getLegendElements

public LegendElement[] getLegendElements()
Returns:

setTitle

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

Specified by:
setTitle in interface LegendElementCollection
Parameters:
title - title of the LegendElement

getTitle

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

Specified by:
getTitle in interface LegendElementCollection
Returns:

getSize

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

Specified by:
getSize in interface LegendElementCollection
Returns:
number of legend elements

exportAsImage

public java.awt.image.BufferedImage exportAsImage()
                                           throws LegendException
Description copied from interface: LegendElement
exports the LegendElement as BufferedImage

Specified by:
exportAsImage in interface LegendElement
Overrides:
exportAsImage in class LegendElement_Impl
Returns:
Throws:
LegendException