Class TimeConstraintView

  • All Implemented Interfaces:
    BaseElement, com.nomagic.magicdraw.uml.CompartmentSupport, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.LabelOwner, com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, NameOwner, java.beans.PropertyChangeListener, java.lang.Cloneable, java.lang.Comparable, java.util.EventListener

    @OpenApi
    public class TimeConstraintView
    extends com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
    • Constructor Detail

      • TimeConstraintView

        public TimeConstraintView()
    • Method Detail

      • createNameLabelWrapper

        protected com.nomagic.magicdraw.uml.symbols.shapes.NameLabelWrapper createNameLabelWrapper()
        Overrides:
        createNameLabelWrapper in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • createLabels

        protected void createLabels()
        Overrides:
        createLabels in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • createSmartListenerConfig

        protected void createSmartListenerConfig​(java.util.List<SmartListenerConfig> configurations)
        Overrides:
        createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • accept

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

        public Element findParentForData​(PresentationElement newParent,
                                         com.nomagic.uml2.ElementAddContext addContext)
      • internalPreSpecificUpdate

        protected void internalPreSpecificUpdate()
        Overrides:
        internalPreSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      • askDeleteDataConfirmation

        public boolean askDeleteDataConfirmation()
        Description copied from class: PresentationElement
        Declared as interface with default implementation for subclasses. If some subclasses upon delete may ask about delete data object as well, they have to redefine this method and return true. By default all objects are removed without asking
        Returns:
        confirmation status -- true if asking is necessary, false otherwise
      • hasSharedData

        public boolean hasSharedData()
        Description copied from class: PresentationElement
        Returns true if data of this object can be shared. If data is not shared data can be deleted with del key. Or it must be deleted with CRL+D
        Returns:
        true if data of this object can be shared.
      • internalPostUpdatePresentationElement

        protected void internalPostUpdatePresentationElement()
        Overrides:
        internalPostUpdatePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ShapeWithLabels
      • getElement

        public TimeConstraint 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.
      • isFirstEventByViewLocation

        private boolean isFirstEventByViewLocation()
        Returns:
        Finds out first time value by view location
      • minimumSizeIgnoringOrientation

        protected void minimumSizeIgnoringOrientation​(java.awt.Dimension min)
        Overrides:
        minimumSizeIgnoringOrientation in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      • paintSelf

        public void paintSelf​(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      • adjustBounds

        public void adjustBounds​(java.awt.Rectangle bounds)
        Description copied from class: ShapeElement
        Validates bounds
        Parameters:
        bounds - bounds
      • adjustBoundsOnMessage

        private void adjustBoundsOnMessage​(java.awt.Rectangle bounds,
                                           com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView message)
      • adjustBoundsOnActivation

        private void adjustBoundsOnActivation​(java.awt.Rectangle bounds,
                                              ActivationView activation)
      • isSnapToGrid

        protected boolean isSnapToGrid()
      • labelBoundsChanged

        protected void labelBoundsChanged()
        Adjust time constraint bounds according to the label position changes
      • getBoundsByLabelPosition

        @CheckForNull
        private java.awt.Rectangle getBoundsByLabelPosition()
      • getBoundsByLabelPositionOnMessage

        private java.awt.Rectangle getBoundsByLabelPositionOnMessage​(com.nomagic.magicdraw.uml.symbols.paths.SeqBaseMessageView message,
                                                                     java.awt.Rectangle nameLabelBounds)
      • getBoundsByLabelPositionOnActivationView

        private java.awt.Rectangle getBoundsByLabelPositionOnActivationView​(java.awt.Rectangle nameLabelBounds)
      • isFirstEvent

        private boolean isFirstEvent()
      • canBeDeleted

        public boolean canBeDeleted()
        Description copied from interface: BaseElement
        Checks if element can be deleted from 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 element can be deleted from project.
        See Also:
        BaseElement.isEditable()
      • canChangeParent

        public boolean canChangeParent​(java.util.Collection<? extends PresentationElement> movedTogether,
                                       @CheckForNull
                                       BaseElement newParent,
                                       boolean changeElementParent)
        Description copied from class: PresentationElement
        Returns true, if element can change parent.
        Parameters:
        movedTogether - collection of the elements, whose will change the parent together with this.
        newParent - new symbol parent
        changeElementParent - change element parent
        Returns:
        true if parent of symbol can be changed