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

org.deegree.graphics.displayelements
Class AbstractDisplayElement

java.lang.Object
  extended by org.deegree.graphics.displayelements.AbstractDisplayElement
All Implemented Interfaces:
Serializable, DisplayElement
Direct Known Subclasses:
GeometryDisplayElement, RasterDisplayElement

abstract class AbstractDisplayElement
extends Object
implements DisplayElement, Serializable

Base class for all display elements.

A DisplayElement is associated to one feature that may have a geometry property or not (this is the common case).

Version:
$Revision: 18195 $, $Date: 2009-06-18 17:55:39 +0200 (Do, 18. Jun 2009) $
Author:
Andreas Poth, Markus Schneider, last edited by: $Author: mschneider $

Field Summary
protected  Feature feature
          The feature to display
 
Constructor Summary
AbstractDisplayElement()
          An empty constructor doing nothing
AbstractDisplayElement(Feature feature)
           
 
Method Summary
abstract  boolean doesScaleConstraintApply(double scale)
          Returns whether the DisplayElement should be painted at the current scale or not.
 String getAssociateFeatureId()
          returns the id of the feature that's associated with the DisplayElement
 Feature getFeature()
          Returns the associated Feature.
 boolean isHighlighted()
          returns if the DisplayElement is highlighted or not.
 boolean isSelected()
          returns if the DisplayElement is selected or not
 void setFeature(Feature feature)
          sets the feature encapsulated by a DisplayElement
 void setHighlighted(boolean highlighted)
          marks the DisplayElement as highlighted or not
 void setSelected(boolean selected)
          marks a DisplayElement as selected or not
 
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

feature

protected Feature feature
The feature to display

Constructor Detail

AbstractDisplayElement

AbstractDisplayElement()
An empty constructor doing nothing


AbstractDisplayElement

AbstractDisplayElement(Feature feature)
Parameters:
feature -
Method Detail

getFeature

public Feature getFeature()
Returns the associated Feature.

Specified by:
getFeature in interface DisplayElement
Returns:
the associated feature

setFeature

public void setFeature(Feature feature)
sets the feature encapsulated by a DisplayElement

Specified by:
setFeature in interface DisplayElement
Parameters:
feature -

getAssociateFeatureId

public String getAssociateFeatureId()
returns the id of the feature that's associated with the DisplayElement

Specified by:
getAssociateFeatureId in interface DisplayElement
Returns:
the associated feature's id

setSelected

public void setSelected(boolean selected)
marks a DisplayElement as selected or not

Specified by:
setSelected in interface DisplayElement
Parameters:
selected - true, if the DisplayElement is selected, false otherwise

isSelected

public boolean isSelected()
returns if the DisplayElement is selected or not

Specified by:
isSelected in interface DisplayElement
Returns:
true, if the DisplayElement is selected, false otherwise

setHighlighted

public void setHighlighted(boolean highlighted)
marks the DisplayElement as highlighted or not

Specified by:
setHighlighted in interface DisplayElement
Parameters:
highlighted - true, if the DisplayElement is highlighted, false otherwise

isHighlighted

public boolean isHighlighted()
returns if the DisplayElement is highlighted or not.

Specified by:
isHighlighted in interface DisplayElement
Returns:
true, if the DisplayElement is highlighted, false otherwise

doesScaleConstraintApply

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

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

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