Class StateView

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.shapes.ShapeElement
com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
com.nomagic.magicdraw.uml.symbols.shapes.StateView
All Implemented Interfaces:
BaseElement, com.nomagic.magicdraw.uml.CompartmentSupport, MDElement, ModelElementProvider, com.nomagic.magicdraw.uml.symbols.CompartmentContainer, com.nomagic.magicdraw.uml.symbols.CompartmentOwner, com.nomagic.magicdraw.uml.symbols.manipulators.centerlines.CenterlineableShape, com.nomagic.magicdraw.uml.symbols.PropertyBasedPresentationElement, com.nomagic.magicdraw.uml.symbols.shapes.QualifiedNameLabelOwner, StereotypesDisplayModeOwner, com.nomagic.magicdraw.uml.symbols.SuspendShapeAutoResizeModeProvider, com.nomagic.magicdraw.uml.symbols.Wrapable, NameOwner, PropertyChangeListener, Cloneable, Comparable, EventListener

@OpenApi public class StateView extends com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
  • Field Details

  • Constructor Details

    • StateView

      public StateView()
    • StateView

      public StateView(@CheckForNull PresentationElement parent)
  • Method Details

    • getRegionsCompartmentView

      public com.nomagic.magicdraw.uml.symbols.shapes.RegionsCompartmentView getRegionsCompartmentView()
    • selfSpecificHeaderShapeDraw

      protected void selfSpecificHeaderShapeDraw(com.nomagic.magicdraw.uml.symbols.DiagramPaintContext context)
      Overrides:
      selfSpecificHeaderShapeDraw in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • createBoundsShape

      public ContainerShape createBoundsShape(PathElement path, BoundsTransformation transformation)
      Description copied from class: ShapeElement
      Creates bounding shape for intersection calculation.
      Overrides:
      createBoundsShape in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      path - path
      transformation - transformation
      Returns:
      shape
    • isSubmachine

      public boolean isSubmachine()
    • isCompositeState

      public boolean isCompositeState()
    • isSimpleState

      public boolean isSimpleState()
    • canAddInstance

      public boolean canAddInstance(PresentationElement symbol)
      Description copied from class: PresentationElement
      Object view has no children.
      Overrides:
      canAddInstance in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
    • canAddChild

      public boolean canAddChild(PresentationElement symbol)
      Description copied from class: PresentationElement
      Check of given symbol can be added as child into this symbol.
      Overrides:
      canAddChild in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      symbol - symbol
      Returns:
      true if symbol can be added
    • 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.shapes.HeaderShapeView
      Parameters:
      visitor - which visits this element.
      Throws:
      Exception
    • internalSpecificUpdate

      public void internalSpecificUpdate()
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Specific to every shape and model element update operation. Must be overridden in subclasses if you need to do specific tasks. !!! Important - all resizing, paths moving and so on is done in updatePresentationElement and should not be done in specific update.
      Overrides:
      internalSpecificUpdate in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      See Also:
      • AbstractHeaderShapeView.internalUpdatePresentationElement()
    • createSmartListenerConfig

      protected void createSmartListenerConfig(List<SmartListenerConfig> configurations)
      Overrides:
      createSmartListenerConfig in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • checkShowsProxy

      protected boolean checkShowsProxy()
      Overrides:
      checkShowsProxy in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
    • getDefaultDimension

      protected UnmodifiableDimension getDefaultDimension()
      Overrides:
      getDefaultDimension in class ShapeElement
    • internalApplyProperties

      public void internalApplyProperties(com.dassault_systemes.modeler.magic.diagram.styledelegates.PresentationElementStyleChanger changer)
      Description copied from class: PresentationElement
      Applies properties from given property manager
      Overrides:
      internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      changer - new properties
    • internalSilentApply

      public void internalSilentApply()
      Description copied from class: PresentationElement
      Silently applies all properties after initialization
      Overrides:
      internalSilentApply in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • findOwnerForElement

      public com.dassault_systemes.modeler.foundation.model.ModelElement findOwnerForElement(PresentationElement parent, com.dassault_systemes.modeler.foundation.model.ModelElementOwnershipContext ownershipContext)
      Overrides:
      findOwnerForElement in class PresentationElement
    • findParentForData

      @CheckForNull public static Element findParentForData(PresentationElement parent, PresentationElement child)
    • getActionsCompartment

      public com.nomagic.magicdraw.uml.symbols.shapes.InternalStateCompartmentView getActionsCompartment()
    • getRegions

      public List<com.nomagic.magicdraw.uml.symbols.shapes.RegionView> getRegions()
    • isShowRegionName

      public boolean isShowRegionName()
      Returns:
      shown name option of this region
    • sSetShowRegionName

      public void sSetShowRegionName(boolean showName)
      Set a new show name option for region(s).
      Parameters:
      showName - new value
    • setShowRegionName

      public void setShowRegionName(boolean showName)
      Set a new show name option for region(s). Updates shape
      Parameters:
      showName - new value
    • getOpaqueBehaviorDisplayMode

      public String getOpaqueBehaviorDisplayMode()
    • sSetOpaqueBehaviorDisplayMode

      public void sSetOpaqueBehaviorDisplayMode(String mode)
    • setOpaqueBehaviorDisplayMode

      public void setOpaqueBehaviorDisplayMode(String mode)
    • isShowPort

      public boolean isShowPort()
      Returns value of the "Show Port" symbol property.
      Returns:
      value of the "Show Port" property.
    • setShowPort

      public void setShowPort(boolean showPort)
      Sets value of the "Show Port" symbol property.
      Parameters:
      showPort - value of the "Show Port" property.
    • sSetShowPort

      public void sSetShowPort(boolean showPort)
      Sets value of the "Show Port" symbol property.
      Parameters:
      showPort - value of the "Show Port" property.
    • addPresentationElement

      public void addPresentationElement(PresentationElement element, int index, boolean resize)
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      If a specified object not inserted in this container then adds a new object view to the container.
      Overrides:
      addPresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      element - new PresentationElement object
      index - index to add at
      resize - resize parent
    • sAddPresentationElement

      public void sAddPresentationElement(PresentationElement element, int index)
      Description copied from class: PresentationElement
      Add given child to this symbol at given index
      Overrides:
      sAddPresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      Parameters:
      element - child to add
      index - index to add at. Can be -1
    • removePresentationElement

      public void removePresentationElement(PresentationElement element, boolean resizeParent)
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      Removes object view from container.
      Overrides:
      removePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Parameters:
      element - object to remove
      resizeParent - resize parent
    • sRemovePresentationElement

      public void sRemovePresentationElement(PresentationElement element)
      Description copied from class: PresentationElement
      Removes given child
      Overrides:
      sRemovePresentationElement in class com.nomagic.magicdraw.uml.symbols.shapes.ContainerShapeView
      Parameters:
      element - child
    • isShowOperationsSignature

      public boolean isShowOperationsSignature()
      Returns:
      is trigger event operation signature shown
    • sSetShowOperationsSignature

      public void sSetShowOperationsSignature(boolean showSignature)
      Sets if trigger event operation signature should be shown
      Parameters:
      showSignature - new value
    • setShowOperationsSignature

      public void setShowOperationsSignature(boolean showSignature)
      Sets if trigger event operation signature should be shown
      Parameters:
      showSignature - new value
    • isUseAdvancedColoring

      public boolean isUseAdvancedColoring()
      Returns:
      true if advanced coloring should be used
    • sSetUseAdvancedColoring

      public void sSetUseAdvancedColoring(boolean use)
      Sets if operation should be colored using advanced coloring
      Parameters:
      use - new value
    • setUseAdvancedColoring

      public void setUseAdvancedColoring(boolean use)
      Sets if operation should be colored using advanced coloring
      Parameters:
      use - new value
    • getElement

      public State 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 ModelElementProvider
      Overrides:
      getElement in class PresentationElement
      Returns:
      model element of this presentation element.
    • getHeaderView

      public com.nomagic.magicdraw.uml.symbols.shapes.StateHeaderView getHeaderView()
      Overrides:
      getHeaderView in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • getAdditionalCompartmentInsets

      protected com.nomagic.ui.UnmodifiableInsets getAdditionalCompartmentInsets(com.nomagic.magicdraw.uml.symbols.shapes.InsetsLevel level)
      Overrides:
      getAdditionalCompartmentInsets in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • hasSharedModelElement

      public boolean hasSharedModelElement()
      Description copied from class: PresentationElement
      Returns true if ModelElement of this symbol can represented with other symbol. If ModelElement is not shared, it can be deleted together with symbol deleting.
      Overrides:
      hasSharedModelElement in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      true if element of this symbol can be represented with other symbol.