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.NoteView
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.PlainTextOrHTMLChangeable, 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 NoteView extends com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView implements com.nomagic.magicdraw.uml.symbols.shapes.PlainTextOrHTMLChangeable
This class creates a note. NoteView displays note icon in UML diagrams.
  • Field Details

  • Constructor Details

    • NoteView

      public NoteView()
    • NoteView

      public NoteView(@CheckForNull PresentationElement parent)
  • Method Details

    • clone

      public NoteView clone()
      Specified by:
      clone in interface BaseElement
      Overrides:
      clone in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • getDefaultDimension

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

      protected com.nomagic.ui.UnmodifiableInsets internalGetHeaderInsets()
      Overrides:
      internalGetHeaderInsets in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • 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
    • 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
    • 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
    • addConnectedPathElement

      public boolean addConnectedPathElement(PathElement link)
      Description copied from class: PathConnector
      Adds a new path element, and recalculates its position.
      Overrides:
      addConnectedPathElement in class PathConnector
      Parameters:
      link - element to be added.
      Returns:
      true if an element was added
    • removeConnectedPathElement

      public boolean removeConnectedPathElement(PathElement link)
      Description copied from class: PathConnector
      Removes path element.
      Overrides:
      removeConnectedPathElement in class PathConnector
      Parameters:
      link - element to remove.
      Returns:
      true if an element was removed
    • internalGetSelfManipulationPreferredSize

      protected UnmodifiableDimension internalGetSelfManipulationPreferredSize()
      Overrides:
      internalGetSelfManipulationPreferredSize in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      size for manipulation which does not take into account the size of children on some specific conditions (for example, in case if wrapped text)
    • setHTMLText

      public void setHTMLText(boolean isHtml)
      Specified by:
      setHTMLText in interface com.nomagic.magicdraw.uml.symbols.shapes.PlainTextOrHTMLChangeable
    • sSetHTMLText

      public void sSetHTMLText(boolean isHtml)
    • isHTMLText

      public boolean isHTMLText()
      Specified by:
      isHTMLText in interface com.nomagic.magicdraw.uml.symbols.shapes.PlainTextOrHTMLChangeable
    • getUserText

      public String getUserText()
      Returns the pure text. If html text is presented, this method returns not tml text, but user visible text.
      Returns:
      the user visible text.
    • getHumanName

      public String getHumanName()
      Description copied from class: PresentationElement
      Returns human representation of the data type
      Specified by:
      getHumanName in interface BaseElement
      Overrides:
      getHumanName in class PresentationElement
      Returns:
      the name of the data
    • createSmartListenerConfig

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

      @CheckForNull public PresentationElement getRelatedPresentationElement()
    • getRelatedElement

      @CheckForNull public Element getRelatedElement()
      Returns element to which note is connected with first (active) note anchor.
      Returns:
      related element
      See Also:
    • getRelatedElement

      @CheckForNull public Element getRelatedElement(@CheckForNull PresentationElement presentationElement)
      Returns element to which note is connected with first (active) note anchor.
      Returns:
      related element
      See Also:
    • getActiveNoteAnchorView

      @CheckForNull public NoteAnchorView getActiveNoteAnchorView()
      Returns "active" note anchor view. Note displays info of element connected with active anchor. Active anchor is first connected path.
      Returns:
      active anchor
    • getAnchoredDiagramFrame

      @CheckForNull public PresentationElement getAnchoredDiagramFrame()
    • setShowTaggedValues

      public void setShowTaggedValues(boolean show)
      Overrides:
      setShowTaggedValues in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • sSetShowTaggedValues

      public void sSetShowTaggedValues(boolean show)
      Overrides:
      sSetShowTaggedValues in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • setShowConstraints

      public void setShowConstraints(boolean show)
      Overrides:
      setShowConstraints in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • sSetShowConstraints

      public void sSetShowConstraints(boolean show)
      Overrides:
      sSetShowConstraints in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
    • isShowLineBetweenCompartments

      public boolean isShowLineBetweenCompartments()
    • sSetShowLineBetweenCompartments

      public void sSetShowLineBetweenCompartments(boolean show)
    • updateChildrenVisibility

      public void updateChildrenVisibility()
      Overrides:
      updateChildrenVisibility in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • setShowLineBetweenCompartments

      public void setShowLineBetweenCompartments(boolean show)
    • isShowTaggedValuesStereotypes

      public boolean isShowTaggedValuesStereotypes()
    • sSetShowTaggedValuesStereotypes

      public void sSetShowTaggedValuesStereotypes(boolean show)
    • setShowTaggedValuesStereotypes

      public void setShowTaggedValuesStereotypes(boolean show)
    • isShowQualifiedNameInTaggedValues

      public boolean isShowQualifiedNameInTaggedValues()
    • sSetShowQualifiedNameInTaggedValues

      public void sSetShowQualifiedNameInTaggedValues(boolean show)
    • setShowQualifiedNameInTaggedValues

      public void setShowQualifiedNameInTaggedValues(boolean show)
    • isShowDocumentationStereotypes

      public boolean isShowDocumentationStereotypes()
    • sSetShowDocumentationStereotypes

      public void sSetShowDocumentationStereotypes(boolean show)
    • setShowDocumentationStereotypes

      public void setShowDocumentationStereotypes(boolean show)
    • internalSpecificUpdate

      protected 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()
    • getStereotypesToDisplay

      protected com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView.StereotypeDisplayData getStereotypesToDisplay()
      Overrides:
      getStereotypesToDisplay in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
      Returns:
      stereotypes to display on this symbol
    • createCompartmentElements

      public void createCompartmentElements()
      Description copied from interface: com.nomagic.magicdraw.uml.CompartmentSupport
      Create compartments elements. After that compartment should be ready to hide or show some elements.
      Specified by:
      createCompartmentElements in interface com.nomagic.magicdraw.uml.CompartmentSupport
      Overrides:
      createCompartmentElements in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
    • getCollections

      public List<com.dassault_systemes.modeler.foundation.compartments.CompartmentCollection> getCollections()
      Specified by:
      getCollections in interface com.nomagic.magicdraw.uml.CompartmentSupport
      Overrides:
      getCollections in class com.nomagic.magicdraw.uml.symbols.shapes.BaseHeaderShapeView
      Returns:
      compartment information
    • setSmartPropertyChangeListenerElement

      public void setSmartPropertyChangeListenerElement(@CheckForNull Element element)
      Sets smart property change listener element. This is a way to reset mSmartPropertyChangeListenerElement which lets to create new smart listener. The problem is when adding custom compartment for NoteView: there is no way to write smart listener configurator to update view because standard listener is added for related element and view is not updated.
      Parameters:
      element - element to set.
    • sSetCommentDisplayMode

      public void sSetCommentDisplayMode(String mode)
    • setCommentDisplayMode

      public void setCommentDisplayMode(String mode)
    • getCommentDisplayMode

      public String getCommentDisplayMode()
    • setRepresentDiagramContext

      public void setRepresentDiagramContext(boolean enable)
    • sSetRepresentDiagramContext

      public void sSetRepresentDiagramContext(boolean enable)
    • isRepresentDiagramContext

      public boolean isRepresentDiagramContext()
    • isVerticalCenterlineProvider

      public boolean isVerticalCenterlineProvider()
      Description copied from class: ShapeElement
      Indicates whether this shape provides vertical center-lines to other shapes.
      Overrides:
      isVerticalCenterlineProvider in class ShapeElement
      Returns:
      true if this shape provides vertical center lines, false otherwise.
    • isHorizontalCenterlineProvider

      public boolean isHorizontalCenterlineProvider()
      Description copied from class: ShapeElement
      Indicates whether this shape provides horizontal center-lines to other shapes.
      Overrides:
      isHorizontalCenterlineProvider in class ShapeElement
      Returns:
      true if this shape provides horizontal center-lines, false otherwise.
    • sSetConstraintTextMode

      public void sSetConstraintTextMode(String mode)
      Description copied from class: com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Change the value of CONSTRAINT_TEXT_MODE property.
      Overrides:
      sSetConstraintTextMode in class com.nomagic.magicdraw.uml.symbols.shapes.HeaderShapeView
      Parameters:
      mode - text mode.
    • getHeaderView

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

      @Deprecated public com.nomagic.magicdraw.uml.symbols.shapes.NoteHeaderView getNoteHeaderView()
      Deprecated.