com.partnersoft.maps.render
Class SelectionDrawingSurface
java.lang.Object
com.partnersoft.maps.render.AbstractDrawingSurface
com.partnersoft.maps.render.SelectionDrawingSurface
- All Implemented Interfaces:
- DrawingSurface
public class SelectionDrawingSurface
- extends AbstractDrawingSurface
This is a copy of Java2DDrawingSurface's selection code taken out and placed in
its own DrawingSurface. With OpenGL, selection is an integral part of drawing.
With Java2D, selection and drawing don't have anything to do with each other. We
are either drawing with a Java2D Graphics object or we're selecting using our
own code.
- Author:
- Russell Cagle
Copyright 2006 Partner Software, Inc.
| Fields inherited from class com.partnersoft.maps.render.AbstractDrawingSurface |
backgroundColor, currentMapSet, currentPointStyle, currentPolygonStyle, currentPolylineStyle, currentTextStyle, foregroundColor, invisiblePolylineStyle, printing, renderMode, renderPointStyle, renderPolylineStyle, renderQuality, renderTextStyle, selectionPixelX, selectionPixelY, showInvisibleGraphics |
|
Method Summary |
void |
clear()
|
void |
drawPoint(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation)
|
void |
drawPointColor(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
int red,
int green,
int blue,
int alpha)
|
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)
|
void |
endTile()
|
int[][] |
getSelections()
|
boolean |
isDirty()
|
void |
popName()
|
void |
pushName(int i)
|
ImageRotation |
rotationFor(java.awt.Image image,
float theta)
|
void |
setPointStyle(int style)
|
void |
setSelectionPixel(int pixelX,
int pixelY)
|
void |
startDrawing()
|
void |
startTile(RoverBytes bytes)
Sets up the transformations for the coordinates that are coming in. |
void |
stopDrawing()
|
| Methods inherited from class com.partnersoft.maps.render.AbstractDrawingSurface |
displayListFor, displayListFor, drawDisplayList, endDisplayList, isDisplayListSupported, removeDisplayList, setBackgroundColor, setForegroundColor, setFrame, setMapSet, setPointStyle, setPolygonStyle, setPolylineStyle, setPolylineStyle, setPrinting, setRenderMode, setRenderQuality, setRenderScaleRegion, setShowInvisibleGraphics, setTextStyle, setTextStyle, startDisplayList, startDisplayList |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectionDrawingSurface
public SelectionDrawingSurface(MapViewFrame frame)
startTile
public void startTile(RoverBytes bytes)
- Sets up the transformations for the coordinates that are coming in.
- Parameters:
bytes - everything we need to set up our transformation.
endTile
public void endTile()
clear
public void clear()
setPointStyle
public void setPointStyle(int style)
- Specified by:
setPointStyle in interface DrawingSurface- Overrides:
setPointStyle 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
drawPointColor
public void drawPointColor(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
int red,
int green,
int blue,
int alpha)
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)
drawPolygon
public void drawPolygon(int dataID,
DoubleBuffer coords)
- Specified by:
drawPolygon in interface DrawingSurface- Specified by:
drawPolygon in class AbstractDrawingSurface
startDrawing
public void startDrawing()
- Specified by:
startDrawing in interface DrawingSurface- Specified by:
startDrawing in class AbstractDrawingSurface
stopDrawing
public void stopDrawing()
- Specified by:
stopDrawing in interface DrawingSurface- Specified by:
stopDrawing in class AbstractDrawingSurface
isDirty
public boolean isDirty()