|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.util.LaTeXDoubleFormatter
public class LaTeXDoubleFormatter
Represents a double formatter formatting strings for insertion into a LATEX document. This formatter uses an ordinary double formatter, and calls
String)
on the returned strings. This method
processes strings to be formatted in LATEX, e.g., convert scientific
notation.
Constructor Summary | |
---|---|
LaTeXDoubleFormatter(DoubleFormatter df)
Constructs a new double formatter using df. |
|
LaTeXDoubleFormatter(DoubleFormatter df,
String ensureMathCmd)
Constructs a new double formatter using df, and the LATEX command given by ensureMathCmd to ensure math mode when necessary. |
Method Summary | |
---|---|
String |
format(double x)
Formats the double x as a string, and returns the resulting string. |
DoubleFormatter |
getDoubleFormatter()
Returns the double formatter used by this formatter. |
String |
getEnsureMathCommand()
Returns the name of the math-ensuring LATEX command. |
static String |
processForLaTeX(String str,
String ensureMathCmd)
Prepares the string str to be formatted in LATEX, and returns the processed string. |
void |
setDoubleFormatter(DoubleFormatter df)
Sets the double formatter used by this formatter to df. |
void |
setEnsureMathCommand(String ensureMathCmd)
Sets the name of the math-ensuring LATEX command to ensureMathCmd. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LaTeXDoubleFormatter(DoubleFormatter df)
df
- the double formatter being used.public LaTeXDoubleFormatter(DoubleFormatter df, String ensureMathCmd)
df
- the double formatter being used.ensureMathCmd
- the name of the ensure-math command.Method Detail |
---|
public DoubleFormatter getDoubleFormatter()
public void setDoubleFormatter(DoubleFormatter df)
df
- the new double formatter.public String getEnsureMathCommand()
public void setEnsureMathCommand(String ensureMathCmd)
ensureMathCmd
- the new name of the math-ensuring command.public String format(double x)
DoubleFormatter
format
in interface DoubleFormatter
x
- the value being formatted.
public static String processForLaTeX(String str, String ensureMathCmd)
str
- the string being processed.ensureMathCmd
- the command to ensure math mode.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |