Search in sources :

Example 1 with StunnerTextPreferences

use of org.kie.workbench.common.stunner.core.client.preferences.StunnerTextPreferences in project kie-wb-common by kiegroup.

the class BPMNShapeFactory method getFontHandler.

private <W extends BPMNViewDefinition, V extends ShapeView> FontHandler.Builder<W, V> getFontHandler() {
    final String definitionSetId = definitionUtils.getDefinitionSetId(BPMNDefinitionSet.class);
    final StunnerTextPreferences preferences = preferencesRegistries.get(definitionSetId, StunnerTextPreferences.class);
    return new BPMNShapeViewHandlers.FontHandlerBuilder<W, V>().alpha(c -> preferences.getTextAlpha()).fontFamily(c -> preferences.getTextFontFamily()).fontSize(c -> preferences.getTextFontSize()).fontColor(c -> preferences.getTextFillColor()).strokeColor(c -> preferences.getTextStrokeColor()).strokeSize(c -> preferences.getTextStrokeWidth()).strokeAlpha(c -> getStrokeAlpha(preferences.getTextStrokeWidth()));
}
Also used : EventGateway(org.kie.workbench.common.stunner.bpmn.definition.EventGateway) DefinitionUtils(org.kie.workbench.common.stunner.core.util.DefinitionUtils) BPMNDiagramShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.BPMNDiagramShapeDef) SequenceFlow(org.kie.workbench.common.stunner.bpmn.definition.SequenceFlow) DirectionalAssociation(org.kie.workbench.common.stunner.bpmn.definition.DirectionalAssociation) IntermediateCompensationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEventThrowing) TextAnnotationShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.TextAnnotationShapeDef) IntermediateLinkEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventCatching) IntermediateErrorEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateErrorEventCatching) ManagedInstance(org.jboss.errai.ioc.client.api.ManagedInstance) EndErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.EndErrorEvent) StartSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartSignalEvent) GatewayShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.GatewayShapeDef) StartTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.StartTimerEvent) UserTask(org.kie.workbench.common.stunner.bpmn.definition.UserTask) BPMNViewDefinition(org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition) IntermediateCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent) CustomTask(org.kie.workbench.common.stunner.bpmn.workitem.CustomTask) Lane(org.kie.workbench.common.stunner.bpmn.definition.Lane) GenericServiceTask(org.kie.workbench.common.stunner.bpmn.definition.GenericServiceTask) TextAnnotation(org.kie.workbench.common.stunner.bpmn.definition.TextAnnotation) NonDirectionalAssociation(org.kie.workbench.common.stunner.bpmn.definition.NonDirectionalAssociation) FontHandlerBuilder.getStrokeAlpha(org.kie.workbench.common.stunner.bpmn.client.shape.view.handler.BPMNShapeViewHandlers.FontHandlerBuilder.getStrokeAlpha) EndTerminateEvent(org.kie.workbench.common.stunner.bpmn.definition.EndTerminateEvent) BasicShapesFactory(org.kie.workbench.common.stunner.shapes.client.factory.BasicShapesFactory) StartConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.StartConditionalEvent) DelegateShapeFactory(org.kie.workbench.common.stunner.core.client.shape.factory.DelegateShapeFactory) StartErrorEvent(org.kie.workbench.common.stunner.bpmn.definition.StartErrorEvent) ExclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.ExclusiveGateway) ScriptTask(org.kie.workbench.common.stunner.bpmn.definition.ScriptTask) SequenceFlowConnectorDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.SequenceFlowConnectorDef) TaskShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.TaskShapeDef) ThrowingIntermediateEventShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.ThrowingIntermediateEventShapeDef) EmbeddedSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess) CustomTaskShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.CustomTaskShapeDef) PostConstruct(javax.annotation.PostConstruct) BPMNDefinitionSet(org.kie.workbench.common.stunner.bpmn.BPMNDefinitionSet) EndEventShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.EndEventShapeDef) IntermediateTimerEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateTimerEvent) NoneTask(org.kie.workbench.common.stunner.bpmn.definition.NoneTask) StartMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.StartMessageEvent) IntermediateLinkEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateLinkEventThrowing) AssociationConnectorDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.AssociationConnectorDef) StartCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartCompensationEvent) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) EndEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndEscalationEvent) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) BPMNShapeViewHandlers(org.kie.workbench.common.stunner.bpmn.client.shape.view.handler.BPMNShapeViewHandlers) SVGShapeFactory(org.kie.workbench.common.stunner.svg.client.shape.factory.SVGShapeFactory) ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) Supplier(java.util.function.Supplier) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) Shape(org.kie.workbench.common.stunner.core.client.shape.Shape) AdHocSubprocess(org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess) Inject(javax.inject.Inject) DataObject(org.kie.workbench.common.stunner.bpmn.definition.DataObject) IntermediateEscalationEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEventThrowing) Glyph(org.kie.workbench.common.stunner.core.definition.shape.Glyph) EndCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndCompensationEvent) IntermediateSignalEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventThrowing) ReusableSubprocess(org.kie.workbench.common.stunner.bpmn.definition.ReusableSubprocess) StunnerTextPreferences(org.kie.workbench.common.stunner.core.client.preferences.StunnerTextPreferences) FontHandler(org.kie.workbench.common.stunner.core.client.shape.view.handler.FontHandler) IntermediateSignalEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateSignalEventCatching) DataObjectShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.DataObjectShapeDef) StunnerPreferencesRegistries(org.kie.workbench.common.stunner.core.client.preferences.StunnerPreferencesRegistries) EndMessageEvent(org.kie.workbench.common.stunner.bpmn.definition.EndMessageEvent) CatchingIntermediateEventShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.CatchingIntermediateEventShapeDef) BPMNDefinition(org.kie.workbench.common.stunner.bpmn.definition.BPMNDefinition) EndSignalEvent(org.kie.workbench.common.stunner.bpmn.definition.EndSignalEvent) StartEventShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.StartEventShapeDef) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) InclusiveGateway(org.kie.workbench.common.stunner.bpmn.definition.InclusiveGateway) SubprocessShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.SubprocessShapeDef) ShapeView(org.kie.workbench.common.stunner.core.client.shape.view.ShapeView) EventSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EventSubprocess) IntermediateMessageEventThrowing(org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventThrowing) Dependent(javax.enterprise.context.Dependent) LaneShapeDef(org.kie.workbench.common.stunner.bpmn.client.shape.def.LaneShapeDef) StartEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.StartEscalationEvent) ShapeFactory(org.kie.workbench.common.stunner.core.client.shape.factory.ShapeFactory) WorkItemDefinitionRegistry(org.kie.workbench.common.stunner.bpmn.workitem.WorkItemDefinitionRegistry) MultipleInstanceSubprocess(org.kie.workbench.common.stunner.bpmn.definition.MultipleInstanceSubprocess) IntermediateMessageEventCatching(org.kie.workbench.common.stunner.bpmn.definition.IntermediateMessageEventCatching) EndNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent) StunnerTextPreferences(org.kie.workbench.common.stunner.core.client.preferences.StunnerTextPreferences) BPMNShapeViewHandlers(org.kie.workbench.common.stunner.bpmn.client.shape.view.handler.BPMNShapeViewHandlers)

Aggregations

Supplier (java.util.function.Supplier)1 PostConstruct (javax.annotation.PostConstruct)1 Dependent (javax.enterprise.context.Dependent)1 Inject (javax.inject.Inject)1 ManagedInstance (org.jboss.errai.ioc.client.api.ManagedInstance)1 BPMNDefinitionSet (org.kie.workbench.common.stunner.bpmn.BPMNDefinitionSet)1 AssociationConnectorDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.AssociationConnectorDef)1 BPMNDiagramShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.BPMNDiagramShapeDef)1 CatchingIntermediateEventShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.CatchingIntermediateEventShapeDef)1 CustomTaskShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.CustomTaskShapeDef)1 DataObjectShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.DataObjectShapeDef)1 EndEventShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.EndEventShapeDef)1 GatewayShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.GatewayShapeDef)1 LaneShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.LaneShapeDef)1 SequenceFlowConnectorDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.SequenceFlowConnectorDef)1 StartEventShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.StartEventShapeDef)1 SubprocessShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.SubprocessShapeDef)1 TaskShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.TaskShapeDef)1 TextAnnotationShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.TextAnnotationShapeDef)1 ThrowingIntermediateEventShapeDef (org.kie.workbench.common.stunner.bpmn.client.shape.def.ThrowingIntermediateEventShapeDef)1