Class TLcdEarthSparseIcon
- All Implemented Interfaces:
ILcdParameterizedIcon
,ILcdOriented
- Since:
- 10.1
-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.earth.view.gxy.util.ALcdEarth2DVectorIcon
ALcdEarth2DVectorIcon.Parameterization
-
Constructor Summary
ConstructorDescriptionTLcdEarthSparseIcon
(ILcdParameterizedIcon aDelegate, ALcdEarth2DVectorIcon.Parameterization aType, int aDeltaX, int aDeltaY, double aMinimumStrength, double aMaximumStrength) Constructs a new sparse icon. -
Method Summary
Modifier and TypeMethodDescriptionvoid
anchorPointSFCT
(double[] aParameters, Point aPointSFCT) Returns the anchor point of this icon.int
Returns the horizontal grid spacing at which this icon is painted.int
Returns the vertical grid spacing at which this icon is painted.int
getHeight
(double[] aParameters) Returns the height of the icon for the given parameter values.double
Returns the expected maximum strength.double
Returns the minimum strength.double
Returns the orientation of this object in degrees.int
getWidth
(double[] aParameters) Returns the width of the icon for the given parameter values.void
Paint the icon at the specified location for the parametersvoid
setDeltaX
(int aDeltaX) Sets the horizontal grid spacing at which this icon is painted.void
setDeltaY
(int aDeltaY) Sets the vertical grid spacing at which this icon is painted.void
setMaximumStrength
(double aMaximumStrength) Sets the expected maximum strength.void
setMinimumStrength
(double aMinimumStrength) Sets the minimum strength.Methods inherited from class com.luciad.earth.view.gxy.util.ALcdEarth2DVectorIcon
getAngle, getParameterization, getStrength, setParameterization
-
Constructor Details
-
TLcdEarthSparseIcon
public TLcdEarthSparseIcon(ILcdParameterizedIcon aDelegate, ALcdEarth2DVectorIcon.Parameterization aType, int aDeltaX, int aDeltaY, double aMinimumStrength, double aMaximumStrength) Constructs a new sparse icon.- Parameters:
aDelegate
- the icon to paint sparselyaType
- the parameterization typeaDeltaX
- the horizontal grid spacing at which this icon is paintedaDeltaY
- the vertical grid spacing at which this icon is paintedaMinimumStrength
- the minimum strengthaMaximumStrength
- the expected maximum strength
-
-
Method Details
-
getDeltaX
public int getDeltaX()Returns the horizontal grid spacing at which this icon is painted.- Returns:
- the horizontal grid spacing at which this icon is painted
- See Also:
-
setDeltaX
public void setDeltaX(int aDeltaX) Sets the horizontal grid spacing at which this icon is painted.- Parameters:
aDeltaX
- the horizontal grid spacing at which this icon is painted- See Also:
-
getDeltaY
public int getDeltaY()Returns the vertical grid spacing at which this icon is painted.- Returns:
- the vertical grid spacing at which this icon is painted
- See Also:
-
setDeltaY
public void setDeltaY(int aDeltaY) Sets the vertical grid spacing at which this icon is painted.- Parameters:
aDeltaY
- the vertical grid spacing at which this icon is painted- See Also:
-
getMinimumStrength
public double getMinimumStrength()Returns the minimum strength. Icons with a strength equal to or lower than the minimum strength are never painted.- Returns:
- the minimum strength
-
setMinimumStrength
public void setMinimumStrength(double aMinimumStrength) Sets the minimum strength.- Parameters:
aMinimumStrength
- the minimum strength- See Also:
-
getMaximumStrength
public double getMaximumStrength()Returns the expected maximum strength. Icons with a strength larger than the maximum strength are always painted.- Returns:
- the expected maximum strength
-
setMaximumStrength
public void setMaximumStrength(double aMaximumStrength) Sets the expected maximum strength.- Parameters:
aMaximumStrength
- the expected maximum strength- See Also:
-
getWidth
public int getWidth(double[] aParameters) Description copied from interface:ILcdParameterizedIcon
Returns the width of the icon for the given parameter values.- Specified by:
getWidth
in interfaceILcdParameterizedIcon
- Parameters:
aParameters
- the parameter values as passed inILcdParameterizedIcon.paintIcon(java.awt.Graphics, int, int, double[])
- Returns:
- the width
-
getHeight
public int getHeight(double[] aParameters) Description copied from interface:ILcdParameterizedIcon
Returns the height of the icon for the given parameter values.- Specified by:
getHeight
in interfaceILcdParameterizedIcon
- Parameters:
aParameters
- the parameter values as passed inILcdParameterizedIcon.paintIcon(java.awt.Graphics, int, int, double[])
- Returns:
- the height
-
paintIcon
Description copied from interface:ILcdParameterizedIcon
Paint the icon at the specified location for the parameters- Specified by:
paintIcon
in interfaceILcdParameterizedIcon
- Parameters:
aGraphics
- the Graphics on which the icon is paintedaX
- the x coordinate at which the icon is painted.aX
is the x-coordinate of the top left corner point of the icon.aY
- the y coordinate at which the icon is painted.aY
is the y-coordinate of the top left corner point of the icon.aParameters
- the parameter values
-
anchorPointSFCT
Description copied from class:ALcdEarthParameterizedIcon
Returns the anchor point of this icon. The anchor point of an icon is the point on the icon that is attached to the underlying object. For example: a circle icon is attached to an underlying point object by its center. An arrow icon can for example be attached to its object at the start of the arrow. The x-coordinate of the anchor point typically lies between 0 and getWidth(). The y-coordinate typically lies between 0 and getHeight().
Note that implementations don't need to take the anchor point into account when implementing the
paintIcon
method. The coordinates passed to that method always represent the top left corner of the icon. Callers of thepaint
method should make sure that the anchor point is taken into account.A good default implementation can be to use the middle of the icon:
aPointSFCT.setLocation(getWidth(aParameters) / 2, getHeight(aParameters) / 2);
This method implementation provides a default anchor point: (width/2, height/2). Override this method to provide an other anchor point.
- Specified by:
anchorPointSFCT
in interfaceILcdParameterizedIcon
- Overrides:
anchorPointSFCT
in classALcdEarthParameterizedIcon
- Parameters:
aParameters
- the parameter valuesaPointSFCT
- the point that has to be moved to the location of the anchor point of this icon.
-
getOrientation
public double getOrientation()Description copied from interface:ILcdOriented
Returns the orientation of this object in degrees. The orientation should be interpreted as a clockwise angle in degrees starting from 12 o'clock.If there is no rotation known for this object, return
Double.NaN
.- Specified by:
getOrientation
in interfaceILcdOriented
- Returns:
- the orientation of this object in degrees, or
NaN
if undefined.
-