本文整理汇总了Java中net.sourceforge.plantuml.core.Diagram.exportDiagram方法的典型用法代码示例。如果您正苦于以下问题:Java Diagram.exportDiagram方法的具体用法?Java Diagram.exportDiagram怎么用?Java Diagram.exportDiagram使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.plantuml.core.Diagram
的用法示例。
在下文中一共展示了Diagram.exportDiagram方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: generateImage
import net.sourceforge.plantuml.core.Diagram; //导入方法依赖的package包/类
public String generateImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException {
if (blocks.size() == 0) {
noStartumlFound(os, fileFormatOption);
return null;
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
if (numImage < nbInSystem) {
// final CMapData cmap = new CMapData();
final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption);
if (imageData.containsCMapData()) {
return system.getDescription().getDescription() + "\n" + imageData.getCMapData("plantuml");
}
return system.getDescription().getDescription();
}
numImage -= nbInSystem;
}
Log.error("numImage is too big = " + numImage);
return null;
}
示例2: generateDiagramDescription
import net.sourceforge.plantuml.core.Diagram; //导入方法依赖的package包/类
public DiagramDescription generateDiagramDescription(OutputStream os, int numImage,
FileFormatOption fileFormatOption) throws IOException {
if (blocks.size() == 0) {
noStartumlFound(os, fileFormatOption);
return null;
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
if (numImage < nbInSystem) {
// final CMapData cmap = new CMapData();
final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption);
if (imageData.containsCMapData()) {
return ((DiagramDescriptionImpl) system.getDescription()).withCMapData(imageData
.getCMapData("plantuml"));
}
return system.getDescription();
}
numImage -= nbInSystem;
}
Log.error("numImage is too big = " + numImage);
return null;
}
示例3: exportDiagramsDefault
import net.sourceforge.plantuml.core.Diagram; //导入方法依赖的package包/类
static private List<File> exportDiagramsDefault(Diagram system, File suggestedFile, FileFormatOption fileFormat)
throws IOException {
if (suggestedFile.exists() && suggestedFile.isDirectory()) {
throw new IllegalArgumentException("File is a directory " + suggestedFile);
}
OutputStream os = null;
try {
if (canFileBeWritten(suggestedFile) == false) {
return Collections.emptyList();
}
os = new BufferedOutputStream(new FileOutputStream(suggestedFile));
// system.exportDiagram(os, null, 0, fileFormat);
system.exportDiagram(os, 0, fileFormat);
} finally {
if (os != null) {
os.close();
}
}
return Arrays.asList(suggestedFile);
}
示例4: generateImage
import net.sourceforge.plantuml.core.Diagram; //导入方法依赖的package包/类
public String generateImage(OutputStream os, int numImage, FileFormatOption fileFormatOption) throws IOException {
if (blocks.size() == 0) {
noStartumlFound(os, fileFormatOption);
return null;
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
if (numImage < nbInSystem) {
//final CMapData cmap = new CMapData();
final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption);
if (imageData.containsCMapData()) {
return system.getDescription().getDescription() + "\n" + imageData.getCMapData("plantuml");
}
return system.getDescription().getDescription();
}
numImage -= nbInSystem;
}
Log.error("numImage is too big = " + numImage);
return null;
}
示例5: generateDiagramDescription
import net.sourceforge.plantuml.core.Diagram; //导入方法依赖的package包/类
public DiagramDescription generateDiagramDescription(OutputStream os, int numImage, FileFormatOption fileFormatOption)
throws IOException {
if (blocks.size() == 0) {
noStartumlFound(os, fileFormatOption);
return null;
}
for (BlockUml b : blocks) {
final Diagram system = b.getDiagram();
final int nbInSystem = system.getNbImages();
if (numImage < nbInSystem) {
// final CMapData cmap = new CMapData();
final ImageData imageData = system.exportDiagram(os, numImage, fileFormatOption);
if (imageData.containsCMapData()) {
return ((DiagramDescriptionImpl) system.getDescription()).withCMapData(imageData
.getCMapData("plantuml"));
}
return system.getDescription();
}
numImage -= nbInSystem;
}
Log.error("numImage is too big = " + numImage);
return null;
}
示例6: getImage
import net.sourceforge.plantuml.core.Diagram; //导入方法依赖的package包/类
private BufferedImage getImage() throws IOException, InterruptedException {
final Diagram system = getSystem();
final ByteArrayOutputStream os = new ByteArrayOutputStream();
system.exportDiagram(os, 0, new FileFormatOption(FileFormat.PNG));
os.close();
final ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray());
final BufferedImage im = ImageIO.read(is);
is.close();
return im;
}