本文整理汇总了Java中net.sourceforge.plantuml.cucadiagram.GroupType类的典型用法代码示例。如果您正苦于以下问题:Java GroupType类的具体用法?Java GroupType怎么用?Java GroupType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GroupType类属于net.sourceforge.plantuml.cucadiagram包,在下文中一共展示了GroupType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printGroups
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
private void printGroups(DotStringFactory dotStringFactory, IGroup parent) {
for (IGroup g : dotData.getGroupHierarchy().getChildrenGroups(parent)) {
if (g.isRemoved()) {
continue;
}
if (dotData.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
final ILeaf folder = entityFactory.createLeaf(g.getCode(), g.getDisplay(), LeafType.EMPTY_PACKAGE,
g.getParentContainer(), null, dotData.getNamespaceSeparator());
final USymbol symbol = g.getUSymbol();
folder.setUSymbol(symbol);
folder.setStereotype(g.getStereotype());
if (g.getColors(dotData.getSkinParam()).getColor(ColorType.BACK) == null) {
final ColorParam param = symbol == null ? ColorParam.packageBackground : symbol.getColorParamBack();
final HtmlColor c1 = dotData.getSkinParam().getHtmlColor(param, g.getStereotype(), false);
folder.setSpecificColorTOBEREMOVED(ColorType.BACK, c1 == null ? dotData.getSkinParam()
.getBackgroundColor() : c1);
} else {
folder.setSpecificColorTOBEREMOVED(ColorType.BACK,
g.getColors(dotData.getSkinParam()).getColor(ColorType.BACK));
}
printEntity(dotStringFactory, folder);
} else {
printGroup(dotStringFactory, g);
}
}
}
示例2: concurrentActivity
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
public void concurrentActivity(String name) {
// Log.println("concurrentActivity A name=" + name+" "+getCurrentGroup());
if (getCurrentGroup().getGroupType() == GroupType.CONCURRENT_ACTIVITY) {
// getCurrentGroup().setRankdir(Rankdir.LEFT_TO_RIGHT);
endGroup();
// Log.println("endgroup");
}
// Log.println("concurrentActivity A name=" + name+" "+getCurrentGroup());
final Code code = Code.of("##" + UniqueSequence.getValue());
if (getCurrentGroup().getGroupType() != GroupType.INNER_ACTIVITY) {
throw new IllegalStateException("type=" + getCurrentGroup().getGroupType());
}
getOrCreateGroup(code, Display.getWithNewlines("code"), GroupType.CONCURRENT_ACTIVITY, getCurrentGroup());
lastEntityConsulted = null;
lastEntityBrancheConsulted = null;
}
示例3: CucaDiagramSimplifierState
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
public CucaDiagramSimplifierState(CucaDiagram diagram, List<String> dotStrings, StringBounder stringBounder)
throws IOException, InterruptedException {
this.diagram = diagram;
this.stringBounder = stringBounder;
boolean changed;
do {
changed = false;
final Collection<IGroup> groups = getOrdered(diagram.getRootGroup());
for (IGroup g : groups) {
if (diagram.isAutarkic(g)) {
final IEntityImage img = computeImage(g);
g.overideImage(img, g.getGroupType() == GroupType.CONCURRENT_STATE ? LeafType.STATE_CONCURRENT
: LeafType.STATE);
changed = true;
}
}
} while (changed);
}
示例4: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, List<String> arg) {
final Code code;
final String display;
if (arg.get(1) == null) {
if (StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0)).length() == 0) {
code = Code.of("##" + UniqueSequence.getValue());
display = null;
} else {
code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0)));
display = code.getFullName();
}
} else {
display = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0));
code = Code.of(arg.get(1));
}
final IGroup currentPackage = diagram.getCurrentGroup();
final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display), GroupType.PACKAGE,
currentPackage);
final String color = arg.get(2);
if (color != null) {
p.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color));
}
diagram.endGroup();
return CommandExecutionResult.ok();
}
示例5: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(ClassDiagram diagram, RegexResult arg) {
final Code code = Code.of(arg.get("NAME", 0));
final IGroup currentPackage = diagram.getCurrentGroup();
final IEntity p = diagram.getOrCreateNamespace(code, Display.getWithNewlines(code), GroupType.PACKAGE,
currentPackage);
final String stereotype = arg.get("STEREOTYPE", 0);
if (stereotype != null) {
p.setStereotype(new Stereotype(stereotype));
}
final String color = arg.get("COLOR", 0);
if (color != null) {
p.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color));
}
return CommandExecutionResult.ok();
}
示例6: concurrentState
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
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;
}
示例7: printGroups
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
private void printGroups(IGroup parent) throws IOException {
for (IGroup g : dotData.getGroupHierarchy().getChildrenGroups(parent)) {
if (g.isRemoved()) {
continue;
}
if (dotData.isEmpty(g) && g.getGroupType() == GroupType.PACKAGE) {
final ILeaf folder = entityFactory.createLeaf(g.getCode(), g.getDisplay(), LeafType.EMPTY_PACKAGE,
g.getParentContainer(), null, dotData.getNamespaceSeparator());
final USymbol symbol = g.getUSymbol();
folder.setUSymbol(symbol);
if (g.getSpecificBackColor() == null) {
final ColorParam param = symbol == null ? ColorParam.packageBackground : symbol.getColorParamBack();
final HtmlColor c1 = dotData.getSkinParam().getHtmlColor(param, g.getStereotype(), false);
folder.setSpecificBackcolor(c1 == null ? dotData.getSkinParam().getBackgroundColor() : c1);
} else {
folder.setSpecificBackcolor(g.getSpecificBackColor());
}
printEntity(folder);
} else {
printGroup(g);
}
}
}
示例8: concurrentActivity
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
public void concurrentActivity(String name) {
// Log.println("concurrentActivity A name=" + name+" "+getCurrentGroup());
if (getCurrentGroup().getGroupType() == GroupType.CONCURRENT_ACTIVITY) {
// getCurrentGroup().setRankdir(Rankdir.LEFT_TO_RIGHT);
endGroup();
// Log.println("endgroup");
}
// Log.println("concurrentActivity A name=" + name+" "+getCurrentGroup());
final Code code = Code.of("##" + UniqueSequence.getValue());
if (getCurrentGroup().getGroupType() != GroupType.INNER_ACTIVITY) {
throw new IllegalStateException("type=" + getCurrentGroup().getGroupType());
}
getOrCreateGroup(code, Display.getWithNewlines("code"), null, GroupType.CONCURRENT_ACTIVITY,
getCurrentGroup());
lastEntityConsulted = null;
lastEntityBrancheConsulted = null;
}
示例9: CucaDiagramSimplifierState
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
public CucaDiagramSimplifierState(CucaDiagram diagram, List<String> dotStrings) throws IOException,
InterruptedException {
this.diagram = diagram;
boolean changed;
do {
changed = false;
final Collection<IGroup> groups = putConcurrentStateAtEnd(diagram.getGroups(false));
for (IGroup g : groups) {
if (diagram.isAutarkic(g)) {
final IEntityImage img = computeImage(g);
g.overideImage(img, g.getGroupType() == GroupType.CONCURRENT_STATE ? LeafType.STATE_CONCURRENT
: LeafType.STATE);
changed = true;
}
}
} while (changed);
}
示例10: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, List<String> arg) {
final Code code;
final String display;
if (arg.get(1) == null) {
if (StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0)).length() == 0) {
code = Code.of("##" + UniqueSequence.getValue());
display = null;
} else {
code = Code.of(StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0)));
display = code.getFullName();
}
} else {
display = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get(0));
code = Code.of(arg.get(1));
}
final IGroup currentPackage = diagram.getCurrentGroup();
final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display), null, GroupType.PACKAGE,
currentPackage);
final String color = arg.get(2);
if (color != null) {
p.setSpecificBackcolor(diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color));
}
diagram.endGroup();
return CommandExecutionResult.ok();
}
示例11: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, RegexResult arg) {
final Code code = Code.of(arg.get("NAME", 0));
final IGroup currentPackage = diagram.getCurrentGroup();
final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(code), code, GroupType.PACKAGE,
currentPackage);
final String stereotype = arg.get("STEREOTYPE", 0);
if (stereotype != null) {
p.setStereotype(new Stereotype(stereotype));
}
final String color = arg.get("COLOR", 0);
if (color != null) {
p.setSpecificBackcolor(diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color));
}
return CommandExecutionResult.ok();
}
示例12: concurrentState
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
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;
}
示例13: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(StateDiagram diagram, RegexResult arg) {
final IGroup currentPackage = diagram.getCurrentGroup();
final Code code = Code.of(getNotNull(arg, "CODE1", "CODE2"));
String display = getNotNull(arg, "DISPLAY1", "DISPLAY2");
if (display == null) {
display = code.getFullName();
}
final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display), null, GroupType.STATE,
currentPackage);
final String stereotype = arg.get("STEREOTYPE", 0);
if (stereotype != null) {
p.setStereotype(new Stereotype(stereotype));
}
final String urlString = arg.get("URL", 0);
if (urlString != null) {
final UrlBuilder urlBuilder = new UrlBuilder(diagram.getSkinParam().getValue("topurl"), ModeUrl.STRICT);
final Url url = urlBuilder.getUrl(urlString);
p.addUrl(url);
}
p.setSpecificBackcolor(diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)));
p.setSpecificLineColor(diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("LINECOLOR", 1)));
CommandCreateClassMultilines.applyStroke(p, arg.get("LINECOLOR", 0));
return CommandExecutionResult.ok();
}
示例14: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(CompositeDiagram diagram, List<String> arg) {
final IGroup currentPackage = diagram.getCurrentGroup();
String display = arg.get(0);
final Code code = Code.of(arg.get(1));
if (display == null) {
display = code.getFullName();
}
diagram.getOrCreateGroup(code, Display.getWithNewlines(display), GroupType.PACKAGE, currentPackage);
return CommandExecutionResult.ok();
}
示例15: executeArg
import net.sourceforge.plantuml.cucadiagram.GroupType; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(AbstractEntityDiagram diagram, RegexResult arg) {
final Code code;
final String display;
final String name = StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(arg.get("NAME", 0));
if (arg.get("AS", 0) == null) {
if (name.length() == 0) {
code = UniqueSequence.getCode("##");
display = null;
} else {
code = Code.of(name);
display = code.getFullName();
}
} else {
display = name;
code = Code.of(arg.get("AS", 0));
}
final IGroup currentPackage = diagram.getCurrentGroup();
final IEntity p = diagram.getOrCreateGroup(code, Display.getWithNewlines(display),
GroupType.PACKAGE, currentPackage);
p.setUSymbol(USymbol.getFromString(arg.get("SYMBOL", 0)));
final String stereotype = arg.get("STEREOTYPE", 0);
if (stereotype != null) {
p.setStereotype(new Stereotype(stereotype, false));
}
final String color = arg.get("COLOR", 0);
if (color != null) {
p.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(color));
}
return CommandExecutionResult.ok();
}