Package com.luciad.view.vertical
Class TLcdDefaultVVGridRenderer
java.lang.Object
com.luciad.view.vertical.TLcdDefaultVVGridRenderer
- All Implemented Interfaces:
ILcdVVGridRenderer
This class is a default implementation of
ILcdVVGridRenderer
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
int
getOrdinateLabelWidth
(double aMinOrdinateAlt, double aMaxOrdinateAlt, double aOrdinateStep, Graphics aGraphics) Returns the width that fits the ordinate labels using the given minimum and maximum altitude ordinates, ordinate step and graphics.boolean
Returns whether to use anti-aliasing when painting.boolean
void
paintGridLine
(Graphics aGraphics, int aX1, int aY1, int aX2, int aY2) Performs the rendering of a grid-line on the given Graphics.void
paintOrdinateLabel
(double aValue, double aStep, Graphics aGraphics, int aX, int aY, int aWidth) Performs the rendering of a grid-label on the given Graphics.void
paintSubGridLine
(Graphics aGraphics, int aX1, int aY1, int aX2, int aY2) Performs the rendering of a subgrid-line on the given Graphics.void
setAltitudeUnit
(TLcdAltitudeUnit aAltitudeUnit) void
setAntiAliasing
(boolean aAntiAliasing) Sets whether to use anti-aliasing when painting.void
setGridColor
(Color aColor) This methods sets theColor
used for painting the main-grid.void
setGridLabelColor
(Color aColor) This methods will set theColor
to use for painting the grid-label.void
setGridLabelFont
(Font aFont) Sets theFont
that should be uses when painting the grid-labels.void
setShowUnit
(boolean aShowUnit) void
setSubGridColor
(Color aColor) This methods sets theColor
used for painting the sub-grid.
-
Constructor Details
-
TLcdDefaultVVGridRenderer
public TLcdDefaultVVGridRenderer()
-
-
Method Details
-
setGridColor
This methods sets theColor
used for painting the main-grid. -
getFontHeight
public int getFontHeight()- Specified by:
getFontHeight
in interfaceILcdVVGridRenderer
- Returns:
- the font size used for the labels of the grid.
-
getGridColor
- See Also:
-
setSubGridColor
This methods sets theColor
used for painting the sub-grid. -
getSubGridColor
- See Also:
-
setGridLabelFont
Sets theFont
that should be uses when painting the grid-labels. -
getGridLabelFont
- See Also:
-
getGridLabelColor
- See Also:
-
setGridLabelColor
This methods will set theColor
to use for painting the grid-label. -
isAntiAliasing
public boolean isAntiAliasing()Returns whether to use anti-aliasing when painting.- Returns:
- whether to use anti-aliasing when painting
- See Also:
-
setAntiAliasing
public void setAntiAliasing(boolean aAntiAliasing) Sets whether to use anti-aliasing when painting.- Parameters:
aAntiAliasing
- iftrue
, uses anti-aliasing when painting- See Also:
-
paintSubGridLine
Description copied from interface:ILcdVVGridRenderer
Performs the rendering of a subgrid-line on the given Graphics.- Specified by:
paintSubGridLine
in interfaceILcdVVGridRenderer
-
paintGridLine
Description copied from interface:ILcdVVGridRenderer
Performs the rendering of a grid-line on the given Graphics.- Specified by:
paintGridLine
in interfaceILcdVVGridRenderer
-
paintOrdinateLabel
public void paintOrdinateLabel(double aValue, double aStep, Graphics aGraphics, int aX, int aY, int aWidth) Description copied from interface:ILcdVVGridRenderer
Performs the rendering of a grid-label on the given Graphics.- Specified by:
paintOrdinateLabel
in interfaceILcdVVGridRenderer
- Parameters:
aValue
- The value to paint.aStep
- How big is the step between each grid-line ( model values )aX
- The screen's X-position.aY
- The screen's Y-position (of the grid-line).aWidth
- The amount of width available for the label.
-
getOrdinateLabelWidth
public int getOrdinateLabelWidth(double aMinOrdinateAlt, double aMaxOrdinateAlt, double aOrdinateStep, Graphics aGraphics) Returns the width that fits the ordinate labels using the given minimum and maximum altitude ordinates, ordinate step and graphics.- Specified by:
getOrdinateLabelWidth
in interfaceILcdVVGridRenderer
- Parameters:
aMinOrdinateAlt
- the minimum altitudeaMaxOrdinateAlt
- the maximum altitudeaOrdinateStep
- the step size between the altitudesaGraphics
- the graphics for which to paint the labels- Returns:
- a width fitting the altitude ordinates
-
getAltitudeUnit
-
setAltitudeUnit
-
isShowUnit
public boolean isShowUnit() -
setShowUnit
public void setShowUnit(boolean aShowUnit)
-