Class AssetReferences

  • All Implemented Interfaces:
    EventListener, ICircularRetargetParent, IGProp<java.lang.String>, java.lang.Cloneable

    public class AssetReferences
    extends StringProp
    implements ICircularRetargetParent
    The Asset References property class hold the references to zero or more FileURIPropCnr property containers. The reference names are separated by comma in the string.
    Author:
    Christopher Mindus
    • Constructor Detail

      • AssetReferences

        protected AssetReferences()
        Creates a Styles Reference property with no name and with a null value.
      • AssetReferences

        public AssetReferences​(Atom propertyAtom)
        Creates a Styles Reference property with the specified name with a null value.
        Parameters:
        propertyAtom - the property atom.
      • AssetReferences

        public AssetReferences​(Atom propertyAtom,
                               java.lang.String newValue)
                        throws PropValidateException
        Creates a Styles Reference property with the specified name and value.
        Parameters:
        propertyAtom - the property atom.
        newValue - the new string value for the property.
        Throws:
        PropValidateException - When the constraints are not met.
    • Method Detail

      • onPropDispose

        protected void onPropDispose()
        Property disposed of: dispose of reference.
        Overrides:
        onPropDispose in class GProp<java.lang.String>
      • equalsErrors

        protected boolean equalsErrors​(PropError pe1,
                                       PropError pe2,
                                       int how)
        Processes error property verification. The default processing is to verify the two error properties pe1 and pe2 for equality if includeErrors is 0 or 1, and returns true if the value is 2=no comparison with error properties.

        Override to verify property errors for reference properties.

        Overrides:
        equalsErrors in class GProp<java.lang.String>
        Parameters:
        pe1 - The first error property, may be null.
        pe2 - The second error property, may be null.
        how - Flags EQC_* values for equal checking.
        Returns:
        Equality flag depending on includeErrors value.
      • getReferences

        public int getReferences​(java.util.List<Reference> references)
        Gets the references of this property top others. This method is typically used in the Designer to search for circular references during verification.
        Specified by:
        getReferences in interface IGProp<java.lang.String>
        Overrides:
        getReferences in class GProp<java.lang.String>
        Parameters:
        references - The references array is filled in by this method.
        Returns:
        The count of references added.
      • onEventSelf

        public void onEventSelf​(GEvent event)
        Called when a property event is send to this property.

        A subclass can override this method to perform appropriate processing and is not required to call super.onEventSelf(e).

        Specified by:
        onEventSelf in interface IGProp<java.lang.String>
        Overrides:
        onEventSelf in class GProp<java.lang.String>
        Parameters:
        event - The property event.
      • onReferenceEvent

        protected void onReferenceEvent​(ResolveReferencesEvent event)
        Called to perform reference resolving. A property should override this method if it needs to perform reference resolving and validation.

        Subclasses override this method and only subclasses extending PropCnr needs to call super.onReferenceEvent(ResolveReferenceEvent event).

        Overrides:
        onReferenceEvent in class GProp<java.lang.String>
        Parameters:
        event - The resolve references event.
      • onProjectNameChanged

        protected void onProjectNameChanged​(ProjectNameEvent event)
        Called when a project name has been changed.
        Parameters:
        event - The project name event.
      • getAllFiles

        public FileURIPropCnr[] getAllFiles()
        Gets the Styles associates with the references. The array may contain null members in which case that reference is not resolved.
        Returns:
        The array returned is never null, i.e. Styles [0] if no references are present.
      • fireChanged

        protected void fireChanged()
        Call this method to inform a listener.