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


Java FileFormat.UTXT属性代码示例

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


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

示例1: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int textWidth = StringUtils.getWidth(stringsToDisplay);
	// final int height = (int) dimensionToUse.getHeight();

	final int textPos = (width - textWidth - 1) / 2;
	final String desc = " " + stringsToDisplay.get(0).toString();

	if (fileFormat == FileFormat.UTXT) {
		charArea.drawHLine('\u2550', 2, 0, width, '\u2502', '\u256a');
		charArea.drawStringLR(desc, textPos, 2);
		
		charArea.drawHLine('\u2550', 1, textPos - 1, textPos + desc.length() + 1, '\u2502', '\u2567');
		charArea.drawHLine('\u2550', 3, textPos - 1, textPos + desc.length() + 1, '\u2502', '\u2564');
		
		charArea.drawStringTB("\u2554\u2563\u255a", textPos - 1, 1);
		charArea.drawStringTB("\u2557\u2560\u255d", textPos + desc.length(), 1);
	} else {
		charArea.drawHLine('=', 2, 0, width);
		charArea.drawStringLR(desc, textPos, 2);
		charArea.drawHLine('=', 1, textPos - 1, textPos + desc.length() + 1);
		charArea.drawHLine('=', 3, textPos - 1, textPos + desc.length() + 1);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:26,代码来源:ComponentTextDivider.java

示例2: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth() - 1;
	final int height = (int) dimensionToUse.getHeight();
	charArea.fillRect(' ', 2, 1, width - 3, height - 2);
	if (type == ComponentType.NOTE) {
		if (fileFormat == FileFormat.UTXT) {
			charArea.drawNoteSimpleUnicode(2, 0, width - 2, height);
		} else {
			charArea.drawNoteSimple(2, 0, width - 2, height);
		}
	} else if (type == ComponentType.NOTE_BOX) {
		if (fileFormat == FileFormat.UTXT) {
			charArea.drawBoxSimpleUnicode(2, 0, width - 2, height);
		} else {
			charArea.drawBoxSimple(2, 0, width - 2, height);
		}
	}
	charArea.drawStringsLR(stringsToDisplay.as(), 3, 1);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:21,代码来源:ComponentTextNote.java

示例3: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight();
	charArea.fillRect(' ', 0, 0, width, height);
	if (fileFormat == FileFormat.UTXT) {
		charArea.drawBoxSimpleUnicode(0, 0, width, height);
		if (type == ComponentType.PARTICIPANT_TAIL) {
			charArea.drawChar('\u2534', (width - 1) / 2, 0);
		}
		if (type == ComponentType.PARTICIPANT_HEAD) {
			charArea.drawChar('\u252c', (width - 1) / 2, height - 1);
		}
	} else {
		charArea.drawBoxSimple(0, 0, width, height);
		if (type == ComponentType.PARTICIPANT_TAIL) {
			charArea.drawChar('+', (width - 1) / 2, 0);
		}
		if (type == ComponentType.PARTICIPANT_HEAD) {
			charArea.drawChar('+', (width - 1) / 2, height - 1);
		}
	}
	charArea.drawStringsLR(stringsToDisplay.as(), 1, 1);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:25,代码来源:ComponentTextParticipant.java

示例4: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();

	if (stringsToDisplay.get(0) != null) {
		charArea.drawStringLR("[" + stringsToDisplay.get(0) + "]", 2, 0);
	}
	if (fileFormat == FileFormat.UTXT) {
		charArea.drawChar('\u2560', 0, -1);
		charArea.drawChar('\u2563', width - 1, -1);
		charArea.drawHLine('\u2550', -1, 1, width - 1, '\u2502', '\u256a');
	} else {
		charArea.drawHLine('~', -1, 1, width - 1);
	}

	// charArea.fillRect('E', 0, 0, width, height);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:ComponentTextGroupingElse.java

示例5: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight();

	if (fileFormat == FileFormat.UTXT) {
		charArea.drawVLine('\u2551', 0, 0, height);
		charArea.drawVLine('\u2551', width - 1, 0, height);
		charArea.drawHLine('\u2550', height - 1, 1, width - 1, '\u2502', '\u256a');
		charArea.drawChar('\u2560', 0, height - 1);
		charArea.drawChar('\u2563', width - 1, height - 1);
	} else {
		charArea.drawVLine('!', 0, 0, height);
		charArea.drawVLine('!', width - 1, 0, height);
		charArea.drawHLine('~', height - 1, 1, width - 1);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:ComponentTextGroupingBody.java

示例6: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();

	if (fileFormat == FileFormat.UTXT) {
		charArea.drawHLine('\u2550', 0, 0, width, '\u2502', '\u256a');
	} else {
		charArea.drawHLine('=', 0, 0, width);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:11,代码来源:ComponentTextNewpage.java

示例7: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight();
	if (fileFormat == FileFormat.UTXT) {
		charArea.fillRect(' ', 0, 0, width, height);
		charArea.drawBoxSimpleUnicode(0, 0, width, height);
		charArea.drawChar('\u2534', width/2, 0);
		charArea.drawChar('\u252c', width/2, height-1);
	} else {
		charArea.fillRect('X', 0, 0, width, height);
		charArea.drawBoxSimple(0, 0, width, height);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:15,代码来源:ComponentTextActiveLine.java

示例8: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	if (config.isHidden()) {
		return;
	}
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight() - 1;

	charArea.fillRect(' ', 0, 0, width, height);

	if (fileFormat == FileFormat.UTXT) {
		if (config.isDotted()) {
			charArea.drawStringLR("\u2500 \u2500 \u2510", 0, 0);
			charArea.drawStringLR("|", 4, 1);
			charArea.drawStringLR("< \u2500 \u2518", 0, 2);
		} else {
			charArea.drawStringLR("\u2500\u2500\u2500\u2500\u2510", 0, 0);
			charArea.drawStringLR("\u2502", 4, 1);
			charArea.drawStringLR("<\u2500\u2500\u2500\u2518", 0, 2);
		}
	} else if (config.isDotted()) {
		charArea.drawStringLR("- - .", 0, 0);
		charArea.drawStringLR("|", 4, 1);
		charArea.drawStringLR("< - '", 0, 2);
	} else {
		charArea.drawStringLR("----.", 0, 0);
		charArea.drawStringLR("|", 4, 1);
		charArea.drawStringLR("<---'", 0, 2);
	}

	charArea.drawStringsLR(stringsToDisplay.as(), 6, 1);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:33,代码来源:ComponentTextSelfArrow.java

示例9: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight();

	// charArea.fillRect('G', 0, 0, width, height);
	final String text = stringsToDisplay.get(0).toString();

	if (fileFormat == FileFormat.UTXT) {
		charArea.drawHLine('\u2550', 0, 1, width - 1, '\u2502', '\u256a');
		charArea.drawStringLR(StringUtils.goUpperCase(text) + "  /", 2, 1);
		charArea.drawHLine('\u2500', 2, 1, text.length() + 4);
		charArea.drawVLine('\u2551', 0, 1, height - 1);
		charArea.drawVLine('\u2551', width - 1, 1, height - 1);
		charArea.drawChar('\u255f', 0, 2);
		charArea.drawStringTB("\u2564\u2502\u2518", text.length() + 4, 0);
		charArea.drawChar('\u2554', 0, 0);
		charArea.drawChar('\u2557', width - 1, 0);
		charArea.drawHLine('\u2550', height - 1, 1, width - 1, '\u2502', '\u256a');
		charArea.drawChar('\u255a', 0, height - 1);
		charArea.drawChar('\u255d', width - 1, height - 1);
	} else {
		charArea.drawHLine('_', 0, 0, width - 1);
		charArea.drawStringLR(StringUtils.goUpperCase(text) + "  /", 2, 1);
		charArea.drawHLine('_', 2, 1, text.length() + 3);
		charArea.drawChar('/', text.length() + 3, 2);
		charArea.drawVLine('!', 0, 1, height);
		charArea.drawVLine('!', width - 1, 1, height);
		charArea.drawHLine('~', height - 1, 1, width - 1);
	}

	if (stringsToDisplay.size() > 1) {
		final String comment = stringsToDisplay.get(1).toString();
		charArea.drawStringLR(comment, text.length() + 7, 1);

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

示例10: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight();

	// charArea.fillRect('T', 0, 0, width, height);
	if (fileFormat == FileFormat.UTXT) {
		charArea.drawChar('\u255a', 0, height - 1);
		charArea.drawChar('\u255d', width - 1, height - 1);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:12,代码来源:ComponentTextGroupingTail.java

示例11: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth();
	final int height = (int) dimensionToUse.getHeight();
	if (fileFormat == FileFormat.UTXT) {
		charArea.drawVLine('\u2502', (width - 1) / 2, 0, height - 1);
	} else {
		charArea.drawVLine('|', (width - 1) / 2, 0, height - 1);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:11,代码来源:ComponentTextLine.java

示例12: getSequenceDiagramPngMaker

private FileMaker getSequenceDiagramPngMaker(FileFormatOption fileFormatOption) {

		final FileFormat fileFormat = fileFormatOption.getFileFormat();

		if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) {
			return new SequenceDiagramTxtMaker(this, fileFormat);
		}

		if (modeTeoz()) {
			return new SequenceDiagramFileMakerTeoz(this, getSkin2(), fileFormatOption);
		}

		return new SequenceDiagramFileMakerPuma2(this, getSkin2(), fileFormatOption);
	}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:14,代码来源:SequenceDiagram.java

示例13: exportDiagramInternal

@Override
protected ImageData exportDiagramInternal(OutputStream os, int index, FileFormatOption fileFormatOption)
		throws IOException {
	final FileFormat fileFormat = fileFormatOption.getFileFormat();

	if (fileFormat == FileFormat.ATXT || fileFormat == FileFormat.UTXT) {
		try {
			createFilesTxt(os, index, fileFormat);
		} catch (Throwable t) {
			t.printStackTrace(new PrintStream(os));
		}
		return new ImageDataSimple();
	}

	if (fileFormat.name().startsWith("XMI")) {
		createFilesXmi(os, fileFormat);
		return new ImageDataSimple();
	}

	if (fileFormat == FileFormat.SCXML) {
		createFilesScxml(os);
		return new ImageDataSimple();
	}

	if (getUmlDiagramType() == UmlDiagramType.COMPOSITE) {
		throw new UnsupportedOperationException();
	}

	// final CucaDiagramFileMaker maker = OptionFlags.USE_HECTOR ? new CucaDiagramFileMakerHectorC1(this)
	// : new CucaDiagramFileMakerSvek(this);
	final CucaDiagramFileMaker maker = this.isUseJDot() ? new CucaDiagramFileMakerJDot(this,
			fileFormat.getDefaultStringBounder()) : new CucaDiagramFileMakerSvek(this);
	final ImageData result = maker.createFile(os, getDotStrings(), fileFormatOption);

	if (result == null) {
		return new ImageDataSimple();
	}
	this.warningOrError = result.getWarningOrError();
	return result;
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:40,代码来源:CucaDiagram.java

示例14: createFiles

public List<File> createFiles(File suggestedFile) throws IOException {
	if (fileFormat == FileFormat.UTXT) {
		globalUg.getCharArea().print(new PrintStream(suggestedFile, "UTF-8"));
	} else {
		globalUg.getCharArea().print(new PrintStream(suggestedFile));
	}
	return Collections.singletonList(suggestedFile);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:8,代码来源:CucaDiagramTxtMaker.java

示例15: drawU

public void drawU(UGraphic ug, Area area, Context2D context) {
	final Dimension2D dimensionToUse = area.getDimensionToUse();
	final UmlCharArea charArea = ((UGraphicTxt) ug).getCharArea();
	final int width = (int) dimensionToUse.getWidth() - 1;
	final int height = (int) dimensionToUse.getHeight();
	charArea.fillRect(' ', 2, 1, width - 3, height - 2);
	if (fileFormat == FileFormat.UTXT) {
		charArea.drawNoteSimpleUnicode(2, 0, width - 2, height);
	} else {
		charArea.drawNoteSimple(2, 0, width - 2, height);
	}
	charArea.drawStringsLR(stringsToDisplay.as(), 3, 1);
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:13,代码来源:ComponentTextNote.java


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