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

org.deegree.graphics
Class Theme

java.lang.Object
  extended by org.deegree.graphics.Theme

public class Theme
extends Object

A Theme is for usual a homogenious collection of Features coupled with a portrayal model for their graphical representation. Considering the OGC Styled Layer Descriptor specification this is not nessecary the case. In confirmation with the SLD a theme can be build from a lot of thematic completly different feature types.

From a theoretical point of view this isn't very satisfying. But it will be supported by the Theme class.

Assigned to the Theme are:

Version:
$Revision: 19921 $, $Date: 2009-10-02 11:20:56 +0200 (Fr, 02. Okt 2009) $
Author:
Andreas Poth, last edited by: $Author: apoth $

Constructor Summary
protected Theme(String name, Layer layer, UserStyle[] styles)
           
 
Method Summary
 void addEventController(ThemeEventController controller)
          adds an eventcontroller to the theme that's responsible for handling events that targets the theme.
 void addHighlighter(Highlighter highlighter)
          A Highlighter is a class that is responsible for managing the highlight capabilities for one or more Themes.
 void addSelector(Selector selector)
          A selector is a class that offers methods for selecting and de-selecting single DisplayElements or groups of DisplayElements.
 List<DisplayElement> getDisplayElements()
          Returns all DisplayElements that this Theme contains.
 Layer getLayer()
          returns the layer that holds the data of the theme
 String getName()
          returns the name of the theme
 UserStyle[] getStyles()
          returns the styles used for this Theme.
 void paint(Graphics g)
          renders the layer to the submitted graphic context
 void paint(Graphics g, String[] ids)
          renders the display elements matching the submitted ids
 void paintHighlighted(Graphics g)
          renders the highlighted display elements of the layer
 void paintSelected(Graphics g)
          renders the selected display elements of the layer
 void removeEventController(ThemeEventController controller)
           
 void removeHighlighter(Highlighter highlighter)
           
 void removeSelector(Selector selector)
           
 void setDisplayElements(List<DisplayElement> de)
          returns the DisplayElements of the Theme
 void setParent(MapView parent)
          sets the parent MapView of the Theme.
 void setStyles(UserStyle[] styles)
          Sets the styles used for this Theme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Theme

protected Theme(String name,
                Layer layer,
                UserStyle[] styles)
Parameters:
name -
layer -
styles -
Method Detail

setParent

public void setParent(MapView parent)
sets the parent MapView of the Theme.

Parameters:
parent - of this theme

getName

public String getName()
returns the name of the theme

Returns:
the name of the theme

paint

public void paint(Graphics g)
renders the layer to the submitted graphic context

Parameters:
g - to draw upon

paint

public void paint(Graphics g,
                  String[] ids)
renders the display elements matching the submitted ids

Parameters:
g - to draw upon
ids - of the id's to render

paintSelected

public void paintSelected(Graphics g)
renders the selected display elements of the layer

Parameters:
g - to draw upon

paintHighlighted

public void paintHighlighted(Graphics g)
renders the highlighted display elements of the layer

Parameters:
g - to draw upon

addSelector

public void addSelector(Selector selector)
A selector is a class that offers methods for selecting and de-selecting single DisplayElements or groups of DisplayElements. A selector may offers methods like 'select all DisplayElements within a specified bounding box' or 'select all DisplayElements thats area is larger than 120 km' etc.

Parameters:
selector - to which this theme will be added and vice versa

removeSelector

public void removeSelector(Selector selector)
Parameters:
selector - to remove this theme from (and viceversa)
See Also:
addSelector(Selector)

addHighlighter

public void addHighlighter(Highlighter highlighter)
A Highlighter is a class that is responsible for managing the highlight capabilities for one or more Themes.

Parameters:
highlighter - to add this theme to, and vice-versa

removeHighlighter

public void removeHighlighter(Highlighter highlighter)
Parameters:
highlighter - to remove this theme from and vice-versa
See Also:
addHighlighter(Highlighter)

addEventController

public void addEventController(ThemeEventController controller)
adds an eventcontroller to the theme that's responsible for handling events that targets the theme.

Parameters:
controller - to add this theme to, and vice-versa

removeEventController

public void removeEventController(ThemeEventController controller)
Parameters:
controller - to remove this theme from and vice-versa
See Also:
addEventController(ThemeEventController)

setStyles

public void setStyles(UserStyle[] styles)
Sets the styles used for this Theme. If this method will be called all DisplayElements will be recreated to consider the new style definitions.

Parameters:
styles - the style to set to this theme

getStyles

public UserStyle[] getStyles()
returns the styles used for this Theme.

Returns:
the styles used for this Theme.

getLayer

public Layer getLayer()
returns the layer that holds the data of the theme

Returns:
the layer that holds the data of the theme

getDisplayElements

public List<DisplayElement> getDisplayElements()
Returns all DisplayElements that this Theme contains.

Returns:
ArrayList containing DisplayElements

setDisplayElements

public void setDisplayElements(List<DisplayElement> de)
returns the DisplayElements of the Theme

Parameters:
de - to set to this theme.

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