Package edu.wisc.game.formatter
Class Fmter
- java.lang.Object
-
- edu.wisc.game.formatter.Fmter
-
-
Constructor Summary
Constructors Constructor Description Fmter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringa(String url, String text)Stringa(String url, String text, String extraClauses)Stringbr()StringbrHtml()Generates a BR in HTML mode, and a space otherwise.Stringbutton(String text)Stringcode(String text)Stringcolored(String color, String text)Stringei(String text)Font emphasis for texts that are "CHEETA inference"Stringem(String text)Stringh1(String text)Stringh2(String text)Stringh3(String text)Stringh4(String text)Stringh5(String text)Stringhr()StringhrThin()Stringhtml(String title, String body)Stringhtml2(String head, String body)Stringpara(String text)StringparaEi(String text)Stringpre(String text)Stringrow(String... cols)Generates a table row (a TR element).Stringrow(Vector<String> cols)StringrowExtra(String extra, String... cols)StringrowExtra(String extra, Vector<String> cols)StringrowTh(String key, String tdExtra, String... cols)StringrowTh(String key, String tdExtra, Vector<String> cols)voidsetColor(boolean _color)This only affects HTML, not plain textStringsmall(String text)Stringspace()Stringspace(int n)Stringsprintf(String fmt, Object... data)Stringsrc(String text)Font emphasis for text directly sourced from the rap sheetStringstrong(String text)Stringstyle()Stringtable(String extra, String... rows)Generates a TABLE ...Stringtable(String extra, Vector<String> rows)Stringtd(String text)Stringtd(String extra, String text)Stringth(String text)Stringth(String extra, String text)Stringtr(String text)Stringtt(String text)Stringwrap(String wrap, String text)Stringwrap(String wrap, String extra, String text)Stringwrap2(String wrap, String text)Stringwrap2(String wrap, String extra, String text)
-
-
-
Field Detail
-
html
public boolean html
-
color
public boolean color
-
dummy
public static Fmter dummy
A dummy plain text formatter. This can be used whenever you want plain-text formatting
-
-
Method Detail
-
style
public String style()
-
setColor
public void setColor(boolean _color)
This only affects HTML, not plain text
-
br
public String br()
-
brHtml
public String brHtml()
Generates a BR in HTML mode, and a space otherwise. Handy for breaks in table headers.
-
hr
public String hr()
-
hrThin
public String hrThin()
-
space
public String space()
-
space
public String space(int n)
-
src
public final String src(String text)
Font emphasis for text directly sourced from the rap sheet
-
table
public final String table(String extra, String... rows)
Generates a TABLE ... /TABLE structure.- Parameters:
extra- E.g. "border=\"1\""rows- Each one is a TR ... /TR
-
row
public String row(String... cols)
Generates a table row (a TR element).- Parameters:
cols- The content of columns (without the TD wrapping; the wrapping will be done in this method)
-
-