• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FileFormatOption类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: exportDiagramInternal

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
@Override
protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption)
		throws IOException {
	// BUG42
	// COMPRESSION
	// TextBlock result = swinlanes;
	TextBlock result = new TextBlockCompressed(swinlanes);
	result = new TextBlockRecentred(result);
	final ISkinParam skinParam = getSkinParam();
	result = new AnnotatedWorker(this, skinParam).addAdd(result);
	final Dimension2D dim = TextBlockUtils.getMinMax(result, fileFormatOption.getDefaultStringBounder())
			.getDimension();
	final double margin = 10;
	final double dpiFactor = getDpiFactor(fileFormatOption, Dimension2DDouble.delta(dim, 2 * margin, 0));

	final ImageBuilder imageBuilder = new ImageBuilder(skinParam.getColorMapper(), dpiFactor, getSkinParam()
			.getBackgroundColor(), fileFormatOption.isWithMetadata() ? getMetadata() : null, getWarningOrError(),
			margin, margin, getAnimation(), getSkinParam().handwritten());
	imageBuilder.setUDrawable(result);

	return imageBuilder.writeImageTOBEMOVED(fileFormatOption, os);

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


示例2: createUGraphic

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
private UGraphic2 createUGraphic(FileFormatOption fileFormatOption, final Dimension2D dim, Animation animationArg,
		double dx, double dy) {
	final FileFormat fileFormat = fileFormatOption.getFileFormat();
	switch (fileFormat) {
	case PNG:
		return createUGraphicPNG(colorMapper, dpiFactor, dim, mybackcolor, animationArg, dx, dy);
	case SVG:
		return createUGraphicSVG(colorMapper, dpiFactor, dim, mybackcolor, fileFormatOption.getSvgLinkTarget());
	case EPS:
		return new UGraphicEps(colorMapper, EpsStrategy.getDefault2());
	case EPS_TEXT:
		return new UGraphicEps(colorMapper, EpsStrategy.WITH_MACRO_AND_TEXT);
	case HTML5:
		return new UGraphicHtml5(colorMapper);
	case VDX:
		return new UGraphicVdx(colorMapper);
	case LATEX:
		return new UGraphicTikz(colorMapper, true);
	case LATEX_NO_PREAMBLE:
		return new UGraphicTikz(colorMapper, false);
	case BRAILLE_PNG:
		return new UGraphicBraille(colorMapper, fileFormat);
	default:
		throw new UnsupportedOperationException(fileFormat.toString());
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:27,代码来源:ImageBuilder.java


示例3: exportDiagramInternal

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
@Override
final protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption)
		throws IOException {
	final UGraphic ug = createImage(fileFormatOption);
	drawU(ug);
	if (ug instanceof UGraphicG2d) {
		final BufferedImage im = ((UGraphicG2d) ug).getBufferedImage();
		PngIO.write(im, os, fileFormatOption.isWithMetadata() ? getMetadata() : null, this.getDpi(fileFormatOption));
	} else if (ug instanceof UGraphicSvg) {
		final UGraphicSvg svg = (UGraphicSvg) ug;
		svg.createXml(os);
	} else if (ug instanceof UGraphicEps) {
		final UGraphicEps eps = (UGraphicEps) ug;
		os.write(eps.getEPSCode().getBytes());
	}
	return new ImageDataSimple();
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:PostItDiagram.java


示例4: createImage

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
private UGraphic createImage(FileFormatOption fileFormatOption) {
	final Color backColor = getSkinParam().getColorMapper()
			.getMappedColor(this.getSkinParam().getBackgroundColor());
	final FileFormat fileFormat = fileFormatOption.getFileFormat();
	if (fileFormat == FileFormat.PNG) {
		final double height = getDefaultArea().heightWhenWidthIs(width, fileFormat.getDefaultStringBounder());
		final EmptyImageBuilder builder = new EmptyImageBuilder(width, height, backColor);

		final Graphics2D graphics2D = builder.getGraphics2D();
		final double dpiFactor = this.getDpiFactor(fileFormatOption);
		final UGraphicG2d result = new UGraphicG2d(new ColorMapperIdentity(), graphics2D, dpiFactor);
		result.setBufferedImage(builder.getBufferedImage());
		return result;
	}
	throw new UnsupportedOperationException();
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:17,代码来源:PostItDiagram.java


示例5: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
	final Display display = Display.create(lines);
	final UFont font = new UFont("Serif", Font.PLAIN, 14);
	final FontConfiguration fontConfiguration = FontConfiguration.blackBlueTrue(font);
	final Sheet sheet = new CreoleParser(fontConfiguration, HorizontalAlignment.LEFT, null, CreoleMode.FULL)
			.createSheet(display);
	final SheetBlock1 sheetBlock = new SheetBlock1(sheet, 0, 0);

	final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, null, null, null, 0, 0, null,
			false);
	builder.setUDrawable(sheetBlock);
	return builder.writeImageTOBEMOVED(fileFormat, os);

	// final Dimension2D dim = TextBlockUtils.getDimension(sheetBlock);
	// final UGraphic2 ug = fileFormat.createUGraphic(new ColorMapperIdentity(), 1, dim, null, false);
	// // sheetBlock.drawU(ug.apply(new UTranslate(0, 10)));
	// sheetBlock.drawU(ug);
	// ug.writeImageTOBEMOVED(os, null, 96);
	// return new ImageDataSimple(dim);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:21,代码来源:PSystemCreole.java


示例6: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
	final Element salt = SaltUtils.createElement(data);

	final Dimension2D size = salt.getPreferredDimension(fileFormat.getDefaultStringBounder(), 0, 0);
	final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, null, null,
			5, 5, null, false);
	builder.setUDrawable(new UDrawable() {

		public void drawU(UGraphic ug) {
			ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
			salt.drawU(ug, 0, new Dimension2DDouble(size.getWidth(), size.getHeight()));
			salt.drawU(ug, 1, new Dimension2DDouble(size.getWidth(), size.getHeight()));
		}
	});
	return builder.writeImageTOBEMOVED(fileFormat, os);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:17,代码来源:PSystemSalt.java


示例7: exportDiagramOld

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
private ImageData exportDiagramOld(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
	final Element salt = SaltUtils.createElement(data);

	EmptyImageBuilder builder = new EmptyImageBuilder(10, 10, Color.WHITE);
	Graphics2D g2d = builder.getGraphics2D();

	final Dimension2D size = salt.getPreferredDimension(
			new UGraphicG2d(new ColorMapperIdentity(), g2d, 1.0).getStringBounder(), 0, 0);
	g2d.dispose();

	builder = new EmptyImageBuilder(size.getWidth() + 6, size.getHeight() + 6, Color.WHITE);
	final BufferedImage im = builder.getBufferedImage();
	g2d = builder.getGraphics2D();
	g2d.translate(3, 3);
	UAntiAliasing.ANTI_ALIASING_ON.apply(g2d);
	UGraphic ug = new UGraphicG2d(new ColorMapperIdentity(), g2d, 1.0);
	ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
	salt.drawU(ug, 0, new Dimension2DDouble(size.getWidth(), size.getHeight()));
	salt.drawU(ug, 1, new Dimension2DDouble(size.getWidth(), size.getHeight()));
	g2d.dispose();

	// Writes the off-screen image into a PNG file
	ImageIO.write(im, "png", os);
	return new ImageDataSimple(im.getWidth(), im.getHeight());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:26,代码来源:PSystemSalt.java


示例8: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
		final OpenIcon icon = OpenIcon.retrieve(iconName);
		// final Dimension2D dim = new Dimension2DDouble(100, 100);

		final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0,
				null, null, null, 5, 5, null, false);
		imageBuilder.setUDrawable(icon.asTextBlock(HtmlColorUtils.BLACK, factor));
		return imageBuilder.writeImageTOBEMOVED(fileFormat, os);

//		UGraphic2 ug = fileFormat.createUGraphic(dim);
//		ug = (UGraphic2) ug.apply(new UTranslate(10, 10));
//		// ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
//		// ug.draw(new URectangle(7, 6));
//		icon.asTextBlock(HtmlColorUtils.BLACK, factor).drawU(ug);
//		ug.writeImageTOBEMOVED(os, null, 96);
//		return new ImageDataSimple(dim);
	}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:PSystemOpenIconic.java


示例9: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
	// Copy data to diagramString.
	StringBuffer diagramString = new StringBuffer();
	Iterator<String> iter = data.iterator();
	while (iter.hasNext()) {
		diagramString.append(iter.next()).append("\n");
	}
	// Process diagramString with Salt9000.
	SaltProcessor salt = new SaltProcessor(diagramString.toString());
	salt.setLookAndFeel(SaltProcessor.JGOODIES_PLASTIC_LOOKANDFEEL);
	final BufferedImage image = salt.getImage();
	final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, null,
			null, 5, 5, null);
	builder.addUDrawable(new UDrawable() {
		public void drawU(UGraphic ug) {
			ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
			ug.draw(new UImage(image));
		}
	});
	return builder.writeImageTOBEMOVED(fileFormat.getFileFormat(), os);
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:22,代码来源:PSystemSalt9000.java


示例10: exportDiagramInternal

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
@Override
protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException {
	// BUG42
	// TextBlock result = swinlanes;
	TextBlock result = new TextBlockCompressed(swinlanes);
	result = new TextBlockRecentred(result);
	result = addLegend(result);
	result = addTitle(result);
	result = addHeaderAndFooter(result);
	final ISkinParam skinParam = getSkinParam();
	final Dimension2D dim = TextBlockUtils.getMinMax(result).getDimension();
	final double margin = 10;
	final double dpiFactor = getDpiFactor(fileFormatOption, Dimension2DDouble.delta(dim, 2 * margin, 0));

	final ImageBuilder imageBuilder = new ImageBuilder(skinParam.getColorMapper(), dpiFactor, getSkinParam()
			.getBackgroundColor(), fileFormatOption.isWithMetadata() ? getMetadata() : null, getWarningOrError(),
			margin, margin, getAnimation());
	imageBuilder.addUDrawable(result);

	return imageBuilder.writeImageTOBEMOVED(fileFormatOption.getFileFormat(), os);

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


示例11: writeImage

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public static void writeImage(OutputStream os, String metadata, FileFormatOption fileFormatOption,
		ColorMapper colorMapper, HtmlColor background, TextBlock image) throws IOException {
	final FileFormat fileFormat = fileFormatOption.getFileFormat();
	if (fileFormat == FileFormat.PNG) {
		final BufferedImage im = createImage(colorMapper, background, image);
		PngIO.write(im, os, fileFormatOption.isWithMetadata() ? metadata : null, 96);
	} else if (fileFormat == FileFormat.SVG) {
		final UGraphicSvg svg = new UGraphicSvg(colorMapper, StringUtils.getAsHtml(colorMapper
				.getMappedColor(background)), false, 1.0);
		image.drawU(svg);
		svg.createXml(os);
	} else if (fileFormat == FileFormat.EPS) {
		final UGraphicEps ug = new UGraphicEps(colorMapper, EpsStrategy.getDefault2());
		image.drawU(ug);
		os.write(ug.getEPSCode().getBytes());
	} else {
		throw new UnsupportedOperationException();
	}
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:20,代码来源:UGraphicUtils.java


示例12: processImage

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


示例13: exportDiagramInternal

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
@Override
final protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption) throws IOException {
	final UGraphic ug = createImage(fileFormatOption);
	drawU(ug);
	if (ug instanceof UGraphicG2d) {
		final BufferedImage im = ((UGraphicG2d) ug).getBufferedImage();
		PngIO.write(im, os, fileFormatOption.isWithMetadata() ? getMetadata() : null, this.getDpi(fileFormatOption));
	} else if (ug instanceof UGraphicSvg) {
		final UGraphicSvg svg = (UGraphicSvg) ug;
		svg.createXml(os);
	} else if (ug instanceof UGraphicEps) {
		final UGraphicEps eps = (UGraphicEps) ug;
		os.write(eps.getEPSCode().getBytes());
	}
	return new ImageDataSimple();
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:17,代码来源:PostItDiagram.java


示例14: createImage

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
private UGraphic createImage(FileFormatOption fileFormatOption) {
	final Color backColor = getSkinParam().getColorMapper()
			.getMappedColor(this.getSkinParam().getBackgroundColor());
	final FileFormat fileFormat = fileFormatOption.getFileFormat();
	if (fileFormat == FileFormat.PNG) {
		final double height = getDefaultArea().heightWhenWidthIs(width, TextBlockUtils.getDummyStringBounder());
		final EmptyImageBuilder builder = new EmptyImageBuilder(width, height, backColor);

		final Graphics2D graphics2D = builder.getGraphics2D();
		final double dpiFactor = this.getDpiFactor(fileFormatOption);
		final UGraphicG2d result = new UGraphicG2d(new ColorMapperIdentity(), graphics2D, dpiFactor);
		result.setBufferedImage(builder.getBufferedImage());
		return result;
	}
	throw new UnsupportedOperationException();
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:17,代码来源:PostItDiagram.java


示例15: createSvg

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
private void createSvg(OutputStream os, FileFormatOption fileFormatOption, final TextBlockBackcolored result,
		final Dimension2D dim) throws IOException {
	final double scale = getScale(fileFormatOption, dim);

	Color backColor = Color.WHITE;
	if (result.getBackcolor() instanceof HtmlColorSimple) {
		backColor = diagram.getSkinParam().getColorMapper().getMappedColor(result.getBackcolor());
	}
	final UGraphicSvg ug;
	if (result.getBackcolor() instanceof HtmlColorGradient) {
		ug = new UGraphicSvg(diagram.getSkinParam().getColorMapper(), (HtmlColorGradient) result.getBackcolor(),
				false, scale);
	} else if (backColor == null || backColor.equals(Color.WHITE)) {
		ug = new UGraphicSvg(diagram.getSkinParam().getColorMapper(), false, scale);
	} else {
		ug = new UGraphicSvg(diagram.getSkinParam().getColorMapper(), StringUtils.getAsHtml(backColor), false,
				scale);
	}
	result.drawU(ug);
	ug.createXml(os);
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:22,代码来源:CucaDiagramFileMakerSvek.java


示例16: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
	final Display display = Display.create(lines);
	final UFont font = new UFont("Serif", Font.PLAIN, 14);
	final FontConfiguration fontConfiguration = new FontConfiguration(font, HtmlColorUtils.BLACK,
			HtmlColorUtils.BLUE);
	final Sheet sheet = new CreoleParser(fontConfiguration, HorizontalAlignment.LEFT, null, false)
			.createSheet(display);
	final SheetBlock1 sheetBlock = new SheetBlock1(sheet, 0);

	final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, null, null, null, 0, 0, null);
	builder.addUDrawable(sheetBlock);
	return builder.writeImageTOBEMOVED(fileFormat.getFileFormat(), os);

	// final Dimension2D dim = TextBlockUtils.getDimension(sheetBlock);
	// final UGraphic2 ug = fileFormat.createUGraphic(new ColorMapperIdentity(), 1, dim, null, false);
	// // sheetBlock.drawU(ug.apply(new UTranslate(0, 10)));
	// sheetBlock.drawU(ug);
	// ug.writeImageTOBEMOVED(os, null, 96);
	// return new ImageDataSimple(dim);
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:21,代码来源:PSystemCreole.java


示例17: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
	final Element salt = SaltUtils.createElement(data);

	final Dimension2D size = salt.getPreferredDimension(TextBlockUtils.getDummyStringBounder(), 0, 0);
	final ImageBuilder builder = new ImageBuilder(new ColorMapperIdentity(), 1.0, HtmlColorUtils.WHITE, null,
			null, 5, 5, null);
	builder.addUDrawable(new UDrawable() {

		public void drawU(UGraphic ug) {
			ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
			salt.drawU(ug, 0, new Dimension2DDouble(size.getWidth(), size.getHeight()));
			salt.drawU(ug, 1, new Dimension2DDouble(size.getWidth(), size.getHeight()));
		}
	});
	return builder.writeImageTOBEMOVED(fileFormat.getFileFormat(), os);
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:17,代码来源:PSystemSalt.java


示例18: exportDiagram

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
public ImageData exportDiagram(OutputStream os, int num, FileFormatOption fileFormat) throws IOException {
		final OpenIcon icon = OpenIcon.retrieve(iconName);
		// final Dimension2D dim = new Dimension2DDouble(100, 100);

		final ImageBuilder imageBuilder = new ImageBuilder(new ColorMapperIdentity(), 1.0,
				null, null, null, 5, 5, null);
		imageBuilder.addUDrawable(icon.asTextBlock(HtmlColorUtils.BLACK, factor));
		return imageBuilder.writeImageTOBEMOVED(fileFormat.getFileFormat(), os);

//		UGraphic2 ug = fileFormat.createUGraphic(dim);
//		ug = (UGraphic2) ug.apply(new UTranslate(10, 10));
//		// ug = ug.apply(new UChangeColor(HtmlColorUtils.BLACK));
//		// ug.draw(new URectangle(7, 6));
//		icon.asTextBlock(HtmlColorUtils.BLACK, factor).drawU(ug);
//		ug.writeImageTOBEMOVED(os, null, 96);
//		return new ImageDataSimple(dim);
	}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:18,代码来源:PSystemOpenIconic.java


示例19: applyOnFixtures

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
@Override
public String applyOnFixtures(List<FixtureCallResult> fixtureCallResults, String... parameters) {
    String plantUml = plantUmlSequenceDiagramGenerator.getPlantUmlScript(fixtureCallResults);

    SourceStringReader reader = new SourceStringReader(plantUml);
    final ByteArrayOutputStream os = new ByteArrayOutputStream();


    try {
        reader.generateImage(os, new FileFormatOption(FileFormat.SVG));
        os.close();
        return new String(os.toByteArray());
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:slezier,项目名称:SimpleFunctionalTest,代码行数:17,代码来源:HtmlSequenceDiagram.java


示例20: close

import net.sourceforge.plantuml.FileFormatOption; //导入依赖的package包/类
/**
 * Closes the delegate writer and tries to generate an image file for each configured image format.
 * The default file extension from the image format is used, together with the specified <code>directory</code>
 * and <code>baseName</code>.
 *
 * @throws IOException In case of I/O errors while closing the delegate writer or writing to an image file.
 */
@Override
public void close() throws IOException {
    super.close();
    for (FileFormat imageFormat : imageFormats) {
        File imageFile = new File(directory, baseName + imageFormat.getFileSuffix());
        LogSupport.info("Generating {0}...", imageFile);
        try (OutputStream imageOutput = new BufferedOutputStream(new FileOutputStream(imageFile))) {
            new SourceStringReader(getBuffer().toString()).generateImage(imageOutput, new FileFormatOption(imageFormat));
            LogSupport.debug("Finished image {0}.", imageFile);
        }
    }
}
 
开发者ID:talsma-ict,项目名称:umldoclet,代码行数:20,代码来源:PlantumlImageWriter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AuthorizationRequest类代码示例发布时间:2022-05-22
下一篇:
Java DeletionInfo类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap