Interface ILcdVVRenderer

All Known Implementing Classes:
TLcdDefaultVVRenderer, TLcdDefaultVVRendererJ2D, TLcdVVTerrainProfileRenderer

public interface ILcdVVRenderer
The TLcdVVJPanel will delegate all the drawing on the Graphics to its ILcdVVRenderer. Via the method TLcdVVJPanel.setVVModel(ILcdVVModel aNewVVModel) you set the ILcdVVRenderer.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Rendering Mode : BOTTOM_LINE is used to draw a line that is constituted by invoking minZ of the points of a sub-profile.
    static final int
    State : Is the default state (not selected).
    static final int
    Rendering Mode : FILLED is used to draw filled polygons at each subProfileStepIndex.
    static final int
    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 final int
    Rendering Mode : NO_PAINTING is used to skip a profile for painting.
    static final int
    Rendering Mode : POLYGON is simply a bit wise OR of TOP_LINE, BOTTOM_LINE, LEFT_LINE and RIGHT_LINE.
    static final int
    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 final int
    Rendering Mode : TOP_LINE is used to draw a line that is constituted by invoking maxZ of the points of a sub-profile.
  • Method Summary

    Modifier and Type
    Method
    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)
     
    getPointIconDimension(int aPointIndex)
     
    int
     
    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
    Is called once per painting cycle.
    void
    Is called once per painting cycle.
  • Field Details

    • DEFAULT

      static final int DEFAULT
      State : Is the default state (not selected).
      See Also:
    • NO_PAINTING

      static final int NO_PAINTING
      Rendering Mode : NO_PAINTING is used to skip a profile for painting.
      See Also:
    • TOP_LINE

      static final 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.
      See Also:
    • BOTTOM_LINE

      static final 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.
      See Also:
    • LEFT_LINE

      static final 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.
      See Also:
    • RIGHT_LINE

      static final 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.
      See Also:
    • FILLED

      static final int FILLED
      Rendering Mode : FILLED is used to draw filled polygons at each subProfileStepIndex. It can be seen as a combination of BOTTOM and TOP line, with the space in-between the two lines filled.
      See Also:
    • POLYGON

      static final int POLYGON
      Rendering Mode : POLYGON is simply a bit wise OR of TOP_LINE, BOTTOM_LINE, LEFT_LINE and RIGHT_LINE.
      See Also:
  • Method Details

    • getPointIconDimension

      Dimension getPointIconDimension(int aPointIndex)
      Parameters:
      aPointIndex - the point index within the main profile.
      Returns:
      The dimension of the icon, null if no icon is available
    • paintPointIcon

      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.
      Parameters:
      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.
    • getRenderingMode

      int getRenderingMode()
      Returns:
      Returns the mode in which the main profile should be drawn only NO_PAINTING and TOP_LINE are considered valid.
    • drawProfileLine

      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.
      Parameters:
      aGraphics - the graphics to paint the line on.
      aVV - the source object of this call.
      aState - Not used yet
      aSegmentIndex - 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.
    • drawSubProfileLine

      void drawSubProfileLine(Graphics aGraphics, TLcdVVJPanel aVV, int aState, int aRenderingMode, int aSubProfileStepIndex, int aSegmentIndex, int aSubProfileIndex, int aX1, int aY1, int aX2, int aY2)
      Parameters:
      aGraphics - the graphics to paint the line of the profile on.
      aState - Not used yet
      aRenderingMode - See constants defined in this interface
      aSubProfileStepIndex - 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.
    • fillSubProfileStepPolygon

      void fillSubProfileStepPolygon(Graphics aGraphics, TLcdVVJPanel aVV, int aState, int aRenderingMode, int aSubProfileStepIndex, int aSegmentIndex, int aSubProfileIndex, int[] aXArray, int[] aYArray)
      Parameters:
      aGraphics - the graphics to paint on.
      aState - Not used yet
      aRenderingMode - See constants defined in this interface
      aSubProfileStepIndex - 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.
    • getSubProfileRenderingMode

      int getSubProfileRenderingMode(int aSubProfileIndex) throws IndexOutOfBoundsException
      Parameters:
      aSubProfileIndex - the index of the sub-profile.
      Returns:
      Returns the mode in which the specified sub-profile should be drawn.
      Throws:
      IndexOutOfBoundsException
    • paintPointLabel

      void paintPointLabel(Graphics aGraphics, TLcdVVJPanel aVerticalView, int aPointIndex, int aXPos, int aYPos) throws IndexOutOfBoundsException
      Used for painting a label when a point is moved over with the mouse. Only points on the main profile will be processed. Notice that the user needs to paint the label himself.
      Parameters:
      aGraphics - the graphics to paint label of the point on.
      aXPos - the X-coordinate of the point.
      aYPos - the Y-coordinate of the point.
      Throws:
      IndexOutOfBoundsException
    • paintVerticalCursor

      void paintVerticalCursor(Graphics aGraphics, TLcdVVJPanel aVV, int aCurrentXPosition, int aYOffset, int aHeight, int aLeftPointIndex, int aRightPointIndex, int aMouseY, double aRatio)
      Paints the VerticalCursor.
      Parameters:
      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.
    • paintYAxisParallelLine

      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.
      Parameters:
      aGraphics - the graphics to paint on
      aVV - the source of this call
      aPointIndex - the point index of the main profile
      aX - the X position on the screen
      aBounds - 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.
    • subprofilesPaintPrologue

      void subprofilesPaintPrologue(Graphics aGraphics)
      Is called once per painting cycle. It is called, as it name indicates, just before the sub profiles are rendered.
      Parameters:
      aGraphics - The Graphics on which the sub profiles will be painted
    • subprofilesPaintEpilogue

      void subprofilesPaintEpilogue(Graphics aGraphics)
      Is called once per painting cycle. It is called, as it name indicates, just after the sub profiles are rendered.
      Parameters:
      aGraphics - The Graphics on which the sub profiles will be painted