|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IRenderContext
Simplifies access of resource data and output image for renderers. A RenderContext has three main Jobs:
Method Summary | |
---|---|
void |
clearImage()
Clears the entire image so it is all transparent. |
void |
clearImage(java.awt.Rectangle paintArea)
Clears the area of the image indicated by the rectangle. |
IRenderContext |
copy()
Makes a deep copy of this object, if necessary. |
java.awt.image.BufferedImage |
copyImage(java.awt.Rectangle rectangle)
Grab a specific rectangle from the raster to provide instant feedback for geoInfo and selection tools. |
Query |
getFeatureQuery()
|
IGeoResource |
getGeoResource()
Returns service associated with the first layer in the map. |
java.awt.image.BufferedImage |
getImage()
Returns a bufferedImage that a renderer can renders to. |
java.awt.image.BufferedImage |
getImage(int width,
int height)
Returns a bufferedImage that a renderer can render to. |
ILabelPainter |
getLabelPainter()
Returns the labeller for the next rendering. |
ILayer |
getLayer()
Returns the layer in the renderer is responsible for. |
int |
getStatus()
Gets the status of the layer contained by the context. |
java.lang.String |
getStatusMessage()
A message to provide the user with additional feed back about the current rendering status. |
int |
getZorder()
Determines the zorder of the renderer. |
boolean |
hasContent(java.awt.Point screenLocation)
Test if content is rendered at the provided point. |
boolean |
isVisible()
Returns true if the renderer has visible data. |
void |
setStatus(int status)
Sets the status of the layer contained by the context. |
void |
setStatusMessage(java.lang.String message)
Sets the current rendering status message |
Methods inherited from interface net.refractions.udig.project.IAbstractContext |
---|
getBoundingBox, getCRS, getEditManager, getFeaturesInBbox, getMap, getMapDisplay, getMapLayers, getPixelBoundingBox, getPixelSize, getProject, getRenderManager, getSelectedLayer, getViewportModel, pixelToWorld, toShape, toShape, tranformCoordinate, worldBounds, worldToPixel, worldToScreenMathTransform, worldToScreenTransform |
Method Detail |
---|
boolean hasContent(java.awt.Point screenLocation)
Used to optimize getInfo and selection tools.
screenLocation
-
java.awt.image.BufferedImage copyImage(java.awt.Rectangle rectangle)
Often this feedback takes place on the display under direction of the tool.
rectangle
- Rectangle indicating area of interest
BufferedImage
java.awt.image.BufferedImage getImage(int width, int height)
The method does not guarantee an image that is the same size as the request, only that the returned image will be at least the size requested
The user of the image is required to clear the image. The image maybe cached and as a result may be dirty.
BufferedImage
java.awt.image.BufferedImage getImage()
The returned image will be the same size as the display or bigger
BufferedImage
ILayer getLayer()
Should normally be used when only one layer is being rendered.
ILayer
IGeoResource getGeoResource()
Should normally be used when only one layer is being rendered.
int getZorder()
ILayer.getZorder()
boolean isVisible()
If not layer is not a CompositeRenderer then this is just a call to ILayer.isVisible(). Otherwise if one of the layers is visible then it should return true
ILayer.isVisible()
void clearImage()
Convenience for clearImage(getImage().getWidth(), getImage.getHeight());
clearImage(Rectangle)
Query getFeatureQuery()
void clearImage(java.awt.Rectangle paintArea)
paintArea
- clearImage()
void setStatus(int status)
status
- the new status to set on the layer.ILayer.DONE
,
ILayer.ERROR
,
ILayer.MISSING
,
ILayer.WAIT
,
ILayer.WARNING
,
ILayer.WORKING
,
ILayer.UNCONFIGURED
int getStatus()
ILayer.DONE
,
ILayer.ERROR
,
ILayer.MISSING
,
ILayer.WAIT
,
ILayer.WARNING
,
ILayer.WORKING
,
ILayer.UNCONFIGURED
java.lang.String getStatusMessage()
This is used to provide feedback for a Layer's rendering status.
ILayer.getStatusMessage()
,
setStatus(int)
,
getStatus()
,
getStatusMessage()
void setStatusMessage(java.lang.String message)
message
- the status messageILayer.getStatusMessage()
,
ILayer.getStatus()
,
getStatusMessage()
,
getStatus()
IRenderContext copy()
IAbstractContext
copy
in interface IAbstractContext
ILabelPainter getLabelPainter()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |