com.partnersoft.maps.render
Class AbstractDrawingSurface

java.lang.Object
  extended by com.partnersoft.maps.render.AbstractDrawingSurface
All Implemented Interfaces:
DrawingSurface
Direct Known Subclasses:
GLDrawingSurface, Java2DDrawingSurface, 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.

Field Summary
protected  int backgroundColor
           
protected  MapSet currentMapSet
           
protected  PointStyle currentPointStyle
           
protected  PolygonStyle currentPolygonStyle
           
protected  PolylineStyle currentPolylineStyle
           
protected  TextStyle currentTextStyle
           
protected  int foregroundColor
           
protected  MapViewFrame frame
           
protected  PolylineStyle invisiblePolylineStyle
           
protected  boolean printing
           
protected  int renderMode
           
protected  RenderPointStyle renderPointStyle
           
protected  RenderPolylineStyle renderPolylineStyle
           
protected  int renderQuality
           
protected  RenderTextStyle renderTextStyle
           
protected  int selectionPixelX
           
protected  int selectionPixelY
           
protected  boolean showInvisibleGraphics
           
 
Fields inherited from interface com.partnersoft.maps.render.DrawingSurface
QUALITY_GOOD, QUALITY_OK, QUALITY_POOR, RENDER_EPHEMERA, RENDER_RASTER, RENDER_RETICULE, RENDER_SELECT, RENDER_SELECTION, RENDER_VECTOR
 
Constructor Summary
AbstractDrawingSurface()
           
 
Method Summary
 int displayListFor(long key)
           
 int displayListFor(java.lang.Object key)
           
 void drawDisplayList(int displayListID)
           
abstract  void drawPoint(int dataID, double x, double y, int offsetX, int offsetY, int rotation)
           
abstract  void drawPolygon(int dataID, DoubleBuffer coords)
           
abstract  void drawPolyline(int dataID, DoubleBuffer coords)
           
abstract  void drawText(double x, double y, int offsetX, int offsetY, int rotation, int alignment, java.lang.String text)
           
 void endDisplayList()
           
abstract  int[][] getSelections()
           
 boolean isDisplayListSupported()
           
abstract  void popName()
           
abstract  void pushName(int i)
           
 void removeDisplayList(int displayListID)
           
 void setBackgroundColor(int color)
           
 void setForegroundColor(int newRGB)
           
 void setFrame(MapViewFrame frame)
           
 void setMapSet(MapSet newMapSet)
           
 void setPointStyle(int style)
           
 void setPointStyle(PointStyle style)
           
 void setPolygonStyle(PolygonStyle style)
           
 void setPolylineStyle(int style)
           
 void setPolylineStyle(PolylineStyle style)
           
 void setPrinting(boolean printing)
           
 void setRenderMode(int newMode)
           
 void setRenderQuality(int newQuality)
           
 void setRenderScaleRegion(RenderScaleRegion scaleRegion)
           
 void setSelectionPixel(int pixelX, int pixelY)
           
 void setShowInvisibleGraphics(boolean showInvisibleGraphics)
           
 void setTextStyle(int style)
           
 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
 
Methods inherited from interface com.partnersoft.maps.render.DrawingSurface
clear, drawPointColor, drawRasterImage, drawWheelMenu, drawWheelMenuCenter, endTile, isDirty, startTile
 

Field Detail

renderMode

protected int renderMode

renderQuality

protected int renderQuality

selectionPixelX

protected int selectionPixelX

selectionPixelY

protected int selectionPixelY

frame

protected MapViewFrame frame

renderPolylineStyle

protected RenderPolylineStyle renderPolylineStyle

renderPointStyle

protected RenderPointStyle renderPointStyle

renderTextStyle

protected RenderTextStyle renderTextStyle

currentMapSet

protected MapSet currentMapSet

currentPolygonStyle

protected PolygonStyle currentPolygonStyle

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
Constructor Detail

AbstractDrawingSurface

public AbstractDrawingSurface()
Method Detail

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

setSelectionPixel

public void setSelectionPixel(int pixelX,
                              int pixelY)
Specified by:
setSelectionPixel 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

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(PolygonStyle style)
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

setPointStyle

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

setPointStyle

public void setPointStyle(PointStyle style)
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

drawPolygon

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

drawPolyline

public abstract void drawPolyline(int dataID,
                                  DoubleBuffer 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(double x,
                              double y,
                              int offsetX,
                              int offsetY,
                              int rotation,
                              int alignment,
                              java.lang.String text)
Specified by:
drawText 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

pushName

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

popName

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

getSelections

public abstract int[][] getSelections()
Specified by:
getSelections in interface DrawingSurface