Class AbstractFrameWithOptionHandling

    • Field Detail

      • m_OptionManager

        protected OptionManager m_OptionManager
        for managing the available options.
      • m_Home

        protected String m_Home
        the directory to use as the project's home directory.
    • Constructor Detail

      • AbstractFrameWithOptionHandling

        public AbstractFrameWithOptionHandling()
        Constructor for creating frame with no title.
      • AbstractFrameWithOptionHandling

        public AbstractFrameWithOptionHandling​(String title)
        The constructor for creating frame with title.
        Parameters:
        title - the title of the frame
    • Method Detail

      • performInitialization

        protected void performInitialization()
        Contains all the initialization steps to perform.
        Overrides:
        performInitialization in class BaseFrame
      • newOptionManager

        protected OptionManager newOptionManager()
        Returns a new instance of the option manager.
        Returns:
        the manager to use
      • defineOptions

        public void defineOptions()
        Adds options to the internal list of options. Derived classes must override this method to add additional options.
        Specified by:
        defineOptions in interface OptionHandler
      • reset

        protected void reset()
        For resetting the frame.

        Default implementation does nothing.
      • destroy

        public void destroy()
        Frees up memory in a "destructive" non-reversible way.

        Cleans up the options.
        Specified by:
        destroy in interface Destroyable
        See Also:
        cleanUpOptions()
      • setHome

        public void setHome​(String value)
        Overrides the automatic detection of the project's home directory and uses the specified directory instead. No placeholders allowed, should be absolute.
        Specified by:
        setHome in interface HomeRelocator
        Parameters:
        value - the directory to use
      • getHome

        public String getHome()
        Returns the directory to use as home directory instead of the automatically determined one.
        Specified by:
        getHome in interface HomeRelocator
        Returns:
        the directory to use
      • homeTipText

        public String homeTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • toCommandLine

        public String toCommandLine()
        Returns the commandline string.
        Specified by:
        toCommandLine in interface OptionHandler
        Returns:
        the commandline
      • forName

        public static AbstractFrameWithOptionHandling forName​(String classname,
                                                              String[] options)
        Instantiates the frame with the given options.
        Parameters:
        classname - the classname of the frame to instantiate
        options - the options for the frame
        Returns:
        the instantiated frame or null if an error occurred
      • runFrame

        public static AbstractFrameWithOptionHandling runFrame​(Class env,
                                                               Class app,
                                                               String[] options)
        Runs the frame from the commandline.
        Parameters:
        env - the environment class to use
        app - the frame class
        options - the commandline options
        Returns:
        the instantiated frame, null in case of an error or help being invoked