public class JaxoAxodraw
extends java.lang.Object
Constructor and Description |
---|
JaxoAxodraw()
Constructor: Initializes the list of Latex packages
(axodraw and color).
|
Modifier and Type | Method and Description |
---|---|
void |
addPackage(java.lang.String pack)
Adds a latex package if it is not already contained in the package list.
|
void |
checkRequired(java.lang.String newString)
Checks whether the given string starts with one of "\documentclass",
"\begin{document}" or "\begin{picture}".
|
protected java.lang.String[] |
getArcBrackets(java.lang.String str)
Returns the five strings s1 - s5 contained in a string
of the form " # (s1, s2) (s3, s4, s5) * " where * can be anything
and # doesn't contain any parenthesis.
|
protected java.awt.geom.Point2D[] |
getArcPoints(java.lang.String[] st,
boolean clock) |
protected float |
getBBoxHeight()
Return the current bounding box height.
|
protected java.awt.Color |
getColor()
Return the current color.
|
java.lang.String |
getComment()
Returns the comment (description) of this axodraw object.
|
protected int[] |
getFourInts(java.lang.String str)
Returns the four integers xi,yi,xf,yf contained in a string
of the form " # (xi,yi) (xf,yf) * " where * can be anything
and # doesn't contain any parenthesis.
|
protected int[] |
getFourInts(java.lang.String str,
int fromIndex)
Returns the four integers xi,yi,xf,yf contained in a string
of the form " # (xi,yi) (xf,yf) * " where * can be anything
and # doesn't contain any parenthesis.
|
JaxoObject |
getJaxoObject(java.lang.String newString)
Returns a JaxoObject corresponding to a axodraw command.
|
protected int[] |
getLineParams(int[] in,
java.lang.String st) |
protected int[] |
getLoopPars(java.lang.String[] st,
java.lang.String st1,
boolean cntrclk) |
protected java.lang.String |
getOneBrace(java.lang.String str)
Returns the four integers xi,yi,xf,yf contained in a string
of the form " # [String] * " where * can be anything
and # doesn't contain any braces.
|
protected java.lang.String[] |
getOneBracket(java.lang.String str)
Returns the two integers xi,yi contained in a string
of the form " # (xi,yi) * " where * can be anything
and # doesn't contain any parenthesis.
|
protected java.lang.String |
getOneCurl(java.lang.String str)
Returns the string "String" contained in a string
of the form " # {String} * " where * can be anything
and # doesn't contain any curly brackets.
|
java.util.List |
getPackages()
Returns the current list of LaTeX packages included in the graph.
|
float |
getScaleFactor()
Returns the scale factor of this axodraw object.
|
protected int[] |
getSixInts(java.lang.String str)
Returns the six integers x1, y1,x2,y2,x3,y3 contained in a string
of the form " # (x1, y1) (x2,y2) (x3,y3) * " where * can be anything
and # doesn't contain any parenthesis.
|
protected float |
getStroke()
Return the current stroke (line width).
|
protected int[] |
getT4Params(int[] firstl,
int[] secondl) |
protected java.lang.String[] |
getThreeCurls(java.lang.String str)
Returns the three strings s1, s2, s3 contained in a string
of the form " # {s1}{s2}{s3} * " where * can be anything
and # doesn't contain any curly brackets.
|
protected java.lang.String[] |
getTwoCurls(java.lang.String str)
Returns the two strings s1, s2 contained in a string
of the form " # {s1}{s2} * " where * can be anything
and # doesn't contain any curly brackets.
|
protected int[] |
getTwoInts(java.lang.String str)
Returns the two integers xi,yi contained in a string
of the form " # (xi,yi) * " where * can be anything
and # doesn't contain any parenthesis.
|
boolean[] |
getValid()
Returns an array that indicates which required LaTeX commands
were found.
|
protected JaxoObject |
newPLine() |
boolean |
removePackage(java.lang.String pack)
Removes a latex package if it is contained in the package list.
|
public JaxoAxodraw()
public JaxoObject getJaxoObject(java.lang.String newString)
newString
- One line of a latex filepublic final void checkRequired(java.lang.String newString)
newString
- The input string.public final boolean[] getValid()
public final java.util.List getPackages()
public final void addPackage(java.lang.String pack)
pack
- the package to add.public final boolean removePackage(java.lang.String pack)
pack
- the package to remove.public final java.lang.String getComment()
public final float getScaleFactor()
protected int[] getLineParams(int[] in, java.lang.String st)
protected int[] getT4Params(int[] firstl, int[] secondl)
protected java.awt.geom.Point2D[] getArcPoints(java.lang.String[] st, boolean clock)
protected int[] getLoopPars(java.lang.String[] st, java.lang.String st1, boolean cntrclk)
protected int[] getFourInts(java.lang.String str)
str
- the string.protected int[] getTwoInts(java.lang.String str)
str
- the string.protected int[] getFourInts(java.lang.String str, int fromIndex)
str
- the string.fromIndex
- the starting index.protected int[] getSixInts(java.lang.String str)
str
- the string.protected java.lang.String[] getOneBracket(java.lang.String str)
str
- the String.protected java.lang.String getOneBrace(java.lang.String str)
str
- the String.protected java.lang.String getOneCurl(java.lang.String str)
str
- the String.protected java.lang.String[] getTwoCurls(java.lang.String str)
str
- the String.protected java.lang.String[] getThreeCurls(java.lang.String str)
str
- the String.protected java.lang.String[] getArcBrackets(java.lang.String str)
str
- the String.protected JaxoObject newPLine()
protected java.awt.Color getColor()
protected float getStroke()
protected float getBBoxHeight()
Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.