Class LoaderBase

  • All Implemented Interfaces:
    Loader

    public abstract class LoaderBase
    extends java.lang.Object
    implements Loader
    This class implements the Loader interface. To use a file loader would extend this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      LoaderBase()
      Constructs a Loader with default values for all variables.
      LoaderBase​(int flags)
      Constructs a Loader with the specified flags word.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBasePath()
      Returns the current base path setting.
      java.net.URL getBaseUrl()
      Returns the current base URL setting.
      int getFlags()
      Returns the current loading flags setting.
      void setBasePath​(java.lang.String pathName)
      This method sets the base path name for data files associated with the file.
      void setBaseUrl​(java.net.URL url)
      This method sets the base URL name for data files associated with the file.
      void setFlags​(int flags)
      This method sets the load flags for the file.
      • Methods inherited from class java.lang.Object

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

      • loadFlags

        protected int loadFlags
        Stores the types of objects that the user wishes to load.
      • baseUrl

        protected java.net.URL baseUrl
        Stores the baseUrl for data files associated with the URL passed into load(URL).
      • basePath

        protected java.lang.String basePath
        Stores the basePath for data files associated with the file passed into load(String).
    • Constructor Detail

      • LoaderBase

        public LoaderBase()
        Constructs a Loader with default values for all variables.
      • LoaderBase

        public LoaderBase​(int flags)
        Constructs a Loader with the specified flags word.
    • Method Detail

      • setBaseUrl

        public void setBaseUrl​(java.net.URL url)
        This method sets the base URL name for data files associated with the file. The baseUrl should be null by default, which is an indicator to the loader that it should look for any associated files starting from the same place as the URL passed into the load(URL) method. Note: Users of setBaseUrl() would then use load(URL) as opposed to load(String).
        Specified by:
        setBaseUrl in interface Loader
      • setBasePath

        public void setBasePath​(java.lang.String pathName)
        This method sets the base path name for data files associated with the file. The basePath should be null by default, which is an indicator to the loader that it should look for any associated files starting from the same directory as the file passed into the load(String) method. Note: Users of setBasePath() would then use load(String) as opposed to load(URL).
        Specified by:
        setBasePath in interface Loader
      • getBaseUrl

        public java.net.URL getBaseUrl()
        Returns the current base URL setting.
        Specified by:
        getBaseUrl in interface Loader
      • getBasePath

        public java.lang.String getBasePath()
        Returns the current base path setting.
        Specified by:
        getBasePath in interface Loader
      • setFlags

        public void setFlags​(int flags)
        This method sets the load flags for the file. The flags should equal 0 by default (which tells the loader to only load geometry).
        Specified by:
        setFlags in interface Loader
      • getFlags

        public int getFlags()
        Returns the current loading flags setting.
        Specified by:
        getFlags in interface Loader