com.partnersoft.maps.render
Class DoNothingDrawingSurface

java.lang.Object
  extended by com.partnersoft.maps.render.DoNothingDrawingSurface
All Implemented Interfaces:
DrawingSurface

public class DoNothingDrawingSurface
extends java.lang.Object
implements DrawingSurface

A do-nothing drawing surface, surprisingly useful.

Copyright 2008 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Field Summary
 
Fields inherited from interface com.partnersoft.maps.render.DrawingSurface
QUALITY_GOOD, QUALITY_OK, QUALITY_POOR, RENDER_EPHEMERA, RENDER_INDICATION, RENDER_RASTER, RENDER_RETICLE, RENDER_SELECTION, RENDER_VECTOR
 
Constructor Summary
DoNothingDrawingSurface()
           
 
Method Summary
 void clear()
           
 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 drawImage(int dataID, double x, double y, int offsetX, int offsetY, int rotation, ImageSource image, double scale, int pixelsWide, int pixelsHigh)
           
 void drawLiteralPoints(LiteralPointFile literalPoints)
           
 void drawPoint(int dataID, double x, double y, int offsetX, int offsetY, int rotation)
           
 void drawPolygon(int dataID, DoubleBuffer coords)
           
 void drawPolygon(int dataID, DynamicDoubleArray coords)
           
 void drawPolyline(int dataID, DoubleBuffer coords)
           
 void drawPolyline(int dataID, DynamicDoubleArray coords)
           
 void drawPolyline(int dataID, XyPolyline polyline)
           
 void drawRasterImage(RasterImage image)
           
 void drawText(int dataID, double x, double y, int offsetX, int offsetY, int rotation, int alignment, java.lang.String text)
           
 void drawWheelMenu(WheelMenu menu)
           
 void drawWheelMenuCenter(WheelMenu menu)
           
 void endDisplayList()
           
 void endTile()
           
 boolean isBackBufferSupported()
          Returns true if this surface offers a backing buffer.
 boolean isDirty()
           
 boolean isDisplayListSupported()
           
 boolean isDrawingToBackBuffer()
          Returns true if the surface is currently drawing to a backing buffer.
 void popName()
           
 void popState()
           
 void pushName(int i)
           
 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 drawId)
           
 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)
           
 void startDrawing()
           
 void startTile(RoverBytes bytes)
          Sets up the transformations for the coordinates that are coming in.
 void stopDrawing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoNothingDrawingSurface

public DoNothingDrawingSurface()
Method Detail

clear

public void clear()
Specified by:
clear in interface DrawingSurface

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

displayListFor

public int displayListFor(long key)
Specified by:
displayListFor in interface DrawingSurface

displayListFor

public int displayListFor(java.lang.Object key)
Specified by:
displayListFor in interface DrawingSurface

drawDisplayList

public void drawDisplayList(int displayListID)
Specified by:
drawDisplayList in interface DrawingSurface

drawImage

public void drawImage(int dataID,
                      double x,
                      double y,
                      int offsetX,
                      int offsetY,
                      int rotation,
                      ImageSource image,
                      double scale,
                      int pixelsWide,
                      int pixelsHigh)
Specified by:
drawImage in interface DrawingSurface

drawPoint

public void drawPoint(int dataID,
                      double x,
                      double y,
                      int offsetX,
                      int offsetY,
                      int rotation)
Specified by:
drawPoint in interface DrawingSurface

drawPolygon

public void drawPolygon(int dataID,
                        DoubleBuffer coords)
Specified by:
drawPolygon in interface DrawingSurface

drawPolygon

public void drawPolygon(int dataID,
                        DynamicDoubleArray coords)
Specified by:
drawPolygon in interface DrawingSurface

drawPolyline

public 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

drawRasterImage

public void drawRasterImage(RasterImage image)
Specified by:
drawRasterImage in interface DrawingSurface

drawText

public 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

drawWheelMenu

public void drawWheelMenu(WheelMenu menu)
Specified by:
drawWheelMenu in interface DrawingSurface

drawWheelMenuCenter

public void drawWheelMenuCenter(WheelMenu menu)
Specified by:
drawWheelMenuCenter in interface DrawingSurface

endDisplayList

public void endDisplayList()
Specified by:
endDisplayList in interface DrawingSurface

endTile

public void endTile()
Specified by:
endTile 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

isDirty

public boolean isDirty()
Specified by:
isDirty in interface DrawingSurface

isDisplayListSupported

public boolean isDisplayListSupported()
Specified by:
isDisplayListSupported 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.

popName

public void popName()
Specified by:
popName in interface DrawingSurface

popState

public void popState()
Specified by:
popState in interface DrawingSurface

pushName

public void pushName(int i)
Specified by:
pushName in interface DrawingSurface

pushState

public void pushState()
Specified by:
pushState in interface DrawingSurface

removeDisplayList

public void removeDisplayList(int displayListID)
Specified by:
removeDisplayList in interface DrawingSurface

setBackgroundColor

public void setBackgroundColor(int color)
Specified by:
setBackgroundColor in interface DrawingSurface

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

setForegroundColor

public void setForegroundColor(int newRGB)
Specified by:
setForegroundColor in interface DrawingSurface

setFrame

public void setFrame(MapViewFrame frame)
Specified by:
setFrame in interface DrawingSurface

setMapSet

public void setMapSet(MapSet newMapSet)
Specified by:
setMapSet 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

setPolygonStyle

public void setPolygonStyle(int drawId)
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

setPolylineStyle

public void setPolylineStyle(int style)
Specified by:
setPolylineStyle in interface DrawingSurface

setPolylineStyle

public void setPolylineStyle(PolylineStyle style)
Specified by:
setPolylineStyle in interface DrawingSurface

setPolylineStyle

public void setPolylineStyle(java.lang.String styleName)
Specified by:
setPolylineStyle in interface DrawingSurface

setPrinting

public void setPrinting(boolean printing)
Specified by:
setPrinting in interface DrawingSurface

setRenderMode

public void setRenderMode(int newMode)
Specified by:
setRenderMode in interface DrawingSurface

setRenderQuality

public void setRenderQuality(int newQuality)
Specified by:
setRenderQuality in interface DrawingSurface

setRenderScaleRegion

public void setRenderScaleRegion(RenderScaleRegion scaleRegion)
Specified by:
setRenderScaleRegion in interface DrawingSurface

setShowInvisibleGraphics

public void setShowInvisibleGraphics(boolean showInvisibleGraphics)
Specified by:
setShowInvisibleGraphics in interface DrawingSurface

setTextStyle

public void setTextStyle(int style)
Specified by:
setTextStyle in interface DrawingSurface

setTextStyle

public void setTextStyle(java.lang.String styleName)
Specified by:
setTextStyle in interface DrawingSurface

setTextStyle

public void setTextStyle(TextStyle style)
Specified by:
setTextStyle in interface DrawingSurface

startDisplayList

public int startDisplayList(long key)
Specified by:
startDisplayList in interface DrawingSurface

startDisplayList

public int startDisplayList(java.lang.Object key)
Specified by:
startDisplayList in interface DrawingSurface

startDrawing

public void startDrawing()
Specified by:
startDrawing in interface DrawingSurface

startTile

public void startTile(RoverBytes bytes)
Description copied from interface: DrawingSurface
Sets up the transformations for the coordinates that are coming in.

Specified by:
startTile in interface DrawingSurface
Parameters:
bytes - everything we need to set up our transformation.

stopDrawing

public void stopDrawing()
Specified by:
stopDrawing in interface DrawingSurface

drawPolyline

public void drawPolyline(int dataID,
                         XyPolyline polyline)
Specified by:
drawPolyline in interface DrawingSurface

setImageStyle

public void setImageStyle(ImageStyle style)
Specified by:
setImageStyle in interface DrawingSurface

setImageStyle

public void setImageStyle(int style)
Specified by:
setImageStyle in interface DrawingSurface

setImageStyle

public void setImageStyle(java.lang.String styleName)
Specified by:
setImageStyle in interface DrawingSurface

drawLiteralPoints

public void drawLiteralPoints(LiteralPointFile literalPoints)
Specified by:
drawLiteralPoints in interface DrawingSurface