本文整理汇总了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;
}
示例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;
}
示例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);
}
示例4: getTitleFontParam
private FontParam getTitleFontParam() {
if (symbol != null) {
return symbol.getFontParam();
}
return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE;
}
示例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());
}
示例6: getTitleFontParam
public FontParam getTitleFontParam() {
if (symbol != null) {
return symbol.getFontParam();
}
return getGroupType() == GroupType.STATE ? FontParam.STATE : FontParam.PACKAGE;
}