|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.Formatter
public class Formatter
Assists in formatting text for output on the terminal.
Constructor Summary | |
---|---|
Formatter()
Constructor. |
Method Summary | |
---|---|
void |
addEntity(String entName,
String entValue)
Adds an internal entity declaration to this formatter. |
static String |
formatWords(List<String> wordList,
int indent)
Utility method for writing a number of unbreakable words on the terminal. |
String |
formatXML(String xml,
int indent)
Returns a string which is a formatted version of an XML string. |
String |
getManualName()
Returns the text used to refer in formatted output to the STILTS manual. |
void |
setManualName(String name)
Sets the text used to refer in formatted output to the STILTS manual. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Formatter()
Method Detail |
---|
public String formatXML(String xml, int indent) throws SAXException
xml
- XML textindent
- number of spaces to indent every line
SAXException
public void setManualName(String name)
name
- manual reference namepublic String getManualName()
public void addEntity(String entName, String entValue)
formatXML
method.
entName
- internal entity nameentValue
- entity valuepublic static String formatWords(List<String> wordList, int indent)
aaaa bbb cccc d eee ... xxxxxx yy
wordList
- list of wordsindent
- number of spaces to indent lines
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |