本文整理汇总了Java中net.sourceforge.plantuml.cucadiagram.Stereotype.isWithOOSymbol方法的典型用法代码示例。如果您正苦于以下问题:Java Stereotype.isWithOOSymbol方法的具体用法?Java Stereotype.isWithOOSymbol怎么用?Java Stereotype.isWithOOSymbol使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sourceforge.plantuml.cucadiagram.Stereotype
的用法示例。
在下文中一共展示了Stereotype.isWithOOSymbol方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: EntityImageState
import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入方法依赖的package包/类
public EntityImageState(IEntity entity, ISkinParam skinParam) {
super(entity, skinParam);
this.lineConfig = entity;
final Stereotype stereotype = entity.getStereotype();
this.withSymbol = stereotype != null && stereotype.isWithOOSymbol();
this.desc = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.STATE, stereotype),
HorizontalAlignment.CENTER, skinParam);
Display list = Display.empty();
for (Member att : entity.getBodier().getFieldsToDisplay()) {
list = list.addAll(Display.getWithNewlines(att.getDisplay(true)));
}
this.url = entity.getUrl99();
this.fields = list.create(new FontConfiguration(getSkinParam(), FontParam.STATE_ATTRIBUTE, stereotype),
HorizontalAlignment.LEFT, skinParam);
}
示例2: EntityImageState
import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入方法依赖的package包/类
public EntityImageState(IEntity entity, ISkinParam skinParam) {
super(entity, skinParam);
this.lineConfig = entity;
final Stereotype stereotype = entity.getStereotype();
this.withSymbol = stereotype != null && stereotype.isWithOOSymbol();
this.desc = TextBlockUtils.create(
entity.getDisplay(),
new FontConfiguration(SkinParamUtils.getFont(getSkinParam(),
FontParam.STATE, stereotype), SkinParamUtils.getFontColor(getSkinParam(), FontParam.STATE,
stereotype), getSkinParam().getHyperlinkColor()), HorizontalAlignment.CENTER, skinParam);
Display list = Display.empty();
for (Member att : entity.getFieldsToDisplay()) {
list = list.addAll(Display.getWithNewlines(att.getDisplay(true)));
}
this.url = entity.getUrl99();
this.fields = TextBlockUtils.create(
list,
new FontConfiguration(SkinParamUtils.getFont(getSkinParam(),
FontParam.STATE_ATTRIBUTE, stereotype), SkinParamUtils.getFontColor(getSkinParam(),
FontParam.STATE_ATTRIBUTE, stereotype), getSkinParam().getHyperlinkColor()), HorizontalAlignment.LEFT, skinParam);
}
示例3: drawUState
import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入方法依赖的package包/类
private void drawUState(UGraphic ug, HtmlColor borderColor, ISkinParam skinParam2, UStroke stroke,
UmlDiagramType umlDiagramType) {
final Dimension2D total = new Dimension2DDouble(maxX - minX, maxY - minY);
final double suppY;
if (ztitle == null) {
suppY = 0;
} else {
suppY = ztitle.calculateDimension(ug.getStringBounder()).getHeight() + IEntityImage.MARGIN
+ IEntityImage.MARGIN_LINE;
}
HtmlColor stateBack = getBackColor(umlDiagramType);
if (stateBack == null) {
stateBack = getColor(skinParam2, ColorParam.stateBackground, group.getStereotype());
}
final HtmlColor background = getColor(skinParam2, ColorParam.background, null);
final TextBlockWidth attribute = getTextBlockAttribute(skinParam2);
final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight();
final RoundedContainer r = new RoundedContainer(total, suppY, attributeHeight
+ (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, stateBack, background, stroke);
r.drawU(ug.apply(new UTranslate(minX, minY)), skinParam2.shadowing());
if (ztitle != null) {
ztitle.drawU(ug.apply(new UTranslate(xTitle, yTitle)));
}
if (attributeHeight > 0) {
attribute.asTextBlock(total.getWidth()).drawU(
ug.apply(new UTranslate(minX + IEntityImage.MARGIN, minY + suppY + IEntityImage.MARGIN / 2.0)));
}
final Stereotype stereotype = group.getStereotype();
final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol();
if (withSymbol) {
EntityImageState.drawSymbol(ug.apply(new UChangeColor(borderColor)), maxX, maxY);
}
}
示例4: drawUState
import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入方法依赖的package包/类
private void drawUState(UGraphic ug, HtmlColor borderColor, DotData dotData, UStroke stroke) {
final Dimension2D total = new Dimension2DDouble(maxX - minX, maxY - minY);
final double suppY;
if (ztitle == null) {
suppY = 0;
} else {
suppY = ztitle.calculateDimension(ug.getStringBounder()).getHeight() + IEntityImage.MARGIN
+ IEntityImage.MARGIN_LINE;
}
HtmlColor stateBack = getBackColor();
if (stateBack == null) {
stateBack = getColor(dotData, ColorParam.stateBackground, group.getStereotype());
}
final HtmlColor background = getColor(dotData, ColorParam.background, null);
final TextBlockWidth attribute = getTextBlockAttribute(dotData);
final double attributeHeight = attribute.calculateDimension(ug.getStringBounder()).getHeight();
final RoundedContainer r = new RoundedContainer(total, suppY, attributeHeight
+ (attributeHeight > 0 ? IEntityImage.MARGIN : 0), borderColor, stateBack, background, stroke);
r.drawU(ug.apply(new UTranslate(minX, minY)), dotData.getSkinParam().shadowing());
if (ztitle != null) {
ztitle.drawU(ug.apply(new UTranslate(xTitle, yTitle)));
}
if (attributeHeight > 0) {
attribute.asTextBlock(total.getWidth()).drawU(
ug.apply(new UTranslate(minX + IEntityImage.MARGIN, minY + suppY + IEntityImage.MARGIN / 2.0)));
}
final Stereotype stereotype = group.getStereotype();
final boolean withSymbol = stereotype != null && stereotype.isWithOOSymbol();
if (withSymbol) {
EntityImageState.drawSymbol(ug.apply(new UChangeColor(borderColor)), maxX, maxY);
}
}
示例5: getImage
import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入方法依赖的package包/类
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);
}
示例6: getImage
import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入方法依赖的package包/类
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());
}