Class TextUtils
java.lang.Object
com.inductiveautomation.snap.text.TextUtils
Text Utilities.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.inductiveautomation.rm.base.RMTypes
RMTypes.Align, RMTypes.AlignX, RMTypes.AlignY
Nested classes/interfaces inherited from interface com.inductiveautomation.snap.text.TextTypes
TextTypes.TabType
-
Field Summary
Fields inherited from interface com.inductiveautomation.snap.text.TextTypes
TEXT_CHAR_SPACING, TEXT_COLOR, TEXT_FONT, TEXT_FORMAT, TEXT_LINK, TEXT_OUTLINE, TEXT_SCRIPTING, TEXT_UNDERLINE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
getAttributeKey
(Object anAttr) Returns the most likely key for a given attribute.static Map
getAttributes
(Object... theAttrs) Returns an attribute map for given attributes.static int
getUnderlineStyle
(Map attrs) Returns the underline style of this run.static int
indexAfterNewline
(CharSequence aSequence, int aStart) Returns the index just beyond next newline (or carriage-return/newline) in given char sequence starting at given char index.static int
indexOfNewline
(CharSequence aSequence, int aStart) Returns the index of the next newline (or carriage-return/newline) in given char sequence starting at given char index.static boolean
isAfterLineEnd
(CharSequence aSequence, int anIndex) Returns whether the index in the given char sequence is at just after a line end.static boolean
isLineEnd
(CharSequence aSequence, int anIndex) Returns whether the index in the given char sequence is at a line end.static boolean
isNewlineChar
(CharSequence aSequence, int anIndex) Returns whether a char is a newline char.static boolean
isUnderlined
(Map attrs) Returns whether this run is underlined.static int
lastIndexAfterNewline
(CharSequence aSequence, int aStart) Returns the index just beyond previous newline (or carriage-return/newline) in given char sequence starting at given char index.static int
lastIndexOfNewline
(CharSequence aSequence, int aStart) Returns the index of the previous newline (or carriage-return/newline) in given char sequence starting at given char index.
-
Constructor Details
-
TextUtils
public TextUtils()
-
-
Method Details
-
indexOfNewline
Returns the index of the next newline (or carriage-return/newline) in given char sequence starting at given char index. -
indexAfterNewline
Returns the index just beyond next newline (or carriage-return/newline) in given char sequence starting at given char index. -
lastIndexOfNewline
Returns the index of the previous newline (or carriage-return/newline) in given char sequence starting at given char index. -
lastIndexAfterNewline
Returns the index just beyond previous newline (or carriage-return/newline) in given char sequence starting at given char index. -
isLineEnd
Returns whether the index in the given char sequence is at a line end. -
isAfterLineEnd
Returns whether the index in the given char sequence is at just after a line end. -
isNewlineChar
Returns whether a char is a newline char. -
isUnderlined
Returns whether this run is underlined. -
getUnderlineStyle
Returns the underline style of this run. -
getAttributes
Returns an attribute map for given attributes. -
getAttributeKey
Returns the most likely key for a given attribute.
-