Class TextToken
- java.lang.Object
-
- com.inductiveautomation.rm.base.RMListenerList
-
- com.inductiveautomation.rm.base.RMObject
-
- com.inductiveautomation.snap.text.TextRect
-
- com.inductiveautomation.snap.text.TextToken
-
- All Implemented Interfaces:
RMPropertyChanger
,java.lang.Cloneable
public class TextToken extends TextRect
A class to represent a group of characters in a line that share a set of attributes.
-
-
Constructor Summary
Constructors Constructor Description TextToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getBaselineY()
Returns the y position for this run (in the same coords as the layout frame).SnapColor
getColor()
Returns the color for this token.int
getEnd()
Returns the end character position of this token in line.SnapFont
getFont()
Returns the font for this token.TextLine
getLine()
Returns the line.TextLink
getLink()
Returns the token's link.TextRun
getRun()
Returns the run associated with this token.int
getScripting()
Returns the run's scripting.int
getStart()
Returns the start character position of this token in line.java.lang.String
getString()
Returns the token string.double
getY()
Override to get Y from line.TextToken
init(TextLine aLine, TextRun aRun, int aStart, int anEnd)
Initializes a new token for given line, start and end.boolean
isUnderlined()
Returns whether this run is underlined.void
setColor(SnapColor aColor)
Sets the color for this token.void
setUnderlined(boolean aValue)
Sets whether this run is underlined.java.lang.String
toString()
Standard toString implementation.-
Methods inherited from class com.inductiveautomation.snap.text.TextRect
getHeight, getMaxX, getMaxY, getWidth, getX, setHeight, setRect, setSize, setWidth, setX, setY
-
Methods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
-
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
-
-
-
Method Detail
-
init
public TextToken init(TextLine aLine, TextRun aRun, int aStart, int anEnd)
Initializes a new token for given line, start and end.
-
getLine
public TextLine getLine()
Returns the line.
-
getStart
public int getStart()
Returns the start character position of this token in line.
-
getEnd
public int getEnd()
Returns the end character position of this token in line.
-
getString
public java.lang.String getString()
Returns the token string.
-
getRun
public TextRun getRun()
Returns the run associated with this token.
-
getFont
public SnapFont getFont()
Returns the font for this token.
-
getColor
public SnapColor getColor()
Returns the color for this token.
-
setColor
public void setColor(SnapColor aColor)
Sets the color for this token.
-
isUnderlined
public boolean isUnderlined()
Returns whether this run is underlined.
-
setUnderlined
public void setUnderlined(boolean aValue)
Sets whether this run is underlined.
-
getScripting
public int getScripting()
Returns the run's scripting.
-
getLink
public TextLink getLink()
Returns the token's link.
-
getBaselineY
public double getBaselineY()
Returns the y position for this run (in the same coords as the layout frame).
-
-