deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.graphics.displayelements
Class GeometryDisplayElement

java.lang.Object
  extended by org.deegree.graphics.displayelements.AbstractDisplayElement
      extended by org.deegree.graphics.displayelements.GeometryDisplayElement
All Implemented Interfaces:
Serializable, DisplayElement
Direct Known Subclasses:
LabelDisplayElement, LineStringDisplayElement, LocalizedDisplayElement, PointDisplayElement, PolygonDisplayElement

abstract class GeometryDisplayElement
extends AbstractDisplayElement
implements Serializable

Basic interface of all display elements that are related to a geometry (this is the common case).

Version:
$Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
Author:
Andreas Poth, last edited by: $Author: bezema $

Field Summary
protected  Geometry geometry
           
protected  Symbolizer highlightSymbolizer
           
protected  Object placement
           
protected  Symbolizer selectedSymbolizer
           
protected  Symbolizer symbolizer
           
 
Fields inherited from class org.deegree.graphics.displayelements.AbstractDisplayElement
feature
 
Constructor Summary
GeometryDisplayElement(Feature feature, Geometry geometry)
          Creates a new GeometryDisplayElement object.
GeometryDisplayElement(Feature feature, Geometry geometry, Symbolizer symbolizer)
          Creates a new GeometryDisplayElement object.
GeometryDisplayElement(Feature feature, Geometry geometry, Symbolizer symbolizer, Symbolizer highlightSymbolizer, Symbolizer selectedSymbolizer)
          Creates a new GeometryDisplayElement object.
 
Method Summary
 boolean doesScaleConstraintApply(double scale)
          Returns if the DisplayElement should be painted at the current scale or not.
 Geometry getGeometry()
          returns the geometry that determines the position the DisplayElement will be rendered to
 Symbolizer getHighlightSymbolizer()
          returns the symbolizer that determines how the geometry will be rendered if it's highlighted
 Symbolizer getSelectedSymbolizer()
          returns the symbolizer that determines how the geometry will be rendered if it's selected
 Symbolizer getSymbolizer()
          Returns the symbolizer that determines how the geometry will be rendered.
 void setGeometry(Geometry geometry)
          sets the geometry that determines the position the DisplayElement will be rendered to
 void setHighlightSymbolizer(Symbolizer rule)
          sets the rule that determines how the geometry will be rendered when it's highlighted
 void setPlacement(Object o)
          Overwrites the default placement of the DisplayElement.
 void setSelectedSymbolizer(Symbolizer rule)
          sets the rule that determines how the geometry will be rendered when it's selected
 void setSymbolizer(Symbolizer symbolizer)
          sets the rules that determines how the geometry will be rendered
 
Methods inherited from class org.deegree.graphics.displayelements.AbstractDisplayElement
getAssociateFeatureId, getFeature, isHighlighted, isSelected, setFeature, setHighlighted, setSelected
 
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.displayelements.DisplayElement
paint
 

Field Detail

geometry

protected Geometry geometry

symbolizer

protected Symbolizer symbolizer

highlightSymbolizer

protected Symbolizer highlightSymbolizer

selectedSymbolizer

protected Symbolizer selectedSymbolizer

placement

protected Object placement
Constructor Detail

GeometryDisplayElement

GeometryDisplayElement(Feature feature,
                       Geometry geometry)
Creates a new GeometryDisplayElement object.

Parameters:
feature -
geometry -

GeometryDisplayElement

GeometryDisplayElement(Feature feature,
                       Geometry geometry,
                       Symbolizer symbolizer)
Creates a new GeometryDisplayElement object.

Parameters:
feature -
geometry -
symbolizer -

GeometryDisplayElement

GeometryDisplayElement(Feature feature,
                       Geometry geometry,
                       Symbolizer symbolizer,
                       Symbolizer highlightSymbolizer,
                       Symbolizer selectedSymbolizer)
Creates a new GeometryDisplayElement object.

Parameters:
feature -
geometry -
symbolizer -
selectedSymbolizer -
highlightSymbolizer -
Method Detail

setPlacement

public void setPlacement(Object o)
Overwrites the default placement of the DisplayElement. This method is used by the PlacementOptimizer to minimize the overlapping of labels, for example.

Parameters:
o - the placement to be used

setGeometry

public void setGeometry(Geometry geometry)
sets the geometry that determines the position the DisplayElement will be rendered to


getGeometry

public Geometry getGeometry()
returns the geometry that determines the position the DisplayElement will be rendered to


setSymbolizer

public void setSymbolizer(Symbolizer symbolizer)
sets the rules that determines how the geometry will be rendered


getSymbolizer

public Symbolizer getSymbolizer()
Returns the symbolizer that determines how the geometry will be rendered.


setHighlightSymbolizer

public void setHighlightSymbolizer(Symbolizer rule)
sets the rule that determines how the geometry will be rendered when it's highlighted

Parameters:
rule - symbolizer defining rendering style

getHighlightSymbolizer

public Symbolizer getHighlightSymbolizer()
returns the symbolizer that determines how the geometry will be rendered if it's highlighted


setSelectedSymbolizer

public void setSelectedSymbolizer(Symbolizer rule)
sets the rule that determines how the geometry will be rendered when it's selected

Parameters:
rule - symbolizer defining rendering style

getSelectedSymbolizer

public Symbolizer getSelectedSymbolizer()
returns the symbolizer that determines how the geometry will be rendered if it's selected


doesScaleConstraintApply

public boolean doesScaleConstraintApply(double scale)
Returns if the DisplayElement should be painted at the current scale or not.

Specified by:
doesScaleConstraintApply in interface DisplayElement
Specified by:
doesScaleConstraintApply in class AbstractDisplayElement
Parameters:
scale - scale to check
Returns:
true, if the DisplayElement has to be painted, false otherwise

deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net