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


Java GroupType.STATE属性代码示例

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


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

示例1: concurrentState

public boolean concurrentState(char direction) {
	final IGroup cur = getCurrentGroup();
	// printlink("BEFORE");
	if (EntityUtils.groupRoot(cur) == false && cur.getGroupType() == GroupType.CONCURRENT_STATE) {
		super.endGroup();
	}
	getCurrentGroup().setConcurrentSeparator(direction);
	final IGroup conc1 = getOrCreateGroup(UniqueSequence.getCode(CONCURRENT_PREFIX), Display.create(""),
			GroupType.CONCURRENT_STATE, getCurrentGroup());
	if (EntityUtils.groupRoot(cur) == false && cur.getGroupType() == GroupType.STATE) {
		cur.moveEntitiesTo(conc1);
		super.endGroup();
		getOrCreateGroup(UniqueSequence.getCode(CONCURRENT_PREFIX), Display.create(""), GroupType.CONCURRENT_STATE,
				getCurrentGroup());
	}
	// printlink("AFTER");
	return true;
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:StateDiagram.java

示例2: concurrentState

public boolean concurrentState() {
	final IGroup cur = getCurrentGroup();
	// printlink("BEFORE");
	if (EntityUtils.groupRoot(cur) == false && cur.getGroupType() == GroupType.CONCURRENT_STATE) {
		super.endGroup();
	}
	final IGroup conc1 = getOrCreateGroup(UniqueSequence.getCode("CONC"), Display.create(""), null,
			GroupType.CONCURRENT_STATE, getCurrentGroup());
	if (EntityUtils.groupRoot(cur) == false && cur.getGroupType() == GroupType.STATE) {
		cur.moveEntitiesTo(conc1);
		super.endGroup();
		getOrCreateGroup(UniqueSequence.getCode("CONC"), Display.create(""), null, GroupType.CONCURRENT_STATE,
				getCurrentGroup());
	}
	// printlink("AFTER");
	return true;
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:17,代码来源:StateDiagram.java

示例3: getImage

public IEntityImage getImage() {
	final Display display = group.getDisplay();
	final ISkinParam skinParam = diagram.getSkinParam();
	final TextBlock title = display.create(
			new FontConfiguration(skinParam, FontParam.STATE, group.getStereotype()), HorizontalAlignment.CENTER,
			diagram.getSkinParam());

	if (group.size() == 0 && group.getChildren().size() == 0) {
		return new EntityImageState(group, diagram.getSkinParam());
	}
	final List<Link> links = getPureInnerLinks();

	final DotData dotData = new DotData(group, links, group.getLeafsDirect(), diagram.getUmlDiagramType(),
			skinParam, new InnerGroupHierarchy(), diagram.getColorMapper(), diagram.getEntityFactory(),
			diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL, diagram.getNamespaceSeparator(),
			diagram.getPragma());

	final DotDataImageBuilder svek2 = new DotDataImageBuilder(dotData, diagram.getEntityFactory(),
			diagram.getSource(), diagram.getPragma(), stringBounder);
	
	if (group.getGroupType() == GroupType.CONCURRENT_STATE) {
		// return new InnerStateConcurrent(svek2.createFile());
		return svek2.buildImage(null, new String[0]);
	}

	if (group.getGroupType() != GroupType.STATE) {
		throw new UnsupportedOperationException(group.getGroupType().toString());
	}

	HtmlColor borderColor = group.getColors(skinParam).getColor(ColorType.LINE);
	if (borderColor == null) {
		borderColor = getColor(ColorParam.stateBorder, group.getStereotype());
	}
	final Stereotype stereo = group.getStereotype();
	final HtmlColor backColor = group.getColors(skinParam).getColor(ColorType.BACK) == null ? getColor(
			ColorParam.stateBackground, stereo) : group.getColors(skinParam).getColor(ColorType.BACK);
	final List<Member> members = ((IEntity) group).getBodier().getFieldsToDisplay();
	final TextBlockWidth attribute;
	if (members.size() == 0) {
		attribute = new TextBlockEmpty();
	} else {
		attribute = new MethodsOrFieldsArea(members, FontParam.STATE_ATTRIBUTE, diagram.getSkinParam(),
				group.getStereotype());
	}

	final Stereotype stereotype = group.getStereotype();
	final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol();

	final boolean containsOnlyConcurrentStates = containsOnlyConcurrentStates(dotData);
	final IEntityImage image = containsOnlyConcurrentStates ? buildImageForConcurrentState(dotData) : svek2
			.buildImage(null, new String[0]);
	UStroke stroke = group.getColors(skinParam).getSpecificLineStroke();
	if (stroke == null) {
		stroke = new UStroke(1.5);
	}
	return new InnerStateAutonom(image, title, attribute, borderColor, backColor, skinParam.shadowing(),
			group.getUrl99(), withSymbol, stroke);

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

示例4: getTitleFontParam

private FontParam getTitleFontParam() {
	if (symbol != null) {
		return symbol.getFontParam();
	}
	return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE;
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:6,代码来源:EntityImpl.java

示例5: getImage

public IEntityImage getImage() throws IOException, InterruptedException {
	final Display display = group.getDisplay();
	final TextBlock title = TextBlockUtils.create(display, new FontConfiguration(getFont(FontParam.STATE),
			HtmlColorUtils.BLACK, HtmlColorUtils.BLUE), HorizontalAlignment.CENTER, diagram.getSkinParam());

	if (group.size() == 0) {
		return new EntityImageState(group, diagram.getSkinParam());
	}
	final List<Link> links = getPureInnerLinks();
	final ISkinParam skinParam = diagram.getSkinParam();

	boolean hasVerticalLine = false;
	for (ILeaf leaf : group.getLeafsDirect()) {
		if (leaf.getEntityType() == LeafType.STATE_CONCURRENT) {
			hasVerticalLine = true;
		}
	}

	final DotData dotData = new DotData(group, links, group.getLeafsDirect(), diagram.getUmlDiagramType(),
			skinParam, group.getRankdir(), new InnerGroupHierarchy(), diagram.getColorMapper(),
			diagram.getEntityFactory(), diagram.isHideEmptyDescriptionForState(), DotMode.NORMAL,
			diagram.getNamespaceSeparator(), diagram.getPragma());

	final CucaDiagramFileMakerSvek2 svek2 = new CucaDiagramFileMakerSvek2(dotData, diagram.getEntityFactory(),
			hasVerticalLine, diagram.getSource(), diagram.getPragma());
	UStroke stroke = group.getSpecificLineStroke();
	if (stroke == null) {
		stroke = new UStroke(1.5);
	}

	if (group.getGroupType() == GroupType.CONCURRENT_STATE) {
		// return new InnerStateConcurrent(svek2.createFile());
		return svek2.createFile();
	} else if (group.getGroupType() == GroupType.STATE) {
		HtmlColor borderColor = group.getSpecificLineColor();
		if (borderColor == null) {
			borderColor = getColor(ColorParam.stateBorder, null);
		}
		final Stereotype stereo = group.getStereotype();
		final HtmlColor backColor = group.getSpecificBackColor() == null ? getColor(ColorParam.stateBackground,
				stereo) : group.getSpecificBackColor();
		final List<Member> members = ((IEntity) group).getFieldsToDisplay();
		final TextBlockWidth attribute;
		if (members.size() == 0) {
			attribute = new TextBlockEmpty();
		} else {
			attribute = new MethodsOrFieldsArea(members, FontParam.STATE_ATTRIBUTE, diagram.getSkinParam());
		}

		final Stereotype stereotype = group.getStereotype();
		final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol();

		return new InnerStateAutonom(svek2.createFile(), title, attribute, borderColor, backColor,
				skinParam.shadowing(), group.getUrl99(), withSymbol, stroke);
	}

	throw new UnsupportedOperationException(group.getGroupType().toString());

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

示例6: getTitleFontParam

public FontParam getTitleFontParam() {
	if (symbol != null) {
		return symbol.getFontParam();
	}
	return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE;
}
 
开发者ID:mar9000,项目名称:plantuml,代码行数:6,代码来源:EntityImpl.java


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