|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jaxodraw.io.imports.JaxoAxodraw
public class JaxoAxodraw
Defines a number of axodraw LaTeX commands and all the methods to convert them into JaxoObjects. This is responsible for the import option.
Field Summary | |
---|---|
protected static String |
AMP
|
protected static String |
COLOR
|
protected static String |
DASH
|
protected static String |
DL_SEP
|
protected static String |
DOUBLE_LINE
|
protected static String |
FREQ_FROM_WIGGLES
|
protected static String |
LINE
|
protected static String |
PAINT_ARROW
|
protected static String |
REL_HEIGHT
|
protected static String |
REL_WIDTH
|
protected static String |
STROKE_WIDTH
|
Constructor Summary | |
---|---|
JaxoAxodraw()
Constructor: Initializes the list of Latex packages (axodraw and color). |
Method Summary | |
---|---|
void |
addPackage(String pack)
Adds a latex package if it is not already contained in the package list. |
void |
checkRequired(String newString)
Checks whether the given string starts with one of "\documentclass", "\begin{document}" or "\begin{picture}". |
protected String[] |
getArcBrackets(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 Point2D[] |
getArcPoints(String[] st,
boolean clock)
|
protected float |
getBBoxHeight()
Return the current bounding box height. |
protected Color |
getColor()
Return the current color. |
String |
getComment()
Returns the comment (description) of this axodraw object. |
protected int[] |
getFourInts(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(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(String newString)
Returns a JaxoObject corresponding to a axodraw command. |
protected int[] |
getLineParams(int[] in,
String st)
|
protected int[] |
getLoopPars(String[] st,
String st1,
boolean cntrclk)
|
protected String |
getOneBrace(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 String[] |
getOneBracket(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 String |
getOneCurl(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. |
List<String> |
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(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 String[] |
getThreeCurls(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 String[] |
getTwoCurls(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(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(String pack)
Removes a latex package if it is contained in the package list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String LINE
protected static final String COLOR
protected static final String REL_WIDTH
protected static final String REL_HEIGHT
protected static final String PAINT_ARROW
protected static final String STROKE_WIDTH
protected static final String FREQ_FROM_WIGGLES
protected static final String DOUBLE_LINE
protected static final String DL_SEP
protected static final String AMP
protected static final String DASH
Constructor Detail |
---|
public JaxoAxodraw()
Method Detail |
---|
public JaxoObject getJaxoObject(String newString)
newString
- One line of a latex file
public final void checkRequired(String newString)
newString
- The input string.public final boolean[] getValid()
public final List<String> getPackages()
public final void addPackage(String pack)
pack
- the package to add.public final boolean removePackage(String pack)
pack
- the package to remove.
public final String getComment()
public final float getScaleFactor()
protected int[] getLineParams(int[] in, String st)
protected int[] getT4Params(int[] firstl, int[] secondl)
protected Point2D[] getArcPoints(String[] st, boolean clock)
protected int[] getLoopPars(String[] st, String st1, boolean cntrclk)
protected int[] getFourInts(String str)
str
- the string.
protected int[] getTwoInts(String str)
str
- the string.
protected int[] getFourInts(String str, int fromIndex)
str
- the string.fromIndex
- the starting index.
protected int[] getSixInts(String str)
str
- the string.
protected String[] getOneBracket(String str)
str
- the String.
protected String getOneBrace(String str)
str
- the String.
protected String getOneCurl(String str)
str
- the String.
protected String[] getTwoCurls(String str)
str
- the String.
protected String[] getThreeCurls(String str)
str
- the String.
protected String[] getArcBrackets(String str)
str
- the String.
protected JaxoObject newPLine()
protected Color getColor()
protected float getStroke()
protected float getBBoxHeight()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |