Class BrowserEffigy.Factory

    • Method Detail

      • canCreateBlankEffigy

        public boolean canCreateBlankEffigy()
        Return true, indicating that this effigy factory is capable of creating an effigy without a URL being specified.
        Overrides:
        canCreateBlankEffigy in class EffigyFactory
        Returns:
        True.
      • createEffigy

        public Effigy createEffigy​(CompositeEntity container,
                                   java.net.URL base,
                                   java.net.URL in)
                            throws java.lang.Exception
        Create a new effigy in the given container by reading the specified URL. If the specified URL is null, then create a blank effigy. The extension of the URL is not checked, so this will open any file. Thus, this factory should be last on the list of effigy factories in the configuration. The new effigy will have a new instance of DefaultStyledDocument associated with it.
        Overrides:
        createEffigy in class EffigyFactory
        Parameters:
        container - The container for the effigy.
        base - The base for relative file references, or null if there are no relative file references. This is ignored in this class.
        in - The input URL.
        Returns:
        A new instance of BrowserEffigy.
        Throws:
        java.lang.Exception - If the URL cannot be read, or if the data is malformed in some way.