|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Image
java.awt.image.BufferedImage
com.c5corp.c5utm.UtmImage
public class UtmImage
A java.awt.image.BufferedImage that provides imaging methods for com.c5corp.c5utm.Points objects.
Field Summary | |
---|---|
static int |
LABEL_BEGINNING
For rendering a track log, indicates a lable should be placed near the first point of the track. |
static int |
LABEL_END
For rendering a track log, indicates a lable should be placed near the last point of the track. |
static int |
NO_LABEL
For rendering a track log, indicates no lable should be rendered. |
static int |
RENDER_COLLAR
A white collar will be rendered only if the constructor UtmImage(Points thePoints, int RenderFlags, boolean render_collar). |
static int |
RENDER_EMPTY_COLLAR
If this class has this RenderFlags set, it will simply render an empty collar and utm key, but not elevation (Point) data, even if the other flags are set. |
static int |
RENDER_HIGH
If this class has this RenderFlags set, it will render the highest elevations in the image. |
static int |
RENDER_LOW
If this class has this RenderFlags set, it will render the lowest elevations in the image. |
static int |
RENDER_MEAN
If this class has this RenderFlags set, it will render the mean elevations in the image. |
static int |
RENDER_MEDIAN
If this class has this RenderFlags set, it will render the median elevations in the image. |
static int |
RENDER_MODE
If this class has this RenderFlags set, it will render the modal elevations in the image. |
Fields inherited from class java.awt.image.BufferedImage |
---|
TYPE_3BYTE_BGR, TYPE_4BYTE_ABGR, TYPE_4BYTE_ABGR_PRE, TYPE_BYTE_BINARY, TYPE_BYTE_GRAY, TYPE_BYTE_INDEXED, TYPE_CUSTOM, TYPE_INT_ARGB, TYPE_INT_ARGB_PRE, TYPE_INT_BGR, TYPE_INT_RGB, TYPE_USHORT_555_RGB, TYPE_USHORT_565_RGB, TYPE_USHORT_GRAY |
Fields inherited from class java.awt.Image |
---|
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty |
Fields inherited from interface java.awt.Transparency |
---|
BITMASK, OPAQUE, TRANSLUCENT |
Constructor Summary | |
---|---|
UtmImage(Points thePoints)
Creates a UtmImage object from a Points object, using default RENDER_PLAIN rendering by calling renderSimple(). |
|
UtmImage(Points thePoints,
int renderFlags)
Creates a UtmImage object from a Points object, with the set RenderFlags. |
|
UtmImage(Points thePoints,
int renderFlags,
boolean renderCollar)
Creates collared UtmImage object (with a stats legend and UTM tic marks) from a Points object, with the set RenderFlags. |
Method Summary | |
---|---|
void |
renderRoute(Route route,
java.awt.Color pointColor,
java.awt.Color hatchColor,
java.awt.Color labelColor,
java.awt.Color lineColor,
boolean labelPoint,
java.sql.Connection connection)
Draw a Route onto the image |
void |
renderSimple()
Performs basic rendering of the Points object passed into the constructor. |
void |
renderStats()
Performs statistical rendering of the Points object passed into the constructor. |
void |
renderTrackLog(TrackLog trackLog,
java.awt.Color color,
int label,
java.sql.Connection connection)
Draws a data in a TrackLog object onto the image, provided the TrackLog (or part of the track log) is in the area. |
void |
renderWayPoint(WayPoint wayPoint,
java.awt.Color pointColor,
java.awt.Color hatchColor,
java.awt.Color labelColor,
boolean labelPoint,
java.sql.Connection connection)
Draw a WayPoint object onto the image |
void |
renderWayPointList(WayPointList wayPointList,
java.awt.Color pointColor,
java.awt.Color hatchColor,
java.awt.Color labelColor,
boolean labelPoint,
java.sql.Connection connection)
Draw WayPointList (all the WayPoints it Contains) onto the image |
void |
setRenderFlags(int renderFlags)
Sets the rendering flags |
void |
writeImageFile(java.io.File file,
java.lang.String formatName)
Writes a image file from this UtmImage object. |
void |
writeImageFile(java.lang.String path,
java.lang.String filename)
Writes a .png file from this UtmImage object. |
Methods inherited from class java.awt.image.BufferedImage |
---|
addTileObserver, coerceData, copyData, createGraphics, flush, getAlphaRaster, getCapabilities, getColorModel, getData, getData, getGraphics, getHeight, getHeight, getMinTileX, getMinTileY, getMinX, getMinY, getNumXTiles, getNumYTiles, getProperty, getProperty, getPropertyNames, getRaster, getRGB, getRGB, getSampleModel, getSource, getSources, getSubimage, getTile, getTileGridXOffset, getTileGridYOffset, getTileHeight, getTileWidth, getTransparency, getType, getWidth, getWidth, getWritableTile, getWritableTileIndices, hasTileWriters, isAlphaPremultiplied, isTileWritable, releaseWritableTile, removeTileObserver, setData, setRGB, setRGB, toString |
Methods inherited from class java.awt.Image |
---|
getAccelerationPriority, getScaledInstance, setAccelerationPriority |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int RENDER_HIGH
public static final int RENDER_LOW
public static final int RENDER_MEAN
public static final int RENDER_MEDIAN
public static final int RENDER_MODE
public static final int RENDER_COLLAR
public static final int RENDER_EMPTY_COLLAR
public static final int NO_LABEL
public static final int LABEL_BEGINNING
public static final int LABEL_END
Constructor Detail |
---|
public UtmImage(Points thePoints)
thePoints
- the Points to produce the UtmImage frompublic UtmImage(Points thePoints, int renderFlags)
thePoints
- the Points to produce the UtmImage fromrenderFlags
- the render flagspublic UtmImage(Points thePoints, int renderFlags, boolean renderCollar)
thePoints
- the Points to produce the UtmImage fromrenderFlags
- the render flagsrenderCollar
- true to render a collarMethod Detail |
---|
public void renderTrackLog(TrackLog trackLog, java.awt.Color color, int label, java.sql.Connection connection)
trackLog
- the TrackLog to rendercolor
- the Color with which to render the TrackLoglabel
- an int specifying where to put a track lableconnection
- a DB connectionDbHelper
,
com.c5corp.c5gps
,
NO_LABEL
,
LABEL_BEGINNING
,
LABEL_END
public void renderWayPointList(WayPointList wayPointList, java.awt.Color pointColor, java.awt.Color hatchColor, java.awt.Color labelColor, boolean labelPoint, java.sql.Connection connection)
wayPointList
- the WayPointList to renderpointColor
- the Color with which to render the pixel inside the cross hatch (the point)hatchColor
- the Color with which to render the cross hatchlabelColor
- the Color with which to render the label, if labelPoint is truelabelPoint
- renders the label (with the WayPoint name) if trueconnection
- a DB connectionDbHelper
,
com.c5corp.c5gps
public void renderWayPoint(WayPoint wayPoint, java.awt.Color pointColor, java.awt.Color hatchColor, java.awt.Color labelColor, boolean labelPoint, java.sql.Connection connection)
wayPoint
- the WayPoint to renderpointColor
- the Color with which to render the pixel inside the cross hatch (the point)hatchColor
- the Color with which to render the cross hatchlabelColor
- the Color with which to render the label, if labelPoint is truelabelPoint
- renders the label (with the WayPoint name) if trueconnection
- a DB connectionDbHelper
,
com.c5corp.c5gps
public void renderRoute(Route route, java.awt.Color pointColor, java.awt.Color hatchColor, java.awt.Color labelColor, java.awt.Color lineColor, boolean labelPoint, java.sql.Connection connection)
route
- the Route to renderpointColor
- the Color with which to render the pixel inside the cross hatch (the point)hatchColor
- the Color with which to render the cross hatchlabelColor
- the Color with which to render the label, if labelPoint is truelineColor
- the Color with which to render the lineslabelPoint
- renders the label (with the WayPoint name) if trueconnection
- a DB connectionDbHelper
,
com.c5corp.c5gps
public void renderSimple()
public void renderStats()
public void setRenderFlags(int renderFlags)
renderFlags
- the render flagspublic void writeImageFile(java.lang.String path, java.lang.String filename)
path
- the pathfilename
- the filenameFile
public void writeImageFile(java.io.File file, java.lang.String formatName)
file
- a File object representing the output fileformatName
- a javax.imageio.ImageIO informal format name, such as png, jpeg, tiffFile
,
ImageIO
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |