Class AccessorIconLoader

  • All Implemented Interfaces:
    IconLoader

    public class AccessorIconLoader
    extends java.lang.Object
    implements IconLoader
    An icon loader for accessors. This icon loader looks for a file whose name matches the name of the accessor with the suffix "Icon.xml" in the same location that the accessor is stored. It looks first on the local disk in the location that mirrors the accessor repository, and then looks online if that fails.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Edward A. Lee
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean loadIconForClass​(java.lang.String className, NamedObj context)
      Load an icon for a class in a particular context.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AccessorIconLoader

        public AccessorIconLoader()
    • Method Detail

      • loadIconForClass

        public boolean loadIconForClass​(java.lang.String className,
                                        NamedObj context)
                                 throws java.lang.Exception
        Load an icon for a class in a particular context. This method defers icon loading until the context object has been fully constructed. Icons that resolve to urls that start with "http" are ignored.
        Specified by:
        loadIconForClass in interface IconLoader
        Parameters:
        className - The name of the class for which the icon is to be loaded.
        context - The context in which the icon is loaded.
        Returns:
        False. This method never immediately loads an icon.
        Throws:
        java.lang.Exception - If there is a problem adding the icon.
        See Also:
        MoMLParser.getIconLoader(), MoMLParser.setIconLoader(IconLoader)