public class TLcdEarthSparseIcon extends ALcdEarth2DVectorIcon implements ILcdOriented
ALcdEarth2DVectorIcon.Parameterization
Constructor and Description |
---|
TLcdEarthSparseIcon(ILcdParameterizedIcon aDelegate,
ALcdEarth2DVectorIcon.Parameterization aType,
int aDeltaX,
int aDeltaY,
double aMinimumStrength,
double aMaximumStrength)
Constructs a new sparse icon.
|
Modifier and Type | Method and Description |
---|---|
void |
anchorPointSFCT(double[] aParameters,
Point aPointSFCT)
Returns the anchor point of this icon.
|
int |
getDeltaX()
Returns the horizontal grid spacing at which this icon is painted.
|
int |
getDeltaY()
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 |
getMaximumStrength()
Returns the expected maximum strength.
|
double |
getMinimumStrength()
Returns the minimum strength.
|
double |
getOrientation()
Returns the orientation of this object in degrees.
|
int |
getWidth(double[] aParameters)
Returns the width of the icon for the given parameter values.
|
void |
paintIcon(Graphics aGraphics,
int aX,
int aY,
double[] aParameters)
Paint the icon at the specified location for the parameters
|
void |
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.
|
getAngle, getParameterization, getStrength, setParameterization
public TLcdEarthSparseIcon(ILcdParameterizedIcon aDelegate, ALcdEarth2DVectorIcon.Parameterization aType, int aDeltaX, int aDeltaY, double aMinimumStrength, double aMaximumStrength)
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 strengthpublic int getDeltaX()
TLcdEarthGXYMultivaluedRasterPainter.getDeltaX()
public void setDeltaX(int aDeltaX)
aDeltaX
- the horizontal grid spacing at which this icon is paintedgetDeltaX()
public int getDeltaY()
TLcdEarthGXYMultivaluedRasterPainter.getDeltaY()
public void setDeltaY(int aDeltaY)
aDeltaY
- the vertical grid spacing at which this icon is paintedgetDeltaY()
public double getMinimumStrength()
public void setMinimumStrength(double aMinimumStrength)
aMinimumStrength
- the minimum strengthgetMinimumStrength()
public double getMaximumStrength()
public void setMaximumStrength(double aMaximumStrength)
aMaximumStrength
- the expected maximum strengthgetMaximumStrength()
public int getWidth(double[] aParameters)
ILcdParameterizedIcon
getWidth
in interface ILcdParameterizedIcon
aParameters
- the parameter values as passed in ILcdParameterizedIcon.paintIcon(java.awt.Graphics, int, int, double[])
public int getHeight(double[] aParameters)
ILcdParameterizedIcon
getHeight
in interface ILcdParameterizedIcon
aParameters
- the parameter values as passed in ILcdParameterizedIcon.paintIcon(java.awt.Graphics, int, int, double[])
public void paintIcon(Graphics aGraphics, int aX, int aY, double[] aParameters)
ILcdParameterizedIcon
paintIcon
in interface ILcdParameterizedIcon
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 valuespublic void anchorPointSFCT(double[] aParameters, Point aPointSFCT)
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 the paint
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.
anchorPointSFCT
in interface ILcdParameterizedIcon
anchorPointSFCT
in class ALcdEarthParameterizedIcon
aParameters
- the parameter valuesaPointSFCT
- the point that has to be moved to the location of the anchor point
of this icon.public double getOrientation()
ILcdOriented
If there is no rotation known for this object, return Double.NaN
.
getOrientation
in interface ILcdOriented
NaN
if undefined.