Package net.sourceforge.plantuml
Class AbstractPSystem
- java.lang.Object
-
- net.sourceforge.plantuml.AbstractPSystem
-
- All Implemented Interfaces:
Diagram
- Direct Known Subclasses:
NewpagedDiagram,PlainDiagram,PSystemDitaa,PSystemDot,PSystemJcckit,PSystemLatex,PSystemMath,PSystemPath,PSystemSudoku,PSystemXearth,TitledDiagram
public abstract class AbstractPSystem extends java.lang.Object implements Diagram
An abstract class for all diagram classes.Short for "
plasmasystem", although most newer diagram types do not use entities stored in a plasma.- See Also:
PSystemBuilder
-
-
Constructor Summary
Constructors Constructor Description AbstractPSystem(UmlSource source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringcheckFinalError()ImageBuildercreateImageBuilder(FileFormatOption fileFormatOption)CommandExecutionResultexecuteCommand(Command cmd, BlocLines lines)ImageDataexportDiagram(java.io.OutputStream os, int index, FileFormatOption fileFormatOption)Export the diagram as an image to some format.voidexportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption)protected abstract ImageDataexportDiagramNow(java.io.OutputStream os, int index, FileFormatOption fileFormatOption)ClockwiseTopRightBottomLeftgetDefaultMargins()java.lang.StringgetMetadata()java.lang.StringgetNamespaceSeparator()intgetNbImages()Number of images in this diagram (usually, 1)ScalegetScale()UmlSourcegetSource()The original source of the diagramintgetSplitPagesHorizontal()intgetSplitPagesVertical()DisplayPositionnedgetTitle()DisplaygetTitleDisplay()java.lang.StringgetWarningOrError()booleanhasUrl()Check if the Diagram have some links.booleanisOk()voidmakeDiagramReady()protected ColorMappermuteColorMapper(ColorMapper init)longseed()voidsetNamespaceSeparator(java.lang.String namespaceSeparator)voidsetScale(Scale scale)voidsetSplitPagesHorizontal(int splitPagesHorizontal)voidsetSplitPagesVertical(int splitPagesVertical)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.plantuml.core.Diagram
getDescription
-
-
-
-
Constructor Detail
-
AbstractPSystem
public AbstractPSystem(UmlSource source)
-
-
Method Detail
-
setNamespaceSeparator
public void setNamespaceSeparator(java.lang.String namespaceSeparator)
-
getNamespaceSeparator
public final java.lang.String getNamespaceSeparator()
-
getMetadata
public final java.lang.String getMetadata()
- Specified by:
getMetadatain interfaceDiagram
-
getSource
public final UmlSource getSource()
Description copied from interface:DiagramThe original source of the diagram
-
seed
public final long seed()
-
getNbImages
public int getNbImages()
Description copied from interface:DiagramNumber of images in this diagram (usually, 1)- Specified by:
getNbImagesin interfaceDiagram- Returns:
- usually 1
-
getSplitPagesHorizontal
public int getSplitPagesHorizontal()
- Specified by:
getSplitPagesHorizontalin interfaceDiagram
-
setSplitPagesHorizontal
public void setSplitPagesHorizontal(int splitPagesHorizontal)
-
getSplitPagesVertical
public int getSplitPagesVertical()
- Specified by:
getSplitPagesVerticalin interfaceDiagram
-
setSplitPagesVertical
public void setSplitPagesVertical(int splitPagesVertical)
-
getTitle
public DisplayPositionned getTitle()
-
getWarningOrError
public java.lang.String getWarningOrError()
- Specified by:
getWarningOrErrorin interfaceDiagram
-
checkFinalError
public java.lang.String checkFinalError()
-
makeDiagramReady
public void makeDiagramReady()
-
isOk
public boolean isOk()
-
executeCommand
public CommandExecutionResult executeCommand(Command cmd, BlocLines lines)
-
hasUrl
public boolean hasUrl()
Description copied from interface:DiagramCheck if the Diagram have some links.
-
exportDiagram
public final ImageData exportDiagram(java.io.OutputStream os, int index, FileFormatOption fileFormatOption) throws java.io.IOException
Description copied from interface:DiagramExport the diagram as an image to some format. Note that a diagram could be drawn as several images (think aboutnew pagefor sequence diagram for example).- Specified by:
exportDiagramin interfaceDiagram- Parameters:
os- where to write the imageindex- usually 0 (index of the image to be exported for this diagram).fileFormatOption- file format to use- Returns:
- a description of the generated image
- Throws:
java.io.IOException
-
setScale
public final void setScale(Scale scale)
-
getScale
public final Scale getScale()
-
createImageBuilder
public ImageBuilder createImageBuilder(FileFormatOption fileFormatOption) throws java.io.IOException
- Throws:
java.io.IOException
-
muteColorMapper
protected ColorMapper muteColorMapper(ColorMapper init)
-
exportDiagramNow
protected abstract ImageData exportDiagramNow(java.io.OutputStream os, int index, FileFormatOption fileFormatOption) throws java.io.IOException
- Throws:
java.io.IOException
-
getDefaultMargins
public ClockwiseTopRightBottomLeft getDefaultMargins()
-
getTitleDisplay
public Display getTitleDisplay()
- Specified by:
getTitleDisplayin interfaceDiagram
-
exportDiagramGraphic
public void exportDiagramGraphic(UGraphic ug, FileFormatOption fileFormatOption)
- Specified by:
exportDiagramGraphicin interfaceDiagram
-
-