com.partnersoft.maps.render
Class Java2DDrawingSurface

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

public class Java2DDrawingSurface
extends AbstractDrawingSurface

Draws using Java 2D API.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Field Summary
 
Fields inherited from class com.partnersoft.maps.render.AbstractDrawingSurface
backgroundColor, currentPointStyle, currentPolygonStyle, currentPolylineStyle, currentTextStyle, foregroundColor, frame, invisiblePolylineStyle, renderMode, renderQuality, selectionPixelX, selectionPixelY, 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
Java2DDrawingSurface(java.awt.Component component, boolean animated, int quality)
           
 
Method Summary
 void clear()
           
 void drawPoint(int dataID, double x, double y, int offsetX, int offsetY, int rotation)
           
 void drawPolygon(int dataID, DoubleBuffer coords)
           
 void drawPolyline(int dataID, DoubleBuffer coords)
           
 void drawRasterImage(RasterImage image)
           
 void drawText(double x, double y, int offsetX, int offsetY, int rotation, int alignment, java.lang.String text)
           
 void drawWheelMenu(WheelMenu menu)
           
 void drawWheelMenuCenter(WheelMenu menu)
           
 int[][] getSelections()
           
 boolean getUseBackBuffer()
           
 boolean isDirty()
           
 void popName()
           
 void pushName(int i)
           
 ImageRotation rotationFor(java.awt.Image image, float theta)
           
 void setBackgroundColor(int color)
           
 void setComponent(java.awt.Component component)
          This should be called before rendering starts, to set the component for graphics operations.
 void setForegroundColor(int color)
           
 void setGraphics(java.awt.Graphics graphics)
          This should be called before rendering starts, to set the target for graphics operations.
 void setPointStyle(PointStyle style)
           
 void setPolygonStyle(PolygonStyle style)
           
 void setPolylineStyle(PolylineStyle style)
           
 void setRenderMode(int newMode)
           
 void setSelectionPixel(int pixelX, int pixelY)
           
 void setTextStyle(TextStyle style)
           
 void setUseBackBuffer(boolean mustI)
           
 void startDrawing()
           
 void stopDrawing()
           
 
Methods inherited from class com.partnersoft.maps.render.AbstractDrawingSurface
displayListFor, displayListFor, drawDisplayList, endDisplayList, isDisplayListSupported, removeDisplayList, setFrame, setRenderQuality, setShowInvisibleGraphics, startDisplayList, startDisplayList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Java2DDrawingSurface

public Java2DDrawingSurface(java.awt.Component component,
                            boolean animated,
                            int quality)
Method Detail

setGraphics

public void setGraphics(java.awt.Graphics graphics)
This should be called before rendering starts, to set the target for graphics operations.


setComponent

public void setComponent(java.awt.Component component)
This should be called before rendering starts, to set the component for graphics operations.


getUseBackBuffer

public boolean getUseBackBuffer()

setUseBackBuffer

public void setUseBackBuffer(boolean mustI)

isDirty

public boolean isDirty()

startDrawing

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

clear

public void clear()

stopDrawing

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

setRenderMode

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

setBackgroundColor

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

setForegroundColor

public void setForegroundColor(int color)
Specified by:
setForegroundColor in interface DrawingSurface
Overrides:
setForegroundColor in class AbstractDrawingSurface

setPolygonStyle

public void setPolygonStyle(PolygonStyle style)
Specified by:
setPolygonStyle in interface DrawingSurface
Overrides:
setPolygonStyle in class AbstractDrawingSurface

setPolylineStyle

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

setPointStyle

public void setPointStyle(PointStyle style)
Specified by:
setPointStyle in interface DrawingSurface
Overrides:
setPointStyle in class AbstractDrawingSurface

setTextStyle

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

drawPolygon

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

drawPolyline

public void drawPolyline(int dataID,
                         DoubleBuffer coords)
Specified by:
drawPolyline in interface DrawingSurface
Specified by:
drawPolyline in class AbstractDrawingSurface

drawPoint

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

drawText

public void drawText(double x,
                     double y,
                     int offsetX,
                     int offsetY,
                     int rotation,
                     int alignment,
                     java.lang.String text)
Specified by:
drawText in interface DrawingSurface
Specified by:
drawText in class AbstractDrawingSurface

drawRasterImage

public void drawRasterImage(RasterImage image)

setSelectionPixel

public void setSelectionPixel(int pixelX,
                              int pixelY)
Specified by:
setSelectionPixel in interface DrawingSurface
Overrides:
setSelectionPixel in class AbstractDrawingSurface

pushName

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

popName

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

getSelections

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

drawWheelMenuCenter

public void drawWheelMenuCenter(WheelMenu menu)

drawWheelMenu

public void drawWheelMenu(WheelMenu menu)

rotationFor

public ImageRotation rotationFor(java.awt.Image image,
                                 float theta)