Class DurationConstraintView

java.lang.Object
com.nomagic.magicdraw.uml.MDElementImpl
com.nomagic.magicdraw.uml.symbols.PresentationElement
com.nomagic.magicdraw.uml.symbols.paths.PathConnector
com.nomagic.magicdraw.uml.symbols.paths.PathElement
com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
com.nomagic.magicdraw.uml.symbols.paths.DurationConstraintView
All Implemented Interfaces:
BaseElement, com.nomagic.magicdraw.uml.CompartmentSupport, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.LabelOwner, com.nomagic.magicdraw.uml.symbols.LineJumpDrawer, com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener

@OpenApi public class DurationConstraintView extends com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
  • Constructor Details

    • DurationConstraintView

      public DurationConstraintView()
    • DurationConstraintView

      public DurationConstraintView(@CheckForNull PresentationElement parent)
  • Method Details

    • accept

      public void accept(Visitor visitor) throws Exception
      Description copied from interface: MDElement
      Method accepts a visitor, and calls method "visit<class name>(this)" of a visitor. See "Visitor" pattern for more details.
      Specified by:
      accept in interface MDElement
      Overrides:
      accept in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • getSupplierConnectionType

      public int getSupplierConnectionType()
      Overrides:
      getSupplierConnectionType in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
    • getDefaultParentForData

      @CheckForNull public Element getDefaultParentForData()
      Description copied from class: PathElement
      Presentation element could suggest parent, which would be more acceptable, than adding to the client If returning null, general mechanism will work
      Overrides:
      getDefaultParentForData in class PathElement
      Returns:
      parent for data
    • canBeDeleted

      public boolean canBeDeleted()
      Description copied from interface: BaseElement
      Checks if an element can be deleted from a project. Element cannot be deleted if it is not isEditable(), parent is not set, or parent does not allow to remove this element.
      Specified by:
      canBeDeleted in interface BaseElement
      Overrides:
      canBeDeleted in class com.nomagic.magicdraw.uml.MDElementImpl
      Returns:
      true, if an element can be deleted from a project.
      See Also:
    • isNoStateSet

      public static boolean isNoStateSet(PresentationElement pe)
    • draw

      public void draw(Graphics2D g, Point pt1, Point pt2, List<Point> breakPoints)
      Description copied from class: PathElement
      Draws link from given point pt1 through break points to given point pt2.
      Overrides:
      draw in class PathElement
      Parameters:
      g - graphics
      pt1 - first point
      pt2 - second point
      breakPoints - points between supplier and client points, in that order
    • createSmartListenerConfig

      protected void createSmartListenerConfig(List<SmartListenerConfig> configurations)
      Overrides:
      createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.paths.LinkWithStereotype
    • internalUpdatePresentationElement

      protected void internalUpdatePresentationElement()
      Description copied from class: PresentationElement
      Internal symbol update method for subclassing. It is called from update as part of full update action.
      Overrides:
      internalUpdatePresentationElement in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      See Also:
    • pathMovedBy

      public void pathMovedBy(PresentationElement end)
    • getEndPoint

      public Point getEndPoint(boolean forSupplier)
      Returns client or supplier point of the end element
      Parameters:
      forSupplier - true if point is calculated for supplier end of this link
      Returns:
      nearest end
    • getMessageIntersectionPoint

      public Point getMessageIntersectionPoint(PresentationElement end, int x)
      Returns point, where message link intersects straight line described by x
      Parameters:
      end - end
      x - coordinate
      Returns:
      point
    • constructNameTextToDisplay

      public String constructNameTextToDisplay()
      Overrides:
      constructNameTextToDisplay in class com.nomagic.magicdraw.uml.symbols.paths.ContainerLinkView
      Returns:
      pure name text for displaying
    • resetToDefaultPosition

      public void resetToDefaultPosition()
      Reset constraint view to the default position
    • getMiddlePoint

      public Point getMiddlePoint()
      Description copied from class: PathElement
      Calculates and returns middle point of link. For this link it is average between supplier's and client's points.
      Overrides:
      getMiddlePoint in class PathElement
      Returns:
      middle point.
    • getElement

      public DurationConstraint getElement()
      Description copied from class: PresentationElement
      Returns model element of this presentation element. Some presentation elements (for example TextBoxes) do not have model elements.
      Specified by:
      getElement in interface com.nomagic.magicdraw.uml.symbols.LabelOwner
      Specified by:
      getElement in interface ModelElementProvider
      Overrides:
      getElement in class PresentationElement
      Returns:
      model element of this presentation element.
    • canChangeLineStyle

      public boolean canChangeLineStyle()
      Overrides:
      canChangeLineStyle in class PathElement
      Returns:
      true if this link can change line style.
    • canClearBreakPoints

      public boolean canClearBreakPoints()
      Overrides:
      canClearBreakPoints in class PathElement
      Returns:
      true if link can be modified (all break points can be removed):