public interface ILcdVVRenderer
TLcdVVJPanel
will delegate all the drawing on the Graphics
to its ILcdVVRenderer
.
Via the method TLcdVVJPanel.setVVModel(ILcdVVModel aNewVVModel)
you set the ILcdVVRenderer
.TLcdDefaultVVRenderer
Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM_LINE
Rendering Mode :
BOTTOM_LINE is used to draw a line that is constituted by invoking
minZ of the points of a sub-profile.
|
static int |
DEFAULT
State :
Is the default state (not selected).
|
static int |
FILLED
Rendering Mode :
FILLED is used to draw filled polygons at each subProfileStepIndex.
|
static int |
LEFT_LINE
Rendering Mode :
LEFT_LINE is used to draw a line that connects the leftmost point of the top line
and the leftmost point of the bottom line.
|
static int |
NO_PAINTING
Rendering Mode :
NO_PAINTING is used to skip a profile for painting.
|
static int |
POLYGON
Rendering Mode :
POLYGON is simply a bit wise OR of TOP_LINE,
BOTTOM_LINE, LEFT_LINE and RIGHT_LINE.
|
static int |
RIGHT_LINE
Rendering Mode :
RIGHT_LINE is used to draw a line that connects the rightmost point of the top line
and the rightmost point of the bottom line.
|
static int |
TOP_LINE
Rendering Mode :
TOP_LINE is used to draw a line that is constituted by invoking
maxZ of the points of a sub-profile.
|
Modifier and Type | Method and Description |
---|---|
void |
drawProfileLine(Graphics aGraphics,
TLcdVVJPanel aVV,
int aState,
int aSegmentIndex,
int aX1,
int aY1,
int aX2,
int aY2)
Draws the line of the main profile that corresponds to the segment with the given index.
|
void |
drawSubProfileLine(Graphics aGraphics,
TLcdVVJPanel aVV,
int aState,
int aRenderingMode,
int aSubProfileStepIndex,
int aSegmentIndex,
int aSubProfileIndex,
int aX1,
int aY1,
int aX2,
int aY2) |
void |
fillSubProfileStepPolygon(Graphics aGraphics,
TLcdVVJPanel aVV,
int aState,
int aRenderingMode,
int aSubProfileStepIndex,
int aSegmentIndex,
int aSubProfileIndex,
int[] aXArray,
int[] aYArray) |
Dimension |
getPointIconDimension(int aPointIndex) |
int |
getRenderingMode() |
int |
getSubProfileRenderingMode(int aSubProfileIndex) |
void |
paintPointIcon(Graphics aGraphics,
TLcdVVJPanel aVV,
int aPointIndex,
int aXPosition,
Rectangle aBounds)
Paints the icon of the point with the given index on the graphics.
|
void |
paintPointLabel(Graphics aGraphics,
TLcdVVJPanel aVerticalView,
int aPointIndex,
int aXPos,
int aYPos)
Used for painting a label when a point is moved over with the mouse.
|
void |
paintVerticalCursor(Graphics aGraphics,
TLcdVVJPanel aVV,
int aCurrentXPosition,
int aYOffset,
int aHeight,
int aLeftPointIndex,
int aRightPointIndex,
int aMouseY,
double aRatio)
Paints the VerticalCursor.
|
void |
paintYAxisParallelLine(Graphics aGraphics,
TLcdVVJPanel aVV,
int aPointIndex,
int aX,
Rectangle aBounds)
Paints a vertical line from the point with the given point index on the main profile to the X-axis.
|
void |
subprofilesPaintEpilogue(Graphics aGraphics)
Is called once per painting cycle.
|
void |
subprofilesPaintPrologue(Graphics aGraphics)
Is called once per painting cycle.
|
static final int DEFAULT
static final int NO_PAINTING
static final int TOP_LINE
static final int BOTTOM_LINE
static final int LEFT_LINE
static final int RIGHT_LINE
static final int FILLED
static final int POLYGON
Dimension getPointIconDimension(int aPointIndex)
aPointIndex
- the point index within the main profile.void paintPointIcon(Graphics aGraphics, TLcdVVJPanel aVV, int aPointIndex, int aXPosition, Rectangle aBounds)
aGraphics
- the graphics to paint the icon on.aVV
- the source object of this call.aPointIndex
- the point index within the main profile.aXPosition
- the X position on the screen for the icon.aBounds
- the location
of this bounds
is positioned on the screen coordinate that has the Y value of the
main profile point's altitude
and the X of the first point on the grid. The width is equal to the
portion between the first X on the grid and the last X on the grid.
The height is equal to the portion between the lowest grid line and
the main profile point.int getRenderingMode()
void drawProfileLine(Graphics aGraphics, TLcdVVJPanel aVV, int aState, int aSegmentIndex, int aX1, int aY1, int aX2, int aY2)
aGraphics
- the graphics to paint the line on.aVV
- the source object of this call.aState
- Not used yetaSegmentIndex
- The segment index within the main-profile.aX1
- the X-coordinate of the start of the line.aY1
- the Y-coordinate of the start of the line.aX2
- the X-coordinate of the end of the line.aY2
- the Y-coordinate of the end of the line.void drawSubProfileLine(Graphics aGraphics, TLcdVVJPanel aVV, int aState, int aRenderingMode, int aSubProfileStepIndex, int aSegmentIndex, int aSubProfileIndex, int aX1, int aY1, int aX2, int aY2)
aGraphics
- the graphics to paint the line of the profile 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.aX1
- the X-coordinate of the start of the line.aY1
- the Y-coordinate of the start of the line.aX2
- the X-coordinate of the end of the line.aY2
- the Y-coordinate of the end of the line.void fillSubProfileStepPolygon(Graphics aGraphics, TLcdVVJPanel aVV, int aState, int aRenderingMode, int aSubProfileStepIndex, int aSegmentIndex, int aSubProfileIndex, int[] aXArray, int[] aYArray)
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.int getSubProfileRenderingMode(int aSubProfileIndex) throws IndexOutOfBoundsException
aSubProfileIndex
- the index of the sub-profile.IndexOutOfBoundsException
void paintPointLabel(Graphics aGraphics, TLcdVVJPanel aVerticalView, int aPointIndex, int aXPos, int aYPos) throws IndexOutOfBoundsException
aGraphics
- the graphics to paint label of the point on.aXPos
- the X-coordinate of the point.aYPos
- the Y-coordinate of the point.IndexOutOfBoundsException
void paintVerticalCursor(Graphics aGraphics, TLcdVVJPanel aVV, int aCurrentXPosition, int aYOffset, int aHeight, int aLeftPointIndex, int aRightPointIndex, int aMouseY, double aRatio)
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.void paintYAxisParallelLine(Graphics aGraphics, TLcdVVJPanel aVV, int aPointIndex, int aX, Rectangle aBounds)
aGraphics
- the graphics to paint onaVV
- the source of this callaPointIndex
- the point index of the main profileaX
- the X position on the screenaBounds
- the location
of this bounds
is positioned on the screen coordinate that has the X of the first point on the grid
and the Y value of altitude of the point with the given index on the main profile.
The width is equal to the portion between the first X on the grid and the last X on the grid.
The height is equal to the portion between the lowest grid line and
the main profile point.void subprofilesPaintPrologue(Graphics aGraphics)
aGraphics
- The Graphics on which the sub profiles will be paintedvoid subprofilesPaintEpilogue(Graphics aGraphics)
aGraphics
- The Graphics on which the sub profiles will be painted