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


Java Stereotype类代码示例

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


Stereotype类属于net.sourceforge.plantuml.cucadiagram包,在下文中一共展示了Stereotype类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);

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

示例2: EntityImageUseCase

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
public EntityImageUseCase(ILeaf entity, ISkinParam skinParam) {
	super(entity, skinParam);
	final Stereotype stereotype = entity.getStereotype();

	final TextBlock tmp = new BodyEnhanced(entity.getDisplay(), FontParam.USECASE, skinParam,
			HorizontalAlignment.CENTER, stereotype, true, false, false);

	if (stereotype == null || stereotype.getLabel(false) == null) {
		this.desc = tmp;
	} else {
		final TextBlock stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet()))
				.create(new FontConfiguration(getSkinParam(), FontParam.ACTOR_STEREOTYPE, stereotype),
						HorizontalAlignment.CENTER, skinParam);
		this.desc = TextBlockUtils.mergeTB(stereo, tmp, HorizontalAlignment.CENTER);
	}
	this.url = entity.getUrl99();

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

示例3: EntityImageObject

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
public EntityImageObject(ILeaf entity, ISkinParam skinParam) {
	super(entity, skinParam);
	this.lineConfig = entity;
	final Stereotype stereotype = entity.getStereotype();
	this.roundCorner = skinParam.getRoundCorner();
	this.name = TextBlockUtils.withMargin(
			entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.OBJECT, stereotype),
					HorizontalAlignment.CENTER, skinParam), 2, 2);
	if (stereotype == null || stereotype.getLabel(false) == null) {
		this.stereo = null;
	} else {
		this.stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())).create(
				new FontConfiguration(getSkinParam(), FontParam.OBJECT_STEREOTYPE, stereotype),
				HorizontalAlignment.CENTER, skinParam);
	}

	if (entity.getBodier().getFieldsToDisplay().size() == 0) {
		this.fields = new TextBlockLineBefore(new TextBlockEmpty(10, 16));
	} else {
		this.fields = entity.getBodier().getBody(FontParam.OBJECT_ATTRIBUTE, skinParam, false, true, entity.getStereotype());
	}
	this.url = entity.getUrl99();

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

示例4: EntityImageArcCircle

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
public EntityImageArcCircle(ILeaf entity, ISkinParam skinParam) {
	super(entity, skinParam);

	final Stereotype stereotype = entity.getStereotype();

	this.name = entity.getDisplay().create(new FontConfiguration(getSkinParam(), FontParam.COMPONENT, stereotype),
			HorizontalAlignment.CENTER, skinParam);

	if (stereotype == null || stereotype.getLabel(false) == null) {
		this.stereo = null;
	} else {
		this.stereo = Display.getWithNewlines(stereotype.getLabel(getSkinParam().useGuillemet())).create(
				new FontConfiguration(getSkinParam(), FontParam.COMPONENT_STEREOTYPE, stereotype),
				HorizontalAlignment.CENTER, skinParam);
	}

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

示例5: getBackColor

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
private final HtmlColor getBackColor(final UmlDiagramType umlDiagramType) {
	if (EntityUtils.groupRoot(group)) {
		return null;
	}
	final HtmlColor result = group.getColors(skinParam).getColor(ColorType.BACK);
	if (result != null) {
		return result;
	}
	final Stereotype stereo = group.getStereotype();
	final USymbol sym = group.getUSymbol() == null ? USymbol.PACKAGE : group.getUSymbol();
	final ColorParam backparam = umlDiagramType == UmlDiagramType.ACTIVITY ? ColorParam.partitionBackground : sym
			.getColorParamBack();
	final HtmlColor c1 = skinParam.getHtmlColor(backparam, stereo, false);
	if (c1 != null) {
		return c1;
	}
	if (parent == null) {
		return null;
	}
	return parent.getBackColor(umlDiagramType);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:22,代码来源:Cluster.java

示例6: getStereoBlock

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
private TextBlock getStereoBlock(IGroup g) {
	final Stereotype stereotype = g.getStereotype();
	if (stereotype == null) {
		return TextBlockUtils.empty(0, 0);
	}
	if (stereotype.getSprite() != null) {
		final Sprite tmp = dotData.getSkinParam().getSprite(stereotype.getSprite());
		if (tmp != null) {
			return tmp.asTextBlock(stereotype.getHtmlColor(), 1);
		}
	}
	final List<String> stereos = stereotype.getLabels(dotData.getSkinParam().useGuillemet());
	if (stereos == null) {
		return TextBlockUtils.empty(0, 0);
	}
	final boolean show = dotData.showPortion(EntityPortion.STEREOTYPE, g);
	if (show == false) {
		return TextBlockUtils.empty(0, 0);
	}

	final FontParam fontParam = FontParam.PACKAGE_STEREOTYPE;
	return Display.create(stereos).create(new FontConfiguration(dotData.getSkinParam(), fontParam, stereotype),
			HorizontalAlignment.CENTER, dotData.getSkinParam());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:25,代码来源:DotDataImageBuilder.java

示例7: setStereotype

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
public final void setStereotype(Stereotype stereotype, boolean stereotypePositionTop) {
	// if (type == ParticipantType.ACTOR) {
	// return;
	// }
	if (this.stereotype != null) {
		throw new IllegalStateException();
	}
	if (stereotype == null) {
		throw new IllegalArgumentException();
	}
	this.stereotype = stereotype;
	if (stereotypePositionTop) {
		display = display.addFirst(stereotype);
	} else {
		display = display.add(stereotype);
	}
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:Participant.java

示例8: getStereoBlock

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
private TextBlock getStereoBlock(IGroup g) {
	final Stereotype stereotype = g.getStereotype();
	if (stereotype == null) {
		return TextBlockUtils.empty(0, 0);
	}
	if (stereotype.getSprite() != null) {
		final Sprite tmp = diagram.getSkinParam().getSprite(stereotype.getSprite());
		if (tmp != null) {
			return tmp.asTextBlock(stereotype.getHtmlColor(), 1);
		}
	}
	final List<String> stereos = stereotype.getLabels(diagram.getSkinParam().useGuillemet());
	if (stereos == null) {
		return TextBlockUtils.empty(0, 0);
	}
	final boolean show = diagram.showPortion(EntityPortion.STEREOTYPE, g);
	if (show == false) {
		return TextBlockUtils.empty(0, 0);
	}

	final FontParam fontParam = FontParam.PACKAGE_STEREOTYPE;
	return Display.create(stereos).create(new FontConfiguration(diagram.getSkinParam(), fontParam, stereotype),
			HorizontalAlignment.CENTER, diagram.getSkinParam());
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:25,代码来源:CucaDiagramFileMakerJDot.java

示例9: executeArg0

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
private IEntity executeArg0(AbstractClassOrObjectDiagram diagram, RegexResult line0) {
	final Code code = Code.of(line0.get("NAME", 1));
	final String display = line0.get("NAME", 0);
	final String stereotype = line0.get("STEREO", 0);
	if (diagram.leafExist(code)) {
		return diagram.getOrCreateLeaf(code, LeafType.OBJECT, null);
	}
	final IEntity entity = diagram.createLeaf(code, Display.getWithNewlines(display), LeafType.OBJECT, null);
	if (stereotype != null) {
		entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram
				.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam()
				.getIHtmlColorSet()));
	}
	entity.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(line0.get("COLOR", 0)));
	return entity;
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:17,代码来源:CommandCreateEntityObjectMultilines.java

示例10: executeArg

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
@Override
protected CommandExecutionResult executeArg(AbstractClassOrObjectDiagram diagram, RegexResult arg) {
	final Code code = Code.of(arg.get("NAME", 1));
	final String display = arg.get("NAME", 0);
	final String stereotype = arg.get("STEREO", 0);
	if (diagram.leafExist(code)) {
		return CommandExecutionResult.error("Object already exists : " + code);
	}
	final IEntity entity = diagram.createLeaf(code, Display.getWithNewlines(display), LeafType.OBJECT, null);
	if (stereotype != null) {
		entity.setStereotype(new Stereotype(stereotype, diagram.getSkinParam().getCircledCharacterRadius(), diagram
				.getSkinParam().getFont(null, false, FontParam.CIRCLED_CHARACTER), diagram.getSkinParam()
				.getIHtmlColorSet()));
	}
	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);
		entity.addUrl(url);
	}
	entity.setSpecificColorTOBEREMOVED(ColorType.BACK, diagram.getSkinParam().getIHtmlColorSet().getColorIfValid(arg.get("COLOR", 0)));
	return CommandExecutionResult.ok();
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:24,代码来源:CommandCreateEntityObject.java

示例11: getHtmlColor

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
@Override
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
	if (param.isBackground() && backColorElement != null) {
		return backColorElement;
	}
	if (forceClickage) {
		final HtmlColor c1 = super.getHtmlColor(param, stereotype, true);
		if (c1 != null) {
			return c1;
		}
		// clickable = true;
	}
	final HtmlColor forcedColor = forced.get(param);
	if (forcedColor != null) {
		return forcedColor;
	}
	return super.getHtmlColor(param, stereotype, clickable);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:19,代码来源:SkinParamBackcolored.java

示例12: getHtmlColor

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
public HtmlColor getHtmlColor(ColorParam param, Stereotype stereotype, boolean clickable) {
	if (stereotype != null) {
		checkStereotype(stereotype);
		for (String s : stereotype.getMultipleLabels()) {
			final String value2 = getValue(param.name() + "color" + "<<" + s + ">>");
			if (value2 != null && getIHtmlColorSet().getColorIfValid(value2) != null) {
				return getIHtmlColorSet().getColorIfValid(value2);
			}
		}
	}
	final String value = getValue(getParamName(param, clickable));
	if (value == null) {
		return null;
	}
	final boolean acceptTransparent = param == ColorParam.background;
	return getIHtmlColorSet().getColorIfValid(value, acceptTransparent);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:SkinParam.java

示例13: getFontSize

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
private int getFontSize(Stereotype stereotype, FontParam... param) {
	if (stereotype != null) {
		checkStereotype(stereotype);
		final String value2 = getFirstValueNonNullWithSuffix("fontsize" + stereotype.getLabel(false), param);
		if (value2 != null && value2.matches("\\d+")) {
			return Integer.parseInt(value2);
		}
	}
	String value = getFirstValueNonNullWithSuffix("fontsize", param);
	if (value == null || value.matches("\\d+") == false) {
		value = getValue("defaultfontsize");
	}
	if (value == null || value.matches("\\d+") == false) {
		return param[0].getDefaultSize(this);
	}
	return Integer.parseInt(value);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:SkinParam.java

示例14: getFontFamily

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
private String getFontFamily(Stereotype stereotype, FontParam... param) {
	if (stereotype != null) {
		checkStereotype(stereotype);
		final String value2 = getFirstValueNonNullWithSuffix("fontname" + stereotype.getLabel(false), param);
		if (value2 != null) {
			return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value2);
		}
	}
	// Times, Helvetica, Courier or Symbol
	String value = getFirstValueNonNullWithSuffix("fontname", param);
	if (value != null) {
		return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value);
	}
	if (param[0] != FontParam.CIRCLED_CHARACTER) {
		value = getValue("defaultfontname");
		if (value != null) {
			return StringUtils.eventuallyRemoveStartingAndEndingDoubleQuote(value);
		}
	}
	return param[0].getDefaultFamily();
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:22,代码来源:SkinParam.java

示例15: getFontHtmlColor

import net.sourceforge.plantuml.cucadiagram.Stereotype; //导入依赖的package包/类
public HtmlColor getFontHtmlColor(Stereotype stereotype, FontParam... param) {
	String value = null;
	if (stereotype != null) {
		checkStereotype(stereotype);
		value = getFirstValueNonNullWithSuffix("fontcolor" + stereotype.getLabel(false), param);
	}
	if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) {
		value = getFirstValueNonNullWithSuffix("fontcolor", param);
	}
	if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) {
		value = getValue("defaultfontcolor");
	}
	if (value == null || getIHtmlColorSet().getColorIfValid(value) == null) {
		value = param[0].getDefaultColor();
	}
	return getIHtmlColorSet().getColorIfValid(value);
}
 
开发者ID:Banno,项目名称:sbt-plantuml-plugin,代码行数:18,代码来源:SkinParam.java


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