当前位置: 首页>>代码示例>>Java>>正文


Java Diagram.exportDiagram方法代码示例

本文整理汇总了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;

}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:23,代码来源:SourceStringReader.java

示例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;

}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:25,代码来源:SourceStringReader.java

示例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);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:21,代码来源:PSystemUtils.java

示例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;

}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:23,代码来源:SourceStringReader.java

示例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;

}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:25,代码来源:SourceStringReader.java

示例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;
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:11,代码来源:AtomEmbededSystem.java


注:本文中的net.sourceforge.plantuml.core.Diagram.exportDiagram方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。