|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.latexdraw.glib.views.latex.LaTeXGenerator
net.sf.latexdraw.glib.views.pst.PSTCodeGenerator
public class PSTCodeGenerator
Defines a PSTricks generator; it manages the PSTricks views and the latex additional code.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
05/23/2010
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.sf.latexdraw.glib.views.latex.LaTeXGenerator |
---|
LaTeXGenerator.VerticalPosition |
Field Summary | |
---|---|
protected java.lang.StringBuilder |
cache
The code cache. |
static java.lang.String |
PACKAGE_PSTRICKS
|
protected PSTViewsSynchroniser |
synchro
The PSTricks views. |
protected boolean |
withComments
Defines if the comments must be generated. |
protected boolean |
withLatexParams
Defines if the latex parameters (position, caption, etc.) must be generated. |
Fields inherited from class net.sf.latexdraw.glib.views.latex.LaTeXGenerator |
---|
caption, comment, label, LGTH_START_LINE_COMMENT, modified, PACKAGES, positionHoriCentre, positionVertToken |
Constructor Summary | |
---|---|
PSTCodeGenerator(IDrawing drawing,
ViewsSynchroniserHandler handler,
boolean withLatexParams,
boolean withComments)
Creates and initialises the generator. |
Method Summary | |
---|---|
protected void |
emptyCache()
Empties the cache. |
private void |
generateColourCode(PSTShapeView<?> pstView,
java.util.Map<java.lang.String,java.lang.String> addedColours)
Adds the PST colour code to the cache. |
java.lang.StringBuilder |
getCache()
|
PSTViewsSynchroniser |
getSynchro()
|
boolean |
isWithComments()
|
boolean |
isWithLatexParams()
|
void |
setWithComments(boolean withComments)
Defines if the code must contains comments. |
void |
setWithLatexParams(boolean withLatexParams)
Defines if the latex parameters must be used by the generated code. |
void |
update()
Updates the code cache. |
void |
updateFull()
Updates the cache of every shapes and those of this generator. |
Methods inherited from class net.sf.latexdraw.glib.views.latex.LaTeXGenerator |
---|
createLatexFile, createPDFFile, createPSFile, createPSFile, getCaption, getComment, getCommentsWithoutTag, getLabel, getLatexDocument, getPackages, getPackagesUnary, getPositionVertToken, isModified, isPositionHoriCentre, setCaption, setComment, setLabel, setModified, setPackages, setPositionHoriCentre, setPositionVertToken |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PACKAGE_PSTRICKS
protected PSTViewsSynchroniser synchro
protected java.lang.StringBuilder cache
protected boolean withLatexParams
protected boolean withComments
Constructor Detail |
---|
public PSTCodeGenerator(IDrawing drawing, ViewsSynchroniserHandler handler, boolean withLatexParams, boolean withComments)
drawing
- The shapes used to generate PST code.handler
- The handler that provides information to the generator.withLatexParams
- Defines if the latex parameters (position, caption, etc.) must be generated.withComments
- Defines if the comments must be generated.
java.lang.IllegalArgumentException
- If the given drawing parameter is null.Method Detail |
---|
public PSTViewsSynchroniser getSynchro()
public java.lang.StringBuilder getCache()
public void update()
LaTeXGenerator
update
in class LaTeXGenerator
private void generateColourCode(PSTShapeView<?> pstView, java.util.Map<java.lang.String,java.lang.String> addedColours)
pstView
- The shape which colour code will be generated.addedColours
- The PST colours already generated.protected void emptyCache()
public void updateFull()
public boolean isWithLatexParams()
public void setWithLatexParams(boolean withLatexParams)
withLatexParams
- True: The latex parameters must be used by the generated code.public boolean isWithComments()
public void setWithComments(boolean withComments)
withComments
- True: comments will be included.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |