|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAbstractRenderingStrategy
public abstract class AbstractRenderingStrategy
Abstract rendering strategy
| Field Summary | |
|---|---|
protected AffineTransform |
affineTransform
|
protected MapContext |
context
|
protected Envelope |
mapArea
|
| Constructor Summary | |
|---|---|
AbstractRenderingStrategy()
create a default AbstractStrategy |
|
| Method Summary | |
|---|---|
void |
addStrategyListener(StrategyListener listener)
add a StrategyListener |
protected boolean |
checkAspect()
|
abstract BufferedImage |
createBufferImage(MapContext context)
|
abstract BufferedImage |
createBufferImage(MapLayer layer)
|
void |
dispose()
must be call to remove all reference on the renderingstrategy. |
protected void |
fireMapAreaChanged(Envelope oldone,
Envelope newone)
|
protected void |
fireMapContextChanged(MapContext oldcontext,
MapContext newContext)
|
protected void |
fit()
|
protected Envelope |
fixAspectRatio(Rectangle rect,
Envelope area)
|
AffineTransform |
getAffineTransform()
get the actual affinetransfrom |
JComponent |
getComponent()
get the visual component |
MapContext |
getContext()
get the MapContext |
Envelope |
getMapArea()
get the maparea to look at |
abstract BufferedImage |
getSnapShot()
create a bufferedImage of what is actually visible on the map widget |
StrategyListener[] |
getStrategyListeners()
get an array of StrategyListener |
protected abstract JComponent |
init()
|
boolean |
isAutoRefresh()
to see if the strategy is in auto refresh mode |
boolean |
isPainting()
true if the strategy is currently painting |
protected boolean |
isValidEnvelope(Envelope env)
|
abstract void |
layerAdded(MapLayerListEvent event)
Triggered when a new layer is added to the MapContext |
abstract void |
layerChanged(MapLayerListEvent event)
Triggered when something in a layer changed (data, style, title) |
abstract void |
layerMoved(MapLayerListEvent event)
Triggered when a group of layers chenges position in the layer list |
abstract void |
layerRemoved(MapLayerListEvent event)
Triggered when a layer is removed from the MapContext |
abstract void |
refresh()
use for a complete reset of the strategy |
void |
removeStrategyListener(StrategyListener listener)
remove a StrategyListener |
void |
setAffineTransform(AffineTransform affineTransform)
set affinetransform |
void |
setAutoRefreshEnabled(boolean ref)
to enable automatic refreshing of the map, if not you must call manualy the refresh method |
void |
setContext(MapContext newContext)
set the MapContext |
void |
setMapArea(Envelope area)
set the maparea to look at |
protected void |
setPainting(boolean b)
|
protected void |
testRefresh()
|
Point |
toComponentCoord(Coordinate coord)
transform a JTS Coordinate in an pixel x/y coordinate |
Coordinate |
toMapCoord(int mx,
int my)
transform a mouse coordinate in JTS Coordinate using the CRS of the mapcontext |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MapContext context
protected Envelope mapArea
protected AffineTransform affineTransform
| Constructor Detail |
|---|
public AbstractRenderingStrategy()
| Method Detail |
|---|
protected abstract JComponent init()
protected Envelope fixAspectRatio(Rectangle rect,
Envelope area)
protected void fit()
protected void testRefresh()
protected boolean checkAspect()
protected boolean isValidEnvelope(Envelope env)
protected void setPainting(boolean b)
protected void fireMapAreaChanged(Envelope oldone,
Envelope newone)
protected void fireMapContextChanged(MapContext oldcontext,
MapContext newContext)
public Coordinate toMapCoord(int mx,
int my)
StreamingStrategy
toMapCoord in interface StreamingStrategymx - : x coordinate of the mouse on the map (in pixel)my - : y coordinate of the mouse on the map (in pixel)
public Point toComponentCoord(Coordinate coord)
StreamingStrategy
toComponentCoord in interface StreamingStrategypublic abstract BufferedImage createBufferImage(MapLayer layer)
public abstract BufferedImage createBufferImage(MapContext context)
public abstract BufferedImage getSnapShot()
StreamingStrategy
getSnapShot in interface StreamingStrategypublic abstract void refresh()
StreamingStrategy
refresh in interface StreamingStrategypublic final JComponent getComponent()
StreamingStrategy
getComponent in interface StreamingStrategypublic final void setContext(MapContext newContext)
StreamingStrategy
setContext in interface StreamingStrategynewContext - : can not be nullpublic final MapContext getContext()
StreamingStrategy
getContext in interface StreamingStrategypublic final void setMapArea(Envelope area)
StreamingStrategy
setMapArea in interface StreamingStrategyarea - : can not be nullpublic final Envelope getMapArea()
StreamingStrategy
getMapArea in interface StreamingStrategypublic final void addStrategyListener(StrategyListener listener)
StreamingStrategy
addStrategyListener in interface StreamingStrategylistener - : StrategyListener to addpublic final void removeStrategyListener(StrategyListener listener)
StreamingStrategy
removeStrategyListener in interface StreamingStrategylistener - : StrategyListener to removepublic final StrategyListener[] getStrategyListeners()
StreamingStrategy
getStrategyListeners in interface StreamingStrategypublic final void setAutoRefreshEnabled(boolean ref)
StreamingStrategy
setAutoRefreshEnabled in interface StreamingStrategypublic final boolean isAutoRefresh()
StreamingStrategy
isAutoRefresh in interface StreamingStrategypublic final boolean isPainting()
StreamingStrategy
isPainting in interface StreamingStrategypublic void dispose()
StreamingStrategy
dispose in interface StreamingStrategypublic abstract void layerAdded(MapLayerListEvent event)
MapLayerListListener
layerAdded in interface MapLayerListListenerevent - encapsulating the event informationpublic abstract void layerRemoved(MapLayerListEvent event)
MapLayerListListener
layerRemoved in interface MapLayerListListenerevent - encapsulating the event informationpublic abstract void layerChanged(MapLayerListEvent event)
MapLayerListListener
layerChanged in interface MapLayerListListenerevent - encapsulating the event informationpublic abstract void layerMoved(MapLayerListEvent event)
MapLayerListListener
layerMoved in interface MapLayerListListenerevent - encapsulating the event informationpublic AffineTransform getAffineTransform()
StreamingStrategy
getAffineTransform in interface StreamingStrategypublic void setAffineTransform(AffineTransform affineTransform)
StreamingStrategy
setAffineTransform in interface StreamingStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||