Package com.luciad.format.s52
Class TLcdS52Text
java.lang.Object
com.luciad.format.s52.TLcdS52Text
- All Implemented Interfaces:
ILcdS52Text
,ILcdAnchoredIcon
,ILcdIcon
,ILcdCloneable
,Serializable
,Cloneable
Representation of a text element in the S52 domain model.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.clone()
MakesObject.clone()
public.boolean
int
Gets the attribute of this text objectint
Gets the size of the body for this text object.getFont()
Gets the font used by this text objectint
Gets the horizontal justification for this text object.int
Returns the fixed height of the icon.int
Returns the fixed width of the icon.double
Gets the scale factor of this text object.getText()
Gets the string representation of this text objectint
Gets the text group of this textint
Returns the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).int
Gets the vertical justification for this text object.int
Gets the weight for this text.int
Gets the offset for this text object on the x-axisint
Gets the offset for this text object on the y-axisint
hashCode()
void
Draw theILcdIcon
at the specified location.void
setAttribute
(int aAttribute) Sets the attribute of this text objectvoid
setBodySize
(int aBodySize) Sets the size of the body for this text object.void
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 textvoid
setStyle
(int aStyle) Sets the style of this textvoid
Sets the string representation of this text objectvoid
setTextGroup
(int aTextGroup) Sets the text group of this textvoid
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-axisvoid
setYOffset
(int aYOffset) Sets the offset for this text object on the y-axistoString()
-
Field Details
-
HJUST_CENTRE
public static final int HJUST_CENTRE- See Also:
-
HJUST_RIGHT
public static final int HJUST_RIGHT- See Also:
-
HJUST_LEFT
public static final int HJUST_LEFT- See Also:
-
VJUST_BOTTOM
public static final int VJUST_BOTTOM- See Also:
-
VJUST_CENTRE
public static final int VJUST_CENTRE- See Also:
-
VJUST_TOP
public static final int VJUST_TOP- See Also:
-
WEIGHT_LIGHT
public static final int WEIGHT_LIGHT- See Also:
-
WEIGHT_MEDIUM
public static final int WEIGHT_MEDIUM- See Also:
-
WEIGHT_BOLD
public static final int WEIGHT_BOLD- See Also:
-
WIDTH_PLAIN
public static final int WIDTH_PLAIN- See Also:
-
WIDTH_ITALIC
public static final int WIDTH_ITALIC- See Also:
-
TEXT_TYPE_TX
public static final int TEXT_TYPE_TX- See Also:
-
TEXT_TYPE_TE
public static final int TEXT_TYPE_TE- See Also:
-
-
Constructor Details
-
TLcdS52Text
public TLcdS52Text()Creates a new, emptyTLcdS52Text
.
-
-
Method Details
-
clone
Description copied from interface:ILcdCloneable
Makes
When for example extending fromObject.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 ); } }
- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-
setColorProvider
Deprecated.This method should no longer be used.- Parameters:
aColorProvider
-
-
anchorPointSFCT
Description copied from interface:ILcdAnchoredIcon
Updates the given point to the location of the icon's anchor point, in relative coordinates with respect to the top left. The x-coordinate of the anchor point typically lies between 0 and getWidth(). The y-coordinate typically lies between 0 and getHeight().- Specified by:
anchorPointSFCT
in interfaceILcdAnchoredIcon
- Parameters:
aPointSFCT
- the point that has to be moved to the location of the anchor point of this icon.
-
getIconHeight
public int getIconHeight()Description copied from interface:ILcdIcon
Returns the fixed height of the icon.- Specified by:
getIconHeight
in interfaceILcdIcon
- Returns:
- the fixed height of the icon.
-
getIconWidth
public int getIconWidth()Description copied from interface:ILcdIcon
Returns the fixed width of the icon.- Specified by:
getIconWidth
in interfaceILcdIcon
- Returns:
- the fixed width of the icon.
-
paintIcon
Description copied from interface:ILcdIcon
Draw theILcdIcon
at the specified location.ILcdIcon
implementations may use theComponent
argument to get properties useful for painting, e.g. the foreground or background color.- Specified by:
paintIcon
in interfaceILcdIcon
- Parameters:
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.
-
getTextType
public int getTextType()Returns the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).- Returns:
- the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).
-
setTextType
public void setTextType(int aType) Sets the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).- Parameters:
aType
- the text type (TEXT_TYPE_TX or TEXT_TYPE_TE).
-
setAttribute
public void setAttribute(int aAttribute) Sets the attribute of this text object- Parameters:
aAttribute
- the attribute of this text object
-
getAttribute
public int getAttribute()Gets the attribute of this text object- Specified by:
getAttribute
in interfaceILcdS52Text
- Returns:
- the attribute
-
setColor
Sets the color for this text. The given string will be resolved by the color provider.- Parameters:
aColor
- the color to set
-
setHorizontalJustification
public void setHorizontalJustification(int aHorizontalJustification) Sets the horizontal justification for this text object. This can be either HJUST_CENTRE(1), HJUST_RIGHT(2) or HJUST_LEFT(3).- Parameters:
aHorizontalJustification
- the horizontal justification
-
setVerticalJustification
public void setVerticalJustification(int aVerticalJustification) Sets the vertical justification for this text object. This can be either VJUST_BOTTOM(1), VJUST_CENTRE(2) or VJUST_TOP(3).- Parameters:
aVerticalJustification
- the vertical justification
-
setXOffset
public void setXOffset(int aXOffset) Sets the offset for this text object on the x-axis- Parameters:
aXOffset
- the x-axis offset
-
setYOffset
public void setYOffset(int aYOffset) Sets the offset for this text object on the y-axis- Parameters:
aYOffset
- the y-axis offset
-
setSpace
public void setSpace(int aSpace) Sets the spacing of this text- Parameters:
aSpace
- the spacing
-
setBodySize
public void setBodySize(int aBodySize) Sets the size of the body for this text object. The size of the actual font in pixels will depend on a combination of the scale factor and this body size.- Parameters:
aBodySize
- the body size of the text
-
setStyle
public void setStyle(int aStyle) Sets the style of this text- Parameters:
aStyle
- the style of this text
-
setWeight
public void setWeight(int aWeight) Sets the weight for this text. This can be WEIGHT_LIGHT(4), WEIGHT_MEDIUM(5) or WEIGHT_BOLD(6).- Parameters:
aWeight
- the weight of the text
-
setWidth
public void setWidth(int aWidth) Sets the width of the characters in this text. Can be either WIDTH_PLAIN(1) or WIDTH_ITALIC(2)- Parameters:
aWidth
-
-
getText
Gets the string representation of this text object- Returns:
- the string representation of this text object
-
setText
Sets the string representation of this text object- Specified by:
setText
in interfaceILcdS52Text
- Parameters:
aText
- the string representation of this text object
-
getFont
Gets the font used by this text object- Returns:
- the font used by this text object
-
getHorizontalJustification
public int getHorizontalJustification()Gets the horizontal justification for this text object. This can be either HJUST_CENTRE(1), HJUST_RIGHT(2) or HJUST_LEFT(3).- Returns:
- the horizontal justification
-
getVerticalJustification
public int getVerticalJustification()Gets the vertical justification for this text object. This can be either VJUST_BOTTOM(1), VJUST_CENTRE(2) or VJUST_TOP(3).- Returns:
- the vertical justification
-
getXOffset
public int getXOffset()Gets the offset for this text object on the x-axis- Returns:
- the x-axis offset
-
getYOffset
public int getYOffset()Gets the offset for this text object on the y-axis- Returns:
- the y-axis offset
-
getBodySize
public int getBodySize()Gets the size of the body for this text object. The size of the actual font in pixels will depend on a combination of the scale factor and this body size.- Returns:
- the body size of the text
-
getWeight
public int getWeight()Gets the weight for this text. This can be WEIGHT_LIGHT(4), WEIGHT_MEDIUM(5) or WEIGHT_BOLD(6).- Returns:
- the weight of the text
-
getScaleFactor
public double getScaleFactor()Gets the scale factor of this text object. The scale factor determines how much the object is scaled. This value is used primarily to scale text objects to the correct size when using high-dpi devices or prints.- Returns:
- the scale factor
-
setTextGroup
public void setTextGroup(int aTextGroup) Sets the text group of this text- Parameters:
aTextGroup
- the text group
-
getTextGroup
public int getTextGroup()Gets the text group of this text- Specified by:
getTextGroup
in interfaceILcdS52Text
- Returns:
- the text group
-
toString
-
equals
-
hashCode
public int hashCode()
-