Class TLcdNumericParameterizedIcon
- All Implemented Interfaces:
ILcdParameterizedIcon
ILcdParameterizedIcon displays numbers, based on the first value in the array of parameters.- Since:
- 2015.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidanchorPointSFCT(double[] aParameters, Point aPointSFCT) Returns the anchor point of this icon.getColor()Gets the color of the numbers.getFont()Gets the font of the numbers.Gets the format for the numbers.intgetHeight(double[] aParameters) Returns the height of the icon for the given parameter values.intgetWidth(double[] aParameters) Returns the width of the icon for the given parameter values.voidPaint the icon at the specified location for the parametersvoidSets the color of the numbers.voidSets the font of the numbers.voidSets the format for the numbers.
-
Constructor Details
-
TLcdNumericParameterizedIcon
public TLcdNumericParameterizedIcon()Default constructor
-
-
Method Details
-
getFont
Gets the font of the numbers.- Returns:
- The font of the numbers.
- See Also:
-
setFont
Sets the font of the numbers.- Parameters:
aFont- The font of the numbers.- See Also:
-
getColor
Gets the color of the numbers.- Returns:
- The color of the numbers.
- See Also:
-
setColor
Sets the color of the numbers.- Parameters:
aColor- The color of the numbers.- See Also:
-
getFormat
Gets the format for the numbers.- Returns:
- The format for the numbers.
- See Also:
-
setFormat
Sets the format for the numbers.- Parameters:
aFormat- The format for the numbers.- See Also:
-
anchorPointSFCT
Description copied from interface:ILcdParameterizedIconReturns 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
paintIconmethod. The coordinates passed to that method always represent the top left corner of the icon. Callers of thepaintmethod 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);- Specified by:
anchorPointSFCTin interfaceILcdParameterizedIcon- Parameters:
aParameters- the parameter valuesaPointSFCT- the point that has to be moved to the location of the anchor point of this icon.
-
paintIcon
Description copied from interface:ILcdParameterizedIconPaint the icon at the specified location for the parameters- Specified by:
paintIconin interfaceILcdParameterizedIcon- Parameters:
aGraphics- the Graphics on which the icon is paintedaX- the x coordinate at which the icon is painted.aXis the x-coordinate of the top left corner point of the icon.aY- the y coordinate at which the icon is painted.aYis the y-coordinate of the top left corner point of the icon.aParameters- the parameter values
-
getWidth
public int getWidth(double[] aParameters) Description copied from interface:ILcdParameterizedIconReturns the width of the icon for the given parameter values.- Specified by:
getWidthin 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:ILcdParameterizedIconReturns the height of the icon for the given parameter values.- Specified by:
getHeightin interfaceILcdParameterizedIcon- Parameters:
aParameters- the parameter values as passed inILcdParameterizedIcon.paintIcon(java.awt.Graphics, int, int, double[])- Returns:
- the height
-