Class ImageTokenEffigy

    • Constructor Detail

      • ImageTokenEffigy

        public ImageTokenEffigy​(Workspace workspace)
        Create a new effigy in the specified workspace with an empty string for its name.
        Parameters:
        workspace - The workspace for this effigy.
    • Method Detail

      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        If the argument is the uri parameter, then read the specified URL and parse the data contained in it.
        Overrides:
        attributeChanged in class Effigy
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the URL cannot be read or if the data is malformed.
      • clear

        public void clear()
        Clear the token array associated with this effigy.
      • read

        public void read​(java.net.URL input)
                  throws java.io.IOException
        Read the specified URL and parse the data.
        Parameters:
        input - The URL to read.
        Throws:
        java.io.IOException - If an error occurs while reading the URL or parsing the data.
      • writeFile

        public void writeFile​(java.io.File file)
                       throws java.io.IOException
        Write the current data of this effigy to the specified file. The filename extension is used to determine the format. Understood extensions include "jpg", "jpeg", "png", and "gif" (not case sensitive).
        Overrides:
        writeFile in class Effigy
        Parameters:
        file - The file to write to, or null to write to standard out.
        Throws:
        java.io.IOException - If the write fails.