public class TLcdS52Text extends Object implements ILcdS52Text, Cloneable, ILcdAnchoredIcon
Modifier and Type | Field and Description |
---|---|
static int |
HJUST_CENTRE |
static int |
HJUST_LEFT |
static int |
HJUST_RIGHT |
static int |
TEXT_TYPE_TE |
static int |
TEXT_TYPE_TX |
static int |
VJUST_BOTTOM |
static int |
VJUST_CENTRE |
static int |
VJUST_TOP |
static int |
WEIGHT_BOLD |
static int |
WEIGHT_LIGHT |
static int |
WEIGHT_MEDIUM |
static int |
WIDTH_ITALIC |
static int |
WIDTH_PLAIN |
Constructor and Description |
---|
TLcdS52Text()
Creates a new, empty
TLcdS52Text . |
Modifier and Type | Method and Description |
---|---|
void |
anchorPointSFCT(Point aPointSFCT)
Updates the given point to the location of the icon's anchor point, in relative coordinates with respect to the top left.
|
Object |
clone()
Makes
Object.clone() public. |
boolean |
equals(Object o) |
int |
getAttribute()
Gets the attribute of this text object
|
int |
getBodySize()
Gets the size of the body for this text object.
|
Font |
getFont()
Gets the font used by this text object
|
int |
getHorizontalJustification()
Gets the horizontal justification for this text object.
|
int |
getIconHeight()
Returns the fixed height of the icon.
|
int |
getIconWidth()
Returns the fixed width of the icon.
|
double |
getScaleFactor()
Gets the scale factor of this text object.
|
String |
getText()
Gets the string representation of this text object
|
int |
getTextGroup()
Gets the text group of this text
|
int |
getTextType()
Returns the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).
|
int |
getVerticalJustification()
Gets the vertical justification for this text object.
|
int |
getWeight()
Gets the weight for this text.
|
int |
getXOffset()
Gets the offset for this text object on the x-axis
|
int |
getYOffset()
Gets the offset for this text object on the y-axis
|
int |
hashCode() |
void |
paintIcon(Component aComponent,
Graphics aGraphics,
int aX,
int aY)
Draw the
ILcdIcon at the specified location. |
void |
setAttribute(int aAttribute)
Sets the attribute of this text object
|
void |
setBodySize(int aBodySize)
Sets the size of the body for this text object.
|
void |
setColor(String aColor)
Sets the color for this text.
|
static void |
setColorProvider(ILcdS52ColorProvider aColorProvider)
Deprecated.
This method should no longer be used.
|
void |
setHorizontalJustification(int aHorizontalJustification)
Sets the horizontal justification for this text object.
|
void |
setSpace(int aSpace)
Sets the spacing of this text
|
void |
setStyle(int aStyle)
Sets the style of this text
|
void |
setText(String aText)
Sets the string representation of this text object
|
void |
setTextGroup(int aTextGroup)
Sets the text group of this text
|
void |
setTextType(int aType)
Sets the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).
|
void |
setVerticalJustification(int aVerticalJustification)
Sets the vertical justification for this text object.
|
void |
setWeight(int aWeight)
Sets the weight for this text.
|
void |
setWidth(int aWidth)
Sets the width of the characters in this text.
|
void |
setXOffset(int aXOffset)
Sets the offset for this text object on the x-axis
|
void |
setYOffset(int aYOffset)
Sets the offset for this text object on the y-axis
|
String |
toString() |
public static final int HJUST_CENTRE
public static final int HJUST_RIGHT
public static final int HJUST_LEFT
public static final int VJUST_BOTTOM
public static final int VJUST_CENTRE
public static final int VJUST_TOP
public static final int WEIGHT_LIGHT
public static final int WEIGHT_MEDIUM
public static final int WEIGHT_BOLD
public static final int WIDTH_PLAIN
public static final int WIDTH_ITALIC
public static final int TEXT_TYPE_TX
public static final int TEXT_TYPE_TE
public Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()
public static void setColorProvider(ILcdS52ColorProvider aColorProvider)
aColorProvider
- public void anchorPointSFCT(Point aPointSFCT)
ILcdAnchoredIcon
anchorPointSFCT
in interface ILcdAnchoredIcon
aPointSFCT
- the point that has to be moved to the location of the anchor point
of this icon.public int getIconHeight()
ILcdIcon
getIconHeight
in interface ILcdIcon
public int getIconWidth()
ILcdIcon
getIconWidth
in interface ILcdIcon
public void paintIcon(Component aComponent, Graphics aGraphics, int aX, int aY)
ILcdIcon
ILcdIcon
at the specified location. ILcdIcon
implementations
may use the Component
argument to get properties useful for
painting, e.g. the foreground or background color.paintIcon
in interface ILcdIcon
aComponent
- a Component to retrieve properties from.aGraphics
- the Graphics on which the icon will be painted.aX
- the x position where the icon will be painted. x is the first coordinate of the top left
corner point of the icon.aY
- the y position where the icon will be painted. y is the second coordinate of the top left
corner point of the icon.public int getTextType()
public void setTextType(int aType)
aType
- the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).public void setAttribute(int aAttribute)
aAttribute
- the attribute of this text objectpublic int getAttribute()
getAttribute
in interface ILcdS52Text
public void setColor(String aColor)
aColor
- the color to setpublic void setHorizontalJustification(int aHorizontalJustification)
aHorizontalJustification
- the horizontal justificationpublic void setVerticalJustification(int aVerticalJustification)
aVerticalJustification
- the vertical justificationpublic void setXOffset(int aXOffset)
aXOffset
- the x-axis offsetpublic void setYOffset(int aYOffset)
aYOffset
- the y-axis offsetpublic void setSpace(int aSpace)
aSpace
- the spacingpublic void setBodySize(int aBodySize)
aBodySize
- the body size of the textpublic void setStyle(int aStyle)
aStyle
- the style of this textpublic void setWeight(int aWeight)
aWeight
- the weight of the textpublic void setWidth(int aWidth)
aWidth
- public String getText()
public void setText(String aText)
setText
in interface ILcdS52Text
aText
- the string representation of this text objectpublic Font getFont()
public int getHorizontalJustification()
public int getVerticalJustification()
public int getXOffset()
public int getYOffset()
public int getBodySize()
public int getWeight()
public double getScaleFactor()
public void setTextGroup(int aTextGroup)
aTextGroup
- the text grouppublic int getTextGroup()
getTextGroup
in interface ILcdS52Text