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 String
a(String url, String text)
String
a(String url, String text, String extraClauses)
String
br()
String
brHtml()
Generates a BR in HTML mode, and a space otherwise.String
button(String text)
String
code(String text)
String
colored(String color, String text)
String
ei(String text)
Font emphasis for texts that are "CHEETA inference"String
em(String text)
String
h1(String text)
String
h2(String text)
String
h3(String text)
String
h4(String text)
String
h5(String text)
String
hr()
String
hrThin()
String
html(String title, String body)
String
html2(String head, String body)
String
para(String text)
String
paraEi(String text)
String
pre(String text)
String
row(String... cols)
Generates a table row (a TR element).String
row(Vector<String> cols)
String
rowExtra(String extra, String... cols)
String
rowExtra(String extra, Vector<String> cols)
String
rowTh(String key, String tdExtra, String... cols)
String
rowTh(String key, String tdExtra, Vector<String> cols)
void
setColor(boolean _color)
This only affects HTML, not plain textString
small(String text)
String
space()
String
space(int n)
String
sprintf(String fmt, Object... data)
String
src(String text)
Font emphasis for text directly sourced from the rap sheetString
strong(String text)
String
style()
String
table(String extra, String... rows)
Generates a TABLE ...String
table(String extra, Vector<String> rows)
String
td(String text)
String
td(String extra, String text)
String
th(String text)
String
th(String extra, String text)
String
tr(String text)
String
tt(String text)
String
wrap(String wrap, String text)
String
wrap(String wrap, String extra, String text)
String
wrap2(String wrap, String text)
String
wrap2(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)
-
-