public class SelectionDrawingSurface extends AbstractDrawingSurface
This surface should be created fresh for every selection operation, and its frame should be set such that it forms the bounding box for the selection region desired.
A little history: initial implementations used two different methods for Java2D and OpenGL. The specifics were stored in Java2DDrawingSurface and OpenGLDrawingSurface, respectively, and selection was essentially treated as a special case of regular drawing for those classes (which is the case in OpenGL selection anyway). Unfortunately there were performance and useability problems; having two different selection models made the modes behave differently, and speeding up OpenGL selection would have required more active culling. Also, the selection code was mixed in with drawing code, making implementations more complex than necessary.Russell rewrote this while optimizing performance of OpenGL, especially selection, in version 4.2. Paul refactored further during 4.3 development, removing all selection code from the other classes.
Copyright 2006-2008 Partner Software, Inc.
backgroundColor, currentImageStyle, currentMapSet, currentPointStyle, currentPolygonStyle, currentPolylineStyle, currentTextStyle, foregroundColor, invisiblePolylineStyle, largePrint, nightView, printing, renderImageStyle, renderMode, renderPointStyle, renderPolygonStyle, renderPolylineStyle, renderQuality, renderTextStyle, showInvisibleGraphicsQUALITY_GOOD, QUALITY_OK, QUALITY_POOR, RENDER_EPHEMERA, RENDER_INDICATION, RENDER_RASTER, RENDER_RETICLE, RENDER_SELECTION, RENDER_VECTOR| Constructor and Description |
|---|
SelectionDrawingSurface(MapViewFrame frame) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
void |
drawImage(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
ImageSource image,
double scale,
int pixelsWide,
int pixelsHigh) |
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 |
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 |
endTile() |
int[][] |
getSelections() |
boolean |
isDirty() |
void |
popName() |
void |
pushName(int i) |
void |
setTextStyle(int style) |
void |
startDrawing() |
void |
startTile(RoverBytes bytes) |
void |
stopDrawing() |
copyBackBuffer, displayListFor, displayListFor, drawDisplayList, drawLiteralPoints, drawPolyline, drawPolyline, endDisplayList, isBackBufferSupported, isDisplayListSupported, isDrawingToBackBuffer, isLargePrint, isNightView, isPrinting, popState, pushState, removeDisplayList, setBackgroundColor, setDrawingToBackBuffer, setForegroundColor, setFrame, setImageStyle, setImageStyle, setImageStyle, setLargePrint, setMapSet, setNightView, setPointStyle, setPointStyle, setPointStyle, setPolygonStyle, setPolygonStyle, setPolygonStyle, setPolylineStyle, setPolylineStyle, setPolylineStyle, setPrinting, setRenderMode, setRenderQuality, setRenderScaleRegion, setShowInvisibleGraphics, setTextStyle, setTextStyle, startDisplayList, startDisplayListpublic SelectionDrawingSurface(MapViewFrame frame)
public void drawPolygon(int dataID,
DoubleBuffer coords)
drawPolygon in interface DrawingSurfacedrawPolygon in class AbstractDrawingSurfacepublic void startDrawing()
startDrawing in interface DrawingSurfacestartDrawing in class AbstractDrawingSurfacepublic void stopDrawing()
stopDrawing in interface DrawingSurfacestopDrawing in class AbstractDrawingSurfacepublic boolean isDirty()
public void startTile(RoverBytes bytes)
public void endTile()
public void clear()
public void setTextStyle(int style)
setTextStyle in interface DrawingSurfacesetTextStyle in class AbstractDrawingSurfacepublic void drawImage(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
ImageSource image,
double scale,
int pixelsWide,
int pixelsHigh)
public void drawPolyline(int dataID,
DoubleBuffer coords)
drawPolyline in interface DrawingSurfacedrawPolyline in class AbstractDrawingSurfacepublic void drawPoint(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation)
drawPoint in interface DrawingSurfacedrawPoint in class AbstractDrawingSurfacepublic void drawText(int dataID,
double x,
double y,
int offsetX,
int offsetY,
int rotation,
int alignment,
java.lang.String text)
drawText in interface DrawingSurfacedrawText in class AbstractDrawingSurfacepublic void drawRasterImage(RasterImage image)
public void pushName(int i)
public void popName()
public int[][] getSelections()
public void drawWheelMenuCenter(WheelMenu menu)
public void drawWheelMenu(WheelMenu menu)
public void drawPolygon(int dataID,
DynamicDoubleArray coords)
drawPolygon in interface DrawingSurfacedrawPolygon in class AbstractDrawingSurface