private void UpdateMultiInstanceIcon()
 {
     multiInstanceIcon = IconFactory.CreatePlacedIcon(
         IconFactory.CreateLoopCharacteristic(LoopCharacteristic.Parallel, IconColor),
         BpmnConstants.ChoreographyMarkerPlacement,
         BpmnConstants.MarkerSize);
 }
 private void UpdateTypeIcon()
 {
     typeIcon = IconFactory.CreateDataObjectType(Type, IconColor);
     if (typeIcon != null)
     {
         typeIcon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.DataObjectTypePlacement, BpmnConstants.DataObjectTypeSize);
     }
 }
 private void UpdateTypeIcon()
 {
     typeIcon = IconFactory.CreateGatewayType(type, IconColor);
     if (typeIcon != null)
     {
         typeIcon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.GatewayTypePlacement, SizeD.Empty);
     }
 }
Exemple #4
0
 private void CreateTypeIcon()
 {
     typeIcon = IconFactory.CreateEventType(type, fillTypeIcon, IconColor, Background);
     if (typeIcon != null)
     {
         typeIcon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.EventTypePlacement, SizeD.Empty);
     }
 }
 private void UpdateTopInitiatingMessageIcon()
 {
     topInitiatingMessageIcon = IconFactory.CreateCombinedIcon(new[] {
         IconFactory.CreatePlacedIcon(messageLineIcon, ExteriorLabelModel.North, new SizeD(MessageDistance, MessageDistance)),
         IconFactory.CreatePlacedIcon(initiatingMessageIcon, BpmnConstants.ChoreographyTopMessagePlacement,
                                      BpmnConstants.MessageSize)
     });
 }
 private void UpdateBottomResponseMessageIcon()
 {
     bottomResponseMessageIcon = IconFactory.CreateCombinedIcon(new[] {
         IconFactory.CreatePlacedIcon(messageLineIcon, ExteriorLabelModel.South,
                                      new SizeD(MessageDistance, MessageDistance)),
         IconFactory.CreatePlacedIcon(responseMessageIcon, BpmnConstants.ChoreographyBottomMessagePlacement,
                                      BpmnConstants.MessageSize)
     });
 }
Exemple #7
0
        private void CreateEventIcon()
        {
            eventIcon = IconFactory.CreateEvent(Characteristic, Background, Outline);
            eventIcon = IconFactory.CreatePlacedIcon(eventIcon, BpmnConstants.EventPlacement, MinimumSize);
            bool isFilled = Characteristic == EventCharacteristic.Throwing || Characteristic == EventCharacteristic.End;

            if (isFilled != fillTypeIcon)
            {
                fillTypeIcon = isFilled;
                CreateTypeIcon();
            }
        }
Exemple #8
0
        private void UpdateIcon()
        {
            var typeIcon   = IconFactory.CreateConversation(type, Background, Outline);
            var markerIcon = IconFactory.CreateConversationMarker(type, IconColor);

            if (markerIcon != null)
            {
                markerIcon = IconFactory.CreatePlacedIcon(markerIcon, BpmnConstants.ConversationMarkerPlacement,
                                                          BpmnConstants.MarkerSize);
                typeIcon = IconFactory.CreateCombinedIcon(new List <IIcon>(new[] { typeIcon, markerIcon }));
            }

            Icon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.ConversationPlacement,
                                                BpmnConstants.ConversationSize);
        }
        private IIcon CreateTaskBandIcon(INode node)
        {
            if (taskBandBackgroundIcon == null)
            {
                UpdateTaskBandIcon();
            }
            IIcon subStateIcon = null;

            if (SubState != SubState.None)
            {
                subStateIcon = SubState == SubState.Dynamic ? IconFactory.CreateDynamicSubState(node, IconColor) : IconFactory.CreateStaticSubState(SubState, IconColor);
            }

            IIcon markerIcon = null;

            if (loopIcon != null && subStateIcon != null)
            {
                markerIcon = IconFactory.CreateLineUpIcon(new List <IIcon>(new [] { loopIcon, subStateIcon }),
                                                          BpmnConstants.MarkerSize, 5);
            }
            else if (loopIcon != null)
            {
                markerIcon = loopIcon;
            }
            else if (subStateIcon != null)
            {
                markerIcon = subStateIcon;
            }
            if (markerIcon != null)
            {
                var placedMarkers = IconFactory.CreatePlacedIcon(markerIcon, BpmnConstants.ChoreographyMarkerPlacement,
                                                                 BpmnConstants.MarkerSize);
                return(IconFactory.CreateCombinedIcon(new List <IIcon>(new[] { taskBandBackgroundIcon, placedMarkers })));
            }
            else
            {
                return(taskBandBackgroundIcon);
            }
        }
 private void UpdateTaskIcon()
 {
     if (TaskType == TaskType.EventTriggered)
     {
         var eventNodeStyle = new EventNodeStyle {
             Characteristic = TriggerEventCharacteristic,
             Type           = TriggerEventType,
             Background     = Background,
             Outline        = EventOutline,
             IconColor      = IconColor
         };
         eventNodeStyle.UpdateIcon(null);
         taskIcon = eventNodeStyle.Icon;
     }
     else
     {
         taskIcon = IconFactory.CreateActivityTaskType(taskType, IconColor, Background);
     }
     if (taskIcon != null)
     {
         taskIcon = IconFactory.CreatePlacedIcon(taskIcon, BpmnConstants.TaskTypePlacement, BpmnConstants.TaskTypeSize);
     }
 }
 private void UpdateCollectionIcon()
 {
     collectionIcon = IconFactory.CreatePlacedIcon(
         IconFactory.CreateLoopCharacteristic(LoopCharacteristic.Parallel, IconColor),
         BpmnConstants.DataObjectMarkerPlacement, BpmnConstants.MarkerSize);
 }
 private void UpdateGatewayIcon()
 {
     gatewayIcon = IconFactory.CreatePlacedIcon(IconFactory.CreateGateway(Background, Outline), BpmnConstants.GatewayPlacement, SizeD.Empty);
 }
        internal IIcon CreateIcon(INode node)
        {
            var minimumWidth = 10.0;

            var icons = new List <IIcon>();

            if (activityIcon != null)
            {
                icons.Add(activityIcon);
            }
            if (taskIcon != null)
            {
                icons.Add(taskIcon);
            }

            var lineUpIcons = new List <IIcon>();

            if (loopIcon != null)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                lineUpIcons.Add(loopIcon);
            }
            if (AdHoc)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                lineUpIcons.Add(adHocIcon);
            }
            if (Compensation)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                lineUpIcons.Add(compensationIcon);
            }
            if (SubState != SubState.None)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                if (SubState == SubState.Dynamic)
                {
                    lineUpIcons.Add(IconFactory.CreateDynamicSubState(node, IconColor));
                }
                else
                {
                    lineUpIcons.Add(IconFactory.CreateStaticSubState(SubState, IconColor));
                }
            }
            if (lineUpIcons.Count > 0)
            {
                IIcon lineUpIcon = IconFactory.CreateLineUpIcon(lineUpIcons, BpmnConstants.MarkerSize, 5);
                icons.Add(IconFactory.CreatePlacedIcon(lineUpIcon, BpmnConstants.TaskMarkerPlacement, BpmnConstants.MarkerSize));
            }

            MinimumSize = new SizeD(Math.Max(minimumWidth, 40), 40);
            if (icons.Count > 1)
            {
                return(IconFactory.CreateCombinedIcon(icons));
            }
            else if (icons.Count == 1)
            {
                return(icons[0]);
            }
            else
            {
                return(null);
            }
        }