|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.graphics.MapView
public class MapView
This interface describes the data model of the map itself. It is built from themes containing
DisplayElement
s to be rendered. Themes can be added and removed. Existing themes can be
re-arragned by changing their order.
Constructor Summary | |
---|---|
protected |
MapView(java.lang.String name,
Envelope boundingbox,
CoordinateSystem crs,
double pixelsize)
|
protected |
MapView(java.lang.String name,
Envelope boundingbox,
double pixelsize)
|
Method Summary | |
---|---|
void |
activateTheme(Theme theme)
activates a theme. |
void |
addEventController(MapEventController obj)
adds an eventcontroller to the MapView that's responsible 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 de-selecting single DisplayElements or groups of DisplayElements. |
void |
addTheme(Theme theme)
adds a theme to the MapView |
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. |
Envelope |
getBoundingBox()
returns the BoundingBox (Envelope) of the MapView. |
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) |
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(Envelope boundingbox)
|
void |
setCoordinateSystem(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 |
Constructor Detail |
---|
protected MapView(java.lang.String name, Envelope boundingbox, double pixelsize) throws UnknownCRSException
name
- boundingbox
- pixelsize
-
UnknownCRSException
protected MapView(java.lang.String name, Envelope boundingbox, CoordinateSystem crs, double pixelsize)
name
- boundingbox
- crs
- pixelsize
- Method Detail |
---|
public java.lang.String getName()
public Theme getTheme(java.lang.String name)
name
- of the theme to get
null
if not found.public Theme getTheme(int index)
index
- of the theme
null
if the given index has no theme.public Theme[] getAllThemes()
public double getScale()
public double getScale(java.awt.Graphics g)
g
- the graphics to calculate the scale from
public void addTheme(Theme theme) throws java.lang.Exception
theme
- to add
java.lang.Exception
- if the coordinate system of the theme could not be set to the layer.public void removeTheme(Theme theme)
theme
- to removepublic void removeTheme(java.lang.String name)
name
- to of the theme to be removed.public void removeTheme(int index)
index
- of the theme to be removedpublic void clear()
public void swapThemes(Theme first, Theme second)
first
- will be secondsecond
- will be first.public void moveUp(Theme theme)
theme
- to move uppublic void moveDown(Theme theme)
theme
- to move downpublic void enableTheme(Theme theme, boolean enable)
theme
- to be dis/en-abledenable
- true if enabledpublic boolean isThemeEnabled(Theme theme)
theme
- to check
public void activateTheme(Theme theme)
theme
- to activatepublic boolean isThemeActivated(Theme theme)
theme
- to check
public int getSize()
public void addEventController(MapEventController obj)
obj
- event controller to addpublic void removeEventController(MapEventController obj)
obj
- event controller to be removedaddEventController(MapEventController)
public void addSelector(Selector obj)
obj
- selector to added to all themespublic void removeSelector(Selector obj)
obj
- selector to be removedaddSelector(Selector)
public Envelope getBoundingBox()
public void setBoundingBox(Envelope boundingbox)
boundingbox
- to set.this method may be used for zooming and
panning the map
public CoordinateSystem getCoordinatesSystem()
public void setCoordinateSystem(CoordinateSystem crs) throws java.lang.Exception
crs
- to be set
java.lang.Exception
- if the crs could not be set to the layers of the themespublic void paint(java.awt.Graphics g) throws RenderException
g
-
RenderException
- thrown if the passed Graphic haven't
clipbounds. use g.setClip( .. );public void paintSelected(java.awt.Graphics g) throws RenderException
g
- 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
g
- graphic context to render the map too
RenderException
- thrown if the passed Graphic haven't
clipbounds. use g.setClip( .. );public void addHighlighter(Highlighter highlighter)
highlighter
- to added to all themespublic void removeHighlighter(Highlighter highlighter)
highlighter
- to be removed from all themesaddHighlighter(Highlighter)
public GeoTransform getProjection()
public void addOptimizer(Optimizer optimizer)
optimizer
- public Optimizer[] getOptimizers()
public void setOptimizers(Optimizer[] optimizers)
optimizers
-
|
deegree 2.5 (2011/06/29 09:44 build-8-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org