Class ElementListProperty

    • Field Detail

      • selectableTypes

        @CheckForNull
        private java.util.Collection selectableTypes
        The collection of selectable elements class types.
      • displayableTypes

        @CheckForNull
        private java.util.Collection displayableTypes
        The collection of displayable elements class types.
      • selectableRestrictedElements

        private java.util.Collection selectableRestrictedElements
        Stereotypes and metaclasses for filtering selectable elements
      • containment

        private boolean containment
        Flag indicates if the elements are contained.
      • ordered

        private boolean ordered
        Flag indicates if the elements are ordered.
      • project

        @CheckForNull
        private Project project
    • Constructor Detail

      • ElementListProperty

        public ElementListProperty()
        Creates and initializes a new ModelElementListProperty object.
      • ElementListProperty

        public ElementListProperty​(java.lang.String id,
                                   @CheckForNull
                                   java.lang.Object value)
        Creates and initializes a new ModelElementListProperty object from specified parameters.
        Parameters:
        id - - id of the property.
        value - - a value of the property.
    • Method Detail

      • setPropertyData

        public void setPropertyData​(@CheckForNull
                                    java.util.Collection displayableTypes,
                                    @CheckForNull
                                    java.util.Collection selectableTypes,
                                    boolean ordered,
                                    boolean containment)
        Sets data for property members. This method takes collections of class types. You must add into these collections class types from constants class ClassTypes.
        Specified by:
        setPropertyData in interface com.nomagic.magicdraw.properties.ElementFilterProperty
      • getSelectableTypes

        @CheckForNull
        public java.util.Collection getSelectableTypes()
        Returns selectable elements class types.
        Specified by:
        getSelectableTypes in interface com.nomagic.magicdraw.properties.ElementFilterProperty
        Returns:
        selectable types.
      • getDisplayableTypes

        @CheckForNull
        public java.util.Collection getDisplayableTypes()
        Returns displayable elements class types.
        Specified by:
        getDisplayableTypes in interface com.nomagic.magicdraw.properties.ElementFilterProperty
        Returns:
        displayable types.
      • isContainment

        public boolean isContainment()
        Check Element list property is Containment.
        Specified by:
        isContainment in interface com.nomagic.magicdraw.properties.ElementFilterProperty
        Returns:
        boolean.
      • isOrdered

        public boolean isOrdered()
        Check Element list property is Ordered.
        Specified by:
        isOrdered in interface com.nomagic.magicdraw.properties.ElementFilterProperty
        Returns:
        boolean.
      • setValue

        public void setValue​(@CheckForNull
                             java.lang.Object value)
        Description copied from class: ListProperty
        Sets a value of the property.
        Overrides:
        setValue in class ListProperty
        Parameters:
        value - a value.
      • getElements

        public Element[] getElements()
      • getOriginalValue

        public java.lang.Object[] getOriginalValue()
      • firePropertyChange

        public void firePropertyChange​(java.lang.String propertyName,
                                       java.lang.Object oldValue,
                                       java.lang.Object newValue)
        Description copied from class: Property
        Delegates firePropertyChange to the PropertyChangeSupport, the member of this class, which reports a bound property update to any registered listeners. No event is fired if old and new are equal and non-null.
        Overrides:
        firePropertyChange in class Property
        Parameters:
        propertyName - the programmatic name of the property that was changed.
        oldValue - the old value of the property
        newValue - the new value of the property
        See Also:
        PropertyChangeSupport
      • getElementsIDs

        @CheckForNull
        public java.lang.String[] getElementsIDs()
        ID's of stored Elements. Real value of project.
        Returns:
        id's of elements
      • getValue

        public Element[] getValue()
        Returns an array of model elements.
        Overrides:
        getValue in class ListProperty
        Returns:
        an array of ModelElement.
      • getValueStringRepresentation

        public java.lang.String getValueStringRepresentation()
        Description copied from class: Property
        Returns value's string representation.
        Overrides:
        getValueStringRepresentation in class ListProperty
        Returns:
        string "null" if property does not have value; value. toString() if property has value.
      • setProject

        public void setProject​(@CheckForNull
                               Project project)
        Specified by:
        setProject in interface com.nomagic.magicdraw.properties.ElementFilterProperty
      • getSelectableRestrictedElements

        public java.util.Collection getSelectableRestrictedElements()
        Specified by:
        getSelectableRestrictedElements in interface com.nomagic.magicdraw.properties.ElementFilterProperty
        Returns:
        stereotypes and metaclasses for filtering selectable elements
      • setSelectableRestrictedElements

        public void setSelectableRestrictedElements​(java.util.Collection stereotypes)
        Sets a stereotypes and metaclasses for filtering selectable elements
        Specified by:
        setSelectableRestrictedElements in interface com.nomagic.magicdraw.properties.ElementFilterProperty
        Parameters:
        stereotypes - stereotypes
      • getStereotype

        @CheckForNull
        @Deprecated
        public Stereotype getStereotype()
        Deprecated.
        This is a deprecated methods and you must use collection of restricted elements, not single stereotype
        Returns a first stereotype from selectable restricted elements.
        Returns:
        first stereotype
        See Also:
        getSelectableRestrictedElements()
      • setSelectableTypes

        public void setSelectableTypes​(@CheckForNull
                                       java.util.Collection selectableTypes)
        Specified by:
        setSelectableTypes in interface com.nomagic.magicdraw.properties.ElementFilterProperty
      • setDisplayableTypes

        public void setDisplayableTypes​(@CheckForNull
                                        java.util.Collection displayableTypes)
        Specified by:
        setDisplayableTypes in interface com.nomagic.magicdraw.properties.ElementFilterProperty
      • setContainment

        public void setContainment​(boolean containment)
        Specified by:
        setContainment in interface com.nomagic.magicdraw.properties.ElementFilterProperty
      • setOrdered

        public void setOrdered​(boolean ordered)
        Specified by:
        setOrdered in interface com.nomagic.magicdraw.properties.ElementFilterProperty