com.partnersoft.maps.render
Class AbstractDrawingSurface
java.lang.Object
com.partnersoft.maps.render.AbstractDrawingSurface
- All Implemented Interfaces:
- DrawingSurface
- Direct Known Subclasses:
- Java2DDrawingSurface, OpenglDrawingSurface, SelectionDrawingSurface
public abstract class AbstractDrawingSurface
- extends java.lang.Object
- implements DrawingSurface
Superclass implementing basic functionality of a DrawingSurface. In general
if you override a method you should call the superclass version, too. The
only exception is the display lists methods - if you enable display lists,
you must implement every display list method and not call these (since they
throw OperationNotSupportedExceptions).
- Author:
- Paul Reavis Copyright 2004 Partner Software, Inc.
|
Method Summary |
void |
copyBackBuffer()
Copies the back buffer to the onscreen or "front" buffer. |
int |
displayListFor(long key)
|
int |
displayListFor(java.lang.Object key)
|
void |
drawDisplayList(int displayListID)
|
void |
drawLiteralPoints(LiteralPointFile literalPoints)
|
abstract void |
drawPoint(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation)
|
void |
drawPolygon(int dataId,
DoubleBuffer coords)
|
abstract void |
drawPolygon(int dataID,
DynamicDoubleArray coords)
|
abstract void |
drawPolyline(int dataID,
DoubleBuffer coords)
|
void |
drawPolyline(int dataID,
DynamicDoubleArray coords)
|
void |
drawPolyline(int dataID,
XyPolyline polyline)
|
abstract void |
drawText(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
int alignment,
java.lang.String text)
|
void |
endDisplayList()
|
boolean |
isBackBufferSupported()
Returns true if this surface offers a backing buffer. |
boolean |
isDisplayListSupported()
|
boolean |
isDrawingToBackBuffer()
Returns true if the surface is currently drawing to a backing buffer. |
void |
popState()
|
void |
pushState()
|
void |
removeDisplayList(int displayListID)
|
void |
setBackgroundColor(int color)
|
void |
setDrawingToBackBuffer(boolean isit)
Sets whether the surface should draw to the backing buffer (true) or to
the onscreen or "front" buffer (false). |
void |
setForegroundColor(int newRGB)
|
void |
setFrame(MapViewFrame frame)
|
void |
setImageStyle(ImageStyle style)
|
void |
setImageStyle(int style)
|
void |
setImageStyle(java.lang.String styleName)
|
void |
setMapSet(MapSet newMapSet)
|
void |
setPointStyle(int style)
|
void |
setPointStyle(PointStyle style)
|
void |
setPointStyle(java.lang.String styleName)
|
void |
setPolygonStyle(int style)
|
void |
setPolygonStyle(PolygonStyle style)
|
void |
setPolygonStyle(java.lang.String styleName)
|
void |
setPolylineStyle(int style)
|
void |
setPolylineStyle(PolylineStyle style)
|
void |
setPolylineStyle(java.lang.String styleName)
|
void |
setPrinting(boolean printing)
|
void |
setRenderMode(int newMode)
|
void |
setRenderQuality(int newQuality)
|
void |
setRenderScaleRegion(RenderScaleRegion scaleRegion)
|
void |
setShowInvisibleGraphics(boolean showInvisibleGraphics)
|
void |
setTextStyle(int style)
|
void |
setTextStyle(java.lang.String styleName)
|
void |
setTextStyle(TextStyle style)
|
int |
startDisplayList(long key)
|
int |
startDisplayList(java.lang.Object key)
|
abstract void |
startDrawing()
|
abstract void |
stopDrawing()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
renderMode
protected int renderMode
renderQuality
protected int renderQuality
frame
protected MapViewFrame frame
renderPolygonStyle
protected RenderPolygonStyle renderPolygonStyle
renderImageStyle
protected RenderImageStyle renderImageStyle
renderPolylineStyle
protected RenderPolylineStyle renderPolylineStyle
renderPointStyle
protected RenderPointStyle renderPointStyle
renderTextStyle
protected RenderTextStyle renderTextStyle
currentMapSet
protected MapSet currentMapSet
currentPolygonStyle
protected PolygonStyle currentPolygonStyle
currentImageStyle
protected ImageStyle currentImageStyle
currentPolylineStyle
protected PolylineStyle currentPolylineStyle
currentPointStyle
protected PointStyle currentPointStyle
currentTextStyle
protected TextStyle currentTextStyle
backgroundColor
protected int backgroundColor
foregroundColor
protected int foregroundColor
showInvisibleGraphics
protected boolean showInvisibleGraphics
invisiblePolylineStyle
protected PolylineStyle invisiblePolylineStyle
printing
protected boolean printing
AbstractDrawingSurface
public AbstractDrawingSurface()
setShowInvisibleGraphics
public void setShowInvisibleGraphics(boolean showInvisibleGraphics)
- Specified by:
setShowInvisibleGraphics in interface DrawingSurface
setRenderMode
public void setRenderMode(int newMode)
- Specified by:
setRenderMode in interface DrawingSurface
setPrinting
public void setPrinting(boolean printing)
- Specified by:
setPrinting in interface DrawingSurface
setRenderQuality
public void setRenderQuality(int newQuality)
- Specified by:
setRenderQuality in interface DrawingSurface
setFrame
public void setFrame(MapViewFrame frame)
- Specified by:
setFrame in interface DrawingSurface
startDrawing
public abstract void startDrawing()
- Specified by:
startDrawing in interface DrawingSurface
stopDrawing
public abstract void stopDrawing()
- Specified by:
stopDrawing in interface DrawingSurface
setMapSet
public void setMapSet(MapSet newMapSet)
- Specified by:
setMapSet in interface DrawingSurface
pushState
public void pushState()
- Specified by:
pushState in interface DrawingSurface
popState
public void popState()
- Specified by:
popState in interface DrawingSurface
setBackgroundColor
public void setBackgroundColor(int color)
- Specified by:
setBackgroundColor in interface DrawingSurface
setForegroundColor
public void setForegroundColor(int newRGB)
- Specified by:
setForegroundColor in interface DrawingSurface
setRenderScaleRegion
public void setRenderScaleRegion(RenderScaleRegion scaleRegion)
- Specified by:
setRenderScaleRegion in interface DrawingSurface
setPolygonStyle
public void setPolygonStyle(int style)
- Specified by:
setPolygonStyle in interface DrawingSurface
setPolygonStyle
public void setPolygonStyle(PolygonStyle style)
- Specified by:
setPolygonStyle in interface DrawingSurface
setPolygonStyle
public void setPolygonStyle(java.lang.String styleName)
- Specified by:
setPolygonStyle in interface DrawingSurface
setImageStyle
public void setImageStyle(int style)
- Specified by:
setImageStyle in interface DrawingSurface
setImageStyle
public void setImageStyle(ImageStyle style)
- Specified by:
setImageStyle in interface DrawingSurface
setImageStyle
public void setImageStyle(java.lang.String styleName)
- Specified by:
setImageStyle in interface DrawingSurface
setPolylineStyle
public void setPolylineStyle(int style)
- Specified by:
setPolylineStyle in interface DrawingSurface
setPolylineStyle
public void setPolylineStyle(java.lang.String styleName)
- Specified by:
setPolylineStyle in interface DrawingSurface
setPolylineStyle
public void setPolylineStyle(PolylineStyle style)
- Specified by:
setPolylineStyle in interface DrawingSurface
setPointStyle
public void setPointStyle(int style)
- Specified by:
setPointStyle in interface DrawingSurface
setPointStyle
public void setPointStyle(PointStyle style)
- Specified by:
setPointStyle in interface DrawingSurface
setPointStyle
public void setPointStyle(java.lang.String styleName)
- Specified by:
setPointStyle in interface DrawingSurface
setTextStyle
public void setTextStyle(int style)
- Specified by:
setTextStyle in interface DrawingSurface
setTextStyle
public void setTextStyle(TextStyle style)
- Specified by:
setTextStyle in interface DrawingSurface
setTextStyle
public void setTextStyle(java.lang.String styleName)
- Specified by:
setTextStyle in interface DrawingSurface
drawPolygon
public void drawPolygon(int dataId,
DoubleBuffer coords)
- Specified by:
drawPolygon in interface DrawingSurface
drawPolygon
public abstract void drawPolygon(int dataID,
DynamicDoubleArray coords)
- Specified by:
drawPolygon in interface DrawingSurface
drawPolyline
public abstract void drawPolyline(int dataID,
DoubleBuffer coords)
- Specified by:
drawPolyline in interface DrawingSurface
drawPolyline
public void drawPolyline(int dataID,
DynamicDoubleArray coords)
- Specified by:
drawPolyline in interface DrawingSurface
drawPoint
public abstract void drawPoint(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation)
- Specified by:
drawPoint in interface DrawingSurface
drawText
public abstract void drawText(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
int alignment,
java.lang.String text)
- Specified by:
drawText in interface DrawingSurface
drawPolyline
public void drawPolyline(int dataID,
XyPolyline polyline)
- Specified by:
drawPolyline in interface DrawingSurface
drawLiteralPoints
public void drawLiteralPoints(LiteralPointFile literalPoints)
- Specified by:
drawLiteralPoints in interface DrawingSurface
isBackBufferSupported
public boolean isBackBufferSupported()
- Description copied from interface:
DrawingSurface
- Returns true if this surface offers a backing buffer. Backing buffers can
improve performance since they only need to be updated when the map view
frame changes, the legend changes, or the vector data changes.
If this method returns true, the implementation must also support the
methods setDrawingToBackBuffer() and copyBackBuffer()
- Specified by:
isBackBufferSupported in interface DrawingSurface
isDrawingToBackBuffer
public boolean isDrawingToBackBuffer()
- Description copied from interface:
DrawingSurface
- Returns true if the surface is currently drawing to a backing buffer.
Returns false if it is not (or if it doesn't have one).
- Specified by:
isDrawingToBackBuffer in interface DrawingSurface
- Returns:
- true if surface is currently drawing to a backing buffer.
setDrawingToBackBuffer
public void setDrawingToBackBuffer(boolean isit)
- Description copied from interface:
DrawingSurface
- Sets whether the surface should draw to the backing buffer (true) or to
the onscreen or "front" buffer (false). Throws
UnsupportedOperationException if isBackBufferSupported() returns false.
- Specified by:
setDrawingToBackBuffer in interface DrawingSurface
- Parameters:
isit - true if surface should start drawing to the backing buffer
copyBackBuffer
public void copyBackBuffer()
- Description copied from interface:
DrawingSurface
- Copies the back buffer to the onscreen or "front" buffer. Throws
UnsupportedOperationException if isBackBufferSupported() returns false.
- Specified by:
copyBackBuffer in interface DrawingSurface
isDisplayListSupported
public boolean isDisplayListSupported()
- Specified by:
isDisplayListSupported in interface DrawingSurface
displayListFor
public int displayListFor(long key)
- Specified by:
displayListFor in interface DrawingSurface
startDisplayList
public int startDisplayList(long key)
- Specified by:
startDisplayList in interface DrawingSurface
displayListFor
public int displayListFor(java.lang.Object key)
- Specified by:
displayListFor in interface DrawingSurface
startDisplayList
public int startDisplayList(java.lang.Object key)
- Specified by:
startDisplayList in interface DrawingSurface
endDisplayList
public void endDisplayList()
- Specified by:
endDisplayList in interface DrawingSurface
removeDisplayList
public void removeDisplayList(int displayListID)
- Specified by:
removeDisplayList in interface DrawingSurface
drawDisplayList
public void drawDisplayList(int displayListID)
- Specified by:
drawDisplayList in interface DrawingSurface