Package snap.view

Class ViewArchiver

java.lang.Object
snap.util.XMLArchiver
snap.view.ViewArchiver

public class ViewArchiver extends XMLArchiver
This class handles Snap View archival.
  • Constructor Details

    • ViewArchiver

      public ViewArchiver()
      Creates a new ViewArchiver.
  • Method Details

    • getViewForSource

      public View getViewForSource(Object aSource)
      Returns a View for source.
    • getViewForSourceAndOwner

      public View getViewForSourceAndOwner(Object aSource, Object anOwner)
      Returns a View for source.
    • getViewForBytes

      public View getViewForBytes(byte[] theBytes)
      Returns a View for source.
    • getClassForXML

      protected Class<?> getClassForXML(XMLElement anElement)
      Returns the class for a given element.
      Overrides:
      getClassForXML in class XMLArchiver
    • createClassMap

      protected Map<String,Class> createClassMap()
      Creates the class map.
      Overrides:
      createClassMap in class XMLArchiver
    • addAliases

      protected void addAliases(Map<String,Class> cmap)
      Adds aliases.
    • getImage

      public Image getImage(String aPath)
      Returns an image for given name/path.
    • isUseRealClass

      public static boolean isUseRealClass()
      Returns whether to use real classes.
    • setUseRealClass

      public static void setUseRealClass(boolean aFlag)
      Sets whether to use real classes.
    • getImage

      public static Image getImage(XMLArchiver anArchiver, String aPath)
      Returns an image for given name/path.