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


Java DiagramDescription类代码示例

本文整理汇总了Java中net.sourceforge.plantuml.core.DiagramDescription的典型用法代码示例。如果您正苦于以下问题:Java DiagramDescription类的具体用法?Java DiagramDescription怎么用?Java DiagramDescription使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DiagramDescription类属于net.sourceforge.plantuml.core包,在下文中一共展示了DiagramDescription类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: generateDiagramDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的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

示例2: generateDiagramDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的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

示例3: processImage

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public void processImage(String fileName) throws IOException {
	if (fileName.startsWith("/")) {
		throw new IllegalArgumentException();
	}
	final SourceStringReader sourceStringReader = new SourceStringReader(incoming.get(fileName));
	final ByteArrayOutputStream baos = new ByteArrayOutputStream();
	final FileFormat format = FileFormat.PNG;
	final DiagramDescription desc = sourceStringReader.generateDiagramDescription(baos,
			new FileFormatOption(format));
	final String pngFileName = format.changeName(fileName, 0);
	final String errorFileName = pngFileName.substring(0, pngFileName.length() - 4) + ".err";
	synchronized (this) {
		outgoing.remove(pngFileName);
		outgoing.remove(errorFileName);
		if (desc != null && desc.getDescription() != null) {
			outgoing.put(pngFileName, baos.toByteArray());
			if (desc.getDescription().startsWith("(Error)")) {
				final ByteArrayOutputStream errBaos = new ByteArrayOutputStream();
				sourceStringReader.generateImage(errBaos, new FileFormatOption(FileFormat.ATXT));
				errBaos.close();
				outgoing.put(errorFileName, errBaos.toByteArray());
			}
		}
	}
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:26,代码来源:FtpConnexion.java

示例4: processImage

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public void processImage(String fileName) throws IOException {
	if (fileName.startsWith("/")) {
		throw new IllegalArgumentException();
	}
	final String pngFileName = getFutureFileName(fileName);
	boolean done = false;
	try {
		final SourceStringReader sourceStringReader = new SourceStringReader(incoming.get(fileName));
		final ByteArrayOutputStream baos = new ByteArrayOutputStream();
		final FileFormat format = getFileFormat();
		final DiagramDescription desc = sourceStringReader.generateDiagramDescription(baos, new FileFormatOption(
				format));
		final String errorFileName = pngFileName.substring(0, pngFileName.length() - 4) + ".err";
		synchronized (this) {
			outgoing.remove(pngFileName);
			futureOutgoing.remove(pngFileName);
			outgoing.remove(errorFileName);
			if (desc != null && desc.getDescription() != null) {
				outgoing.put(pngFileName, baos.toByteArray());
				done = true;
				if (desc.getDescription().startsWith("(Error)")) {
					final ByteArrayOutputStream errBaos = new ByteArrayOutputStream();
					sourceStringReader.generateImage(errBaos, new FileFormatOption(FileFormat.ATXT));
					errBaos.close();
					outgoing.put(errorFileName, errBaos.toByteArray());
				}
			}
		}
	} finally {
		if (done == false) {
			outgoing.put(pngFileName, new byte[0]);
		}
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:35,代码来源:FtpConnexion.java

示例5: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	final StringBuilder sb = new StringBuilder();
	for (Diagram d : diagrams) {
		if (sb.length() > 0) {
			sb.append(" ");
		}
		sb.append(d.getDescription());
	}
	return new DiagramDescriptionImpl(sb.toString(), getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:11,代码来源:NewpagedDiagram.java

示例6: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Project)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemProject.java

示例7: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Dedication)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemDedication.java

示例8: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Je Suis Charlie)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemCharlie.java

示例9: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Easter Eggs)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemEgg.java

示例10: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Lost)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemLost.java

示例11: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Path)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemPath.java

示例12: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Apple //e)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemAppleTwo.java

示例13: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(RIP)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemRIP.java

示例14: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("activity3", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:ActivityDiagram3.java

示例15: getDescription

import net.sourceforge.plantuml.core.DiagramDescription; //导入依赖的package包/类
public DiagramDescription getDescription() {
	return new DiagramDescriptionImpl("(Sprites)", getClass());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:4,代码来源:PSystemListInternalSprites.java


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