|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.deegree_impl.graphics.MapView_Impl
This interface describes the data modell of the map it self. It is build from themes containing DisplayElements to be rendered. Themes can be added and removed. Existing themes can be re-arragned by changing their order.
------------------------------------------------------------------------
| Field Summary | |
private Theme |
activatedTh
|
private GM_Envelope |
boundingbox
|
private CS_CoordinateSystem |
crs
|
private java.util.HashMap |
enabled
|
private java.util.List |
eventCntr
|
private java.lang.String |
name
|
private java.util.ArrayList |
optimizers
|
private GeoTransform |
projection
|
private double |
scale
|
private java.util.HashMap |
themes
|
private java.util.ArrayList |
themesL
|
| Constructor Summary | |
(package private) |
MapView_Impl(java.lang.String name,
GM_Envelope boundingbox)
|
(package private) |
MapView_Impl(java.lang.String name,
GM_Envelope boundingbox,
CS_CoordinateSystem crs)
|
| Method Summary | |
void |
activateTheme(Theme theme)
activates a theme. |
void |
addEventController(MapEventController obj)
adds an eventcontroller to the MapView that's reponsible for handling events that targets the map. |
void |
addHighlighter(Highlighter highlighter)
A Highlighter is a class that is responsible for managing the highlight capabilities for one or more Themes. |
void |
addOptimizer(Optimizer optimizer)
Adds an Optimizer. |
void |
addSelector(Selector obj)
A selector is a class that offers methods for selecting and deselecting single DisplayElements or groups of DisplayElements. |
void |
addTheme(Theme theme)
adds a theme to the MapView |
private double |
calcDistance(double lon1,
double lat1,
double lon2,
double lat2)
calculates the distance in meters between two points in EPSG:4326 coodinates . |
private double |
calcScale(int mapWidth,
int mapHeight)
calculates the map scale (denominator) as defined in the OGC SLD 1.0.0 specification |
void |
clear()
removes all themes from the MapView. |
void |
enableTheme(Theme theme,
boolean enable)
enables or disables a theme that is part of the MapView. |
Theme[] |
getAllThemes()
returns the Themes in correct order. |
GM_Envelope |
getBoundingBox()
returns the BoundingBox (Envelope) of the MapView. |
CS_CoordinateSystem |
getCoordinatesSystem()
returns the coordinate reference system of the MapView |
java.lang.String |
getName()
returns the name of the map |
Optimizer[] |
getOptimizers()
Returns the Optimizers. |
GeoTransform |
getProjection()
Returns the GeoTransform that is associated to this MapView. |
double |
getScale()
Returns the current scale of the MapView. |
double |
getScale(java.awt.Graphics g)
Returns the current scale of the MapView. |
int |
getSize()
returns the amount of themes within the MapView. |
Theme |
getTheme(int index)
returns the Theme that matches the submitted index |
Theme |
getTheme(java.lang.String name)
returns the Theme that matches the submitted name |
boolean |
isThemeActivated(Theme theme)
returns true if the passed theme is the one that is set to be activated |
boolean |
isThemeEnabled(Theme theme)
returns true if the passed theme is set to be enabled |
void |
moveDown(Theme theme)
move a theme down for one index position (index = oldindex - 1) |
void |
moveUp(Theme theme)
move a theme up for one index position (index = oldindex + 1) |
private void |
optimize(java.awt.Graphics g)
Calls all registered Optimizer subsequently. |
void |
paint(java.awt.Graphics g)
renders the map to the passed graphic context |
void |
paintHighlighted(java.awt.Graphics g)
renders the features marked as highlighted of all themes contained within the MapView |
void |
paintSelected(java.awt.Graphics g)
renders the features marked as selected of all themes contained within the MapView |
void |
removeEventController(MapEventController obj)
|
void |
removeHighlighter(Highlighter highlighter)
|
void |
removeSelector(Selector obj)
|
void |
removeTheme(int index)
removes the theme that matches the submitted index from the MapView |
void |
removeTheme(java.lang.String name)
removes the theme that matches the submitted name from the MapView |
void |
removeTheme(Theme theme)
removes a theme from the MapView |
void |
setBoundingBox(GM_Envelope boundingbox)
|
void |
setCoordinateSystem(CS_CoordinateSystem crs)
sets the coordinate reference system of the map; |
void |
setOptimizers(Optimizer[] optimizers)
Sets the Optimizers. |
void |
swapThemes(Theme first,
Theme second)
swaps the positions of the submitted themes |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.lang.String name
private java.util.HashMap themes
private java.util.HashMap enabled
private java.util.ArrayList themesL
private Theme activatedTh
private GM_Envelope boundingbox
private CS_CoordinateSystem crs
private java.util.List eventCntr
private double scale
private GeoTransform projection
private java.util.ArrayList optimizers
| Constructor Detail |
MapView_Impl(java.lang.String name,
GM_Envelope boundingbox)
MapView_Impl(java.lang.String name,
GM_Envelope boundingbox,
CS_CoordinateSystem crs)
| Method Detail |
public java.lang.String getName()
getName in interface MapViewpublic Theme getTheme(java.lang.String name)
getTheme in interface MapViewpublic Theme getTheme(int index)
getTheme in interface MapViewpublic Theme[] getAllThemes()
getAllThemes in interface MapViewpublic double getScale()
getScale in interface MapViewpublic double getScale(java.awt.Graphics g)
getScale in interface MapView
public void addTheme(Theme theme)
throws java.lang.Exception
addTheme in interface MapViewjava.lang.Exceptionpublic void removeTheme(Theme theme)
removeTheme in interface MapViewpublic void removeTheme(java.lang.String name)
removeTheme in interface MapViewpublic void removeTheme(int index)
removeTheme in interface MapViewpublic void clear()
clear in interface MapView
public void swapThemes(Theme first,
Theme second)
swapThemes in interface MapViewpublic void moveUp(Theme theme)
moveUp in interface MapViewpublic void moveDown(Theme theme)
moveDown in interface MapView
public void enableTheme(Theme theme,
boolean enable)
enableTheme in interface MapViewpublic boolean isThemeEnabled(Theme theme)
isThemeEnabled in interface MapViewpublic void activateTheme(Theme theme)
activateTheme in interface MapViewpublic boolean isThemeActivated(Theme theme)
isThemeActivated in interface MapViewpublic int getSize()
getSize in interface MapViewpublic void addEventController(MapEventController obj)
addEventController in interface MapViewpublic void removeEventController(MapEventController obj)
removeEventController in interface MapViewaddEventController(MapEventController)public void addSelector(Selector obj)
addSelector in interface MapViewpublic void removeSelector(Selector obj)
removeSelector in interface MapViewaddSelector(Selector)public GM_Envelope getBoundingBox()
getBoundingBox in interface MapViewpublic void setBoundingBox(GM_Envelope boundingbox)
setBoundingBox in interface MapViewthis method may be used for zooming and panning the mappublic CS_CoordinateSystem getCoordinatesSystem()
getCoordinatesSystem in interface MapView
public void setCoordinateSystem(CS_CoordinateSystem crs)
throws java.lang.Exception
setCoordinateSystem in interface MapViewjava.lang.Exception
public void paint(java.awt.Graphics g)
throws RenderException
paint in interface MapViewg -
RenderException - thrown if the passed Graphic haven't
clipbounds. use g.setClip( .. );
public void paintSelected(java.awt.Graphics g)
throws RenderException
paintSelected in interface MapViewg - graphic context to render the map too
RenderException - thrown if the passed Graphic haven't
clipbounds. use g.setClip( .. );
public void paintHighlighted(java.awt.Graphics g)
throws RenderException
paintHighlighted in interface MapViewg - graphic context to render the map too
RenderException - thrown if the passed Graphic haven't
clipbounds. use g.setClip( .. );public void addHighlighter(Highlighter highlighter)
addHighlighter in interface MapViewpublic void removeHighlighter(Highlighter highlighter)
removeHighlighter in interface MapViewaddHighlighter(Highlighter)
private double calcScale(int mapWidth,
int mapHeight)
private double calcDistance(double lon1,
double lat1,
double lon2,
double lat2)
public GeoTransform getProjection()
getProjection in interface MapViewprivate void optimize(java.awt.Graphics g)
g - public void addOptimizer(Optimizer optimizer)
addOptimizer in interface MapViewoptimizer - public Optimizer[] getOptimizers()
getOptimizers in interface MapViewpublic void setOptimizers(Optimizer[] optimizers)
setOptimizers in interface MapViewoptimizers -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||