Class ImageShapeView

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

    @OpenApi
    public class ImageShapeView
    extends com.nomagic.magicdraw.uml.symbols.shapes.AbstractImageShapeView
    Image Shape is a simple and quick way for user to insert picture into diagram. This can be anything: logo, graph, table, etc. User will need no worry that image would look good, as preferred shape size will be actual image size.
    • Field Detail

      • iconData

        private byte[] iconData
    • Constructor Detail

      • ImageShapeView

        public ImageShapeView()
    • Method Detail

      • clone

        public ImageShapeView clone()
        Description copied from class: ElementImpl
        Returns a copy of the Element.
        Specified by:
        clone in interface BaseElement
        Overrides:
        clone in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
        Returns:
        the cloned object
      • 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.AbstractImageShapeView
        Parameters:
        visitor - which visits this element.
        Throws:
        java.lang.Exception
      • internalApplyProperties

        public void internalApplyProperties​(PropertyManager man)
        Description copied from class: PresentationElement
        Applies properties from given property manager
        Overrides:
        internalApplyProperties in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractHeaderShapeView
        Parameters:
        man - 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.AbstractHeaderShapeView
      • updateImagePath

        public void updateImagePath​(java.lang.String iconPath)
      • setImageIconPath

        public void setImageIconPath​(java.lang.String iconPath)
      • propertyChange

        public void propertyChange​(java.beans.PropertyChangeEvent e)
        Description copied from class: PresentationElement
        Listens for property change it can be: data was edited text box was edited
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • getImageIconPath

        public java.lang.String getImageIconPath()
      • getIconData

        public byte[] getIconData()
      • sSetIconData

        public void sSetIconData​(byte[] iconData)
      • setIconData

        public void setIconData​(byte[] iconData)
      • createImagePathProperty

        public static FileProperty createImagePathProperty​(java.lang.String iconPath)
      • getIcon

        @CheckForNull
        protected ResizableIcon getIcon()
        Specified by:
        getIcon in class com.nomagic.magicdraw.uml.symbols.shapes.AbstractImageShapeView
      • getImageIconPathProperty

        private FileProperty getImageIconPathProperty()
      • readImageFromFile

        private void readImageFromFile​(FileProperty fileProperty)
      • resetIcon

        private void resetIcon​(byte[] iconData,
                               boolean useSimpleReset)