public class TLcdVVTerrainProfileRenderer extends TLcdDefaultVVRenderer
TLcdDefaultVVRenderer
BOTTOM_LINE, DEFAULT, FILLED, LEFT_LINE, NO_PAINTING, POLYGON, RIGHT_LINE, TOP_LINE
Constructor and Description |
---|
TLcdVVTerrainProfileRenderer() |
Modifier and Type | Method and Description |
---|---|
void |
fillSubProfileStepPolygon(Graphics aGraphics,
TLcdVVJPanel aVView,
int aState,
int aRenderingMode,
int aSubProfileStepIndex,
int aSegmentIndex,
int aSubProfileIndex,
int[] aXArray,
int[] aYArray)
This method actually paints the terrain profile.
|
Format |
getAltitudeFormat()
Gets the format used to display altitude values.
|
Color |
getUnknownColor()
Returns the color used to display unknown altitudes.
|
protected boolean |
isValidElevation(double aElevationValue)
Checks whether the given elevation value is a known value as returned by the terrain elevation
provider.
|
void |
paintPointLabel(Graphics aGraphics,
TLcdVVJPanel aVView,
int aPointIndex,
int xPos,
int yPos)
Paints the labels for the main profile points.
|
void |
paintVerticalCursor(Graphics aGraphics,
TLcdVVJPanel aVView,
int aCurrentXPosition,
int aYOffset,
int aHeight,
int aLeftPointIndex,
int aRightPointIndex,
int aMouseY,
double aRatio)
Paints the vertical cursor.
|
void |
setAltitudeFormat(Format aAltitudeFormat)
Set the format used to display altitude values.
|
void |
setUnknownColor(Color aUnknownColor)
Sets the color to use to display unknown altitudes.
|
drawProfileLine, drawSubProfileLine, getMainProfileRenderingMode, getPointFormat, getPointIcon, getPointIconDimension, getProfileColor, getProfileColorArray, getRenderingMode, getSubProfileColor, getSubProfileColorArray, getSubProfileRenderingMode, getSubProfileRenderingMode, getVerticalCursorColor, isAntiAliasing, isTraceOn, paintPointIcon, paintYAxisParallelLine, setAntiAliasing, setClassTraceOn, setMainProfileLabelArray, setMainProfileRenderingMode, setPointFormat, setPointIcon, setProfileColor, setProfileColorArray, setSubProfileColor, setSubProfileColorArray, setSubProfileRenderingMode, setSubProfileRenderingMode, setTraceOn, setVerticalCursorColor, subprofilesPaintEpilogue, subprofilesPaintPrologue
public void setAltitudeFormat(Format aAltitudeFormat)
aAltitudeFormat
- the format used to display altitude values.getAltitudeFormat()
public Format getAltitudeFormat()
setAltitudeFormat(java.text.Format)
public void fillSubProfileStepPolygon(Graphics aGraphics, TLcdVVJPanel aVView, int aState, int aRenderingMode, int aSubProfileStepIndex, int aSegmentIndex, int aSubProfileIndex, int[] aXArray, int[] aYArray)
fillSubProfileStepPolygon
in interface ILcdVVRenderer
fillSubProfileStepPolygon
in class TLcdDefaultVVRenderer
aGraphics
- The graphics to paint on.aState
- Not used yetaRenderingMode
- See constants defined in this interfaceaSubProfileStepIndex
- The segment-index of the subprofile. Can go from zero until
ILcdVVModel.subProfilePointCount(int, int)
- 2.aSegmentIndex
- The segment index within the main-profile.aSubProfileIndex
- The index of the sub-profile.aXArray
- An array of int
that contains the X-values of
the points of the polygon in clockwise direction.aYArray
- An array of int
that contains the Y-values of
the points of the polygon in clockwise direction.public void paintPointLabel(Graphics aGraphics, TLcdVVJPanel aVView, int aPointIndex, int xPos, int yPos)
paintPointLabel
in interface ILcdVVRenderer
paintPointLabel
in class TLcdDefaultVVRenderer
aGraphics
- the graphics to paint label of the point on.xPos
- the X-coordinate of the point.yPos
- the Y-coordinate of the point.public void paintVerticalCursor(Graphics aGraphics, TLcdVVJPanel aVView, int aCurrentXPosition, int aYOffset, int aHeight, int aLeftPointIndex, int aRightPointIndex, int aMouseY, double aRatio)
paintVerticalCursor
in interface ILcdVVRenderer
paintVerticalCursor
in class TLcdDefaultVVRenderer
aGraphics
- the graphics to paint the vertical cursor on.aCurrentXPosition
- The position on aGraphics where the cursor
should be drawn.aYOffset
- The position indicating the top Y position for the cursor.aHeight
- The amount of pixels in the Y dimension.aLeftPointIndex
- The main profile point on the left of the cursor.aRightPointIndex
- The main profile point on the right of the cursor.aMouseY
- The Y value indicating where the mouse was last located
(while dragging of the cursor occurred). Can be useful
for painting the label on the cursor. Will be -1
if no dragging has appeared yet.aRatio
- If the total delta between left and right point is 1, then
this ratio indicates the cursor's new position relative
to the first point.public void setUnknownColor(Color aUnknownColor)
aUnknownColor
- the color to use to display unknown altitudes.getUnknownColor()
public Color getUnknownColor()
setUnknownColor(Color)
protected boolean isValidElevation(double aElevationValue)
false
if the elevation value is Double.NaN
,
Double.POSITIVE_INFINITY
or Double.NEGATIVE_INFINITY
.aElevationValue
- the elevation value to check.