Class MultiLineStringUtil
java.lang.Object
com.inductiveautomation.ignition.common.util.gui.MultiLineStringUtil
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic String[]toMultiLineByChar(String s, int max) Helper function to format string by characters.static String[]toMultiLineByWord(String s, int max) Helper function to format string by words.static String[]Convert a string to a multi line tooltip string using the default max character per line and max lines.static String[]toMultiLineStringFormat(String s, boolean formatByWord) Convert a string to a multi line tooltip string using the default max character per line and max lines.static String[]toMultiLineStringFormat(String s, int max, int maxLines, boolean formatByWord) Convert a string to a multi line tooltip string given a max character per line
- 
Constructor Details- 
MultiLineStringUtilpublic MultiLineStringUtil()
 
- 
- 
Method Details- 
toMultiLineStringFormatConvert a string to a multi line tooltip string using the default max character per line and max lines. By default it will format by word.- Parameters:
- s- String to be formatted
- Returns:
- String array to be displayed
 
- 
toMultiLineStringFormatConvert a string to a multi line tooltip string using the default max character per line and max lines.- Parameters:
- s- String to be formatted
- formatByWord- formatted by word by default, set to false to format by character
- Returns:
- String array to be displayed
 
- 
toMultiLineStringFormatpublic static String[] toMultiLineStringFormat(String s, int max, int maxLines, boolean formatByWord) Convert a string to a multi line tooltip string given a max character per line- Parameters:
- s- String to be formatted
- max- Max characters per line. Spaces COUNT towards the max.
- maxLines- Max number of lines. Use -1 (or any number less than 0) for indefinite number of lines.
- formatByWord- boolean to determine whether to format by word or by character
- Returns:
- String array to be displayed
 
- 
toMultiLineByWordHelper function to format string by words. DOES NOT take into account new lines.- Parameters:
- s- String to be formatted
- max- Max characters per line. Spaces COUNT towards the max.
- Returns:
- String array formatted by word
 
- 
toMultiLineByCharHelper function to format string by characters. DOES NOT take into account new lines.- Parameters:
- s- String to be formatted
- max- Max characters per line. Spaces COUNT towards the max.
- Returns:
- String array formatted by characters
 
 
-