use of org.camunda.bpm.model.bpmn.instance.dc.Font in project camunda-bpmn-model by camunda.
the class FontImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Font.class, DC_ELEMENT_FONT).namespaceUri(DC_NS).instanceProvider(new ModelTypeInstanceProvider<Font>() {
public Font newInstance(ModelTypeInstanceContext instanceContext) {
return new FontImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(DC_ATTRIBUTE_NAME).build();
sizeAttribute = typeBuilder.doubleAttribute(DC_ATTRIBUTE_SIZE).build();
isBoldAttribute = typeBuilder.booleanAttribute(DC_ATTRIBUTE_IS_BOLD).build();
isItalicAttribute = typeBuilder.booleanAttribute(DC_ATTRIBUTE_IS_ITALIC).build();
isUnderlineAttribute = typeBuilder.booleanAttribute(DC_ATTRIBUTE_IS_UNDERLINE).build();
isStrikeTroughAttribute = typeBuilder.booleanAttribute(DC_ATTRIBUTE_IS_STRIKE_THROUGH).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.bpmn.instance.dc.Font in project camunda-bpmn-model by camunda.
the class BpmnDiTest method testBpmnLabelStyle.
@Test
public void testBpmnLabelStyle() {
BpmnLabelStyle labelStyle = modelInstance.getModelElementsByType(BpmnLabelStyle.class).iterator().next();
Font font = labelStyle.getFont();
assertThat(font).isNotNull();
assertThat(font.getName()).isEqualTo("Arial");
assertThat(font.getSize()).isEqualTo(8.0);
assertThat(font.isBold()).isTrue();
assertThat(font.isItalic()).isFalse();
assertThat(font.isStrikeThrough()).isFalse();
assertThat(font.isUnderline()).isFalse();
}
Aggregations