org.deegree_impl.graphics
Class Theme_Impl

java.lang.Object
  extended byorg.deegree_impl.graphics.Theme_Impl
All Implemented Interfaces:
Theme

class Theme_Impl
extends java.lang.Object
implements Theme

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: 1.17 $ $Date: 2004/03/04 07:36:01 $
Author:
Andreas Poth

Field Summary
private  java.util.ArrayList displayElements
           
private  java.util.List eventController
           
private  java.util.List highlighter
           
private  Layer layer
           
private  java.lang.String name
           
private  MapView parent
          the MapView (map) the theme is associated to
private  java.util.List selector
          this ArrayList contains all DisplayElements (and so the features) that are marked as selected.
private  UserStyle[] styles
           
 
Constructor Summary
(package private) Theme_Impl(java.lang.String name, Layer layer, UserStyle[] styles)
           
 
Method Summary
 void addEventController(ThemeEventController controller)
          adds an eventcontroller to the theme that's reponsible 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 deselecting single DisplayElements or groups of DisplayElements.
 java.util.ArrayList getDisplayElements()
          Returns all DisplayElements that this Theme contains.
 Layer getLayer()
          returns the layer that holds the data of the theme
 java.lang.String getName()
          returns the name of the layer
 UserStyle[] getStyles()
          returns the styles used for this Theme.
 void paint(java.awt.Graphics g)
          renders the layer to the submitted graphic context
 void paint(java.awt.Graphics g, java.lang.String[] ids)
          renders the display elements matching the submitted ids
 void paintHighlighted(java.awt.Graphics g)
          renders the highlighted display elements of the layer
 void paintSelected(java.awt.Graphics g)
          renders the selected display elements of the layer
 void removeEventController(ThemeEventController controller)
           
 void removeHighlighter(Highlighter highlighter)
           
 void removeSelector(Selector selector)
           
 void setDisplayElements(java.util.ArrayList 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
 

Field Detail

name

private java.lang.String name

layer

private Layer layer

styles

private UserStyle[] styles

displayElements

private java.util.ArrayList displayElements

parent

private MapView parent
the MapView (map) the theme is associated to


selector

private java.util.List selector
this ArrayList contains all DisplayElements (and so the features) that are marked as selected.


highlighter

private java.util.List highlighter

eventController

private java.util.List eventController
Constructor Detail

Theme_Impl

Theme_Impl(java.lang.String name,
           Layer layer,
           UserStyle[] styles)
Method Detail

setParent

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

Specified by:
setParent in interface Theme

getName

public java.lang.String getName()
returns the name of the layer

Specified by:
getName in interface Theme

paint

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

Specified by:
paint in interface Theme

paint

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

Specified by:
paint in interface Theme

paintSelected

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

Specified by:
paintSelected in interface Theme

paintHighlighted

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

Specified by:
paintHighlighted in interface Theme

addSelector

public void addSelector(Selector selector)
A selector is a class that offers methods for selecting and deselecting 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.

Specified by:
addSelector in interface Theme

removeSelector

public void removeSelector(Selector selector)
Specified by:
removeSelector in interface Theme
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.

Specified by:
addHighlighter in interface Theme

removeHighlighter

public void removeHighlighter(Highlighter highlighter)
Specified by:
removeHighlighter in interface Theme
See Also:
addHighlighter(Highlighter)

addEventController

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

Specified by:
addEventController in interface Theme

removeEventController

public void removeEventController(ThemeEventController controller)
Specified by:
removeEventController in interface Theme
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.

Specified by:
setStyles in interface Theme

getStyles

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

Specified by:
getStyles in interface Theme

getLayer

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

Specified by:
getLayer in interface Theme

getDisplayElements

public java.util.ArrayList getDisplayElements()
Returns all DisplayElements that this Theme contains.

Specified by:
getDisplayElements in interface Theme
Returns:
ArrayList containing DisplayElements

setDisplayElements

public void setDisplayElements(java.util.ArrayList de)
returns the DisplayElements of the Theme

Specified by:
setDisplayElements in interface Theme