public class TMFFFlat extends TMFFMethod
This rendering method was requested by Norm to provide a concise way to see an entire proof.
Note that with LineWrap on, the text will wrap around and occupy multiple screen lines
TMFFFlat overrides basic TMFFMethod renderFormula() to override the rightmostColNbr parameter temporarily, without altering the user setting for future invocations of TMFF.
maxDepth
Constructor and Description |
---|
TMFFFlat()
Standard constructor for TMFFFlat.
|
Modifier and Type | Method and Description |
---|---|
org.json.JSONArray |
asArray()
Output the array form of this method's parameters.
|
int |
renderFormula(TMFFStateParams tmffSP,
ParseTree parseTree,
Formula formula)
Formats a formula and outputs it to a StringBuilder using the given
ParseTree root node and initial Constant of the formula.
|
protected int |
renderSubExprWithBreaks(TMFFStateParams tmffSP,
ParseNode currNode,
int leftmostColNbr) |
boolean |
updateMaxDepth(int maxDepth)
Updates maxDepth for a TMFFMethod if the Method allows updates.
|
constructMethodWithUserParams, renderSubExpr, validateMaxDepth, validateMaxDepth
public TMFFFlat()
Sets maxDepth to Integer.MAX_VALUE so that no depth breaks are triggered.
public org.json.JSONArray asArray()
TMFFMethod
asArray
in class TMFFMethod
public int renderFormula(TMFFStateParams tmffSP, ParseTree parseTree, Formula formula)
This method overrides the TMFFMethod renderFormula() method!
Sets rightmostColNbr to Integer.MAX_VALUE so that no line width breaks are triggered -- and this is done regardless of the user setting for the rightmost column number (overrides that setting.)
renderFormula
in class TMFFMethod
tmffSP
- TMFFStateParams initialized, ready for use.parseTree
- ParseTree for the formula to be formatted.formula
- formula to be formatted.protected int renderSubExprWithBreaks(TMFFStateParams tmffSP, ParseNode currNode, int leftmostColNbr)
renderSubExprWithBreaks
in class TMFFMethod
public boolean updateMaxDepth(int maxDepth)
As of the initial release, only TMFFAlignColumn uses maxDepth. The methods TMFFFlat and TMFFUnformatted have maxDepth = Integer.MAX_VALUE which results in no maxDepth line breaks from happening -- therefore, they do not allow updates after initial construction of the method.
updateMaxDepth
in class TMFFMethod
maxDepth
- parameter.