Class AbstractBootstrappPreferencesPanel

  • All Implemented Interfaces:
    adams.gui.application.PreferencesPanel, ImageObserver, MenuContainer, Serializable, Comparable<adams.gui.application.PreferencesPanel>, Accessible
    Direct Known Subclasses:
    RenjinSettingsPanel

    public abstract class AbstractBootstrappPreferencesPanel
    extends adams.gui.application.AbstractPreferencesPanel
    Ancestor for panels that allow managing of dependencies for bootstrapp.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_PanelInfo

        protected JPanel m_PanelInfo
        the panel with optional info text.
      • m_EditorPaneInfo

        protected adams.gui.core.BaseHtmlEditorPane m_EditorPaneInfo
        the label with the option info text.
      • m_PanelParameters

        protected adams.gui.core.ParameterPanel m_PanelParameters
        the parameters.
      • m_PanelArtifacts

        protected adams.gui.goe.GenericArrayEditorPanel m_PanelArtifacts
        the artifacts.
      • m_PanelExclusions

        protected adams.gui.goe.GenericArrayEditorPanel m_PanelExclusions
        the exclusions.
      • m_PanelRepositories

        protected adams.gui.goe.GenericArrayEditorPanel m_PanelRepositories
        the repositories.
      • m_Properties

        protected adams.core.Properties m_Properties
        the properties.
    • Constructor Detail

      • AbstractBootstrappPreferencesPanel

        public AbstractBootstrappPreferencesPanel()
    • Method Detail

      • initGUI

        protected void initGUI()
        Initializes the members.
        Overrides:
        initGUI in class adams.gui.core.BasePanel
      • getDefaultInfoText

        protected abstract String getDefaultInfoText()
        The default info text to display (gets converted to HTML automatically).
        Returns:
        the text, null to disable
      • setInfoText

        public void setInfoText​(String value)
        Sets the info text to display (gets converted to HTML automatically).
        Parameters:
        value - the text, null or empty string to hide
      • getInfoText

        public String getInfoText()
        Returns the current info text.
        Returns:
        the text
      • getPropertiesFile

        protected abstract String getPropertiesFile()
        Returns the name of the properties file to load.
        Returns:
        the filename (no path)
      • getProperties

        protected adams.core.Properties getProperties()
        Returns the properties and reads them from disk if necessary.
        Returns:
        the properties to use
      • getArtifacts

        protected adams.core.base.MavenArtifact[] getArtifacts()
        Returns the artifacts to display.
        Returns:
        the artifacts
      • getExclusions

        protected adams.core.base.MavenArtifactExclusion[] getExclusions()
        Returns the exclusions to display.
        Returns:
        the artifacts
      • getRepositories

        protected adams.core.base.MavenRepository[] getRepositories()
        Returns the repositories to display.
        Returns:
        the repositories
      • getOutputDir

        protected abstract String getOutputDir()
        Returns the directory to use for the libraries.
        Returns:
        the full path
      • toProperties

        protected adams.core.Properties toProperties()
        Turns the parameters in the GUI into a properties object.
        Returns:
        the properties
      • requiresWrapper

        public boolean requiresWrapper()
        Returns whether the panel requires a wrapper scrollpane/panel for display.
        Specified by:
        requiresWrapper in interface adams.gui.application.PreferencesPanel
        Specified by:
        requiresWrapper in class adams.gui.application.AbstractPreferencesPanel
        Returns:
        true if wrapper required
      • configureBootstrapp

        protected com.github.fracpete.bootstrapp.Main configureBootstrapp​(adams.core.Properties props)
                                                                   throws Exception
        Configures the bootstrap instance to use.
        Parameters:
        props - the properties to use
        Returns:
        the configured instance
        Throws:
        Exception
      • activate

        public String activate()
        Activates the setup.
        Specified by:
        activate in interface adams.gui.application.PreferencesPanel
        Specified by:
        activate in class adams.gui.application.AbstractPreferencesPanel
        Returns:
        null if successfully activated, otherwise error message
      • canReset

        public boolean canReset()
        Returns whether the panel supports resetting the options.
        Specified by:
        canReset in interface adams.gui.application.PreferencesPanel
        Overrides:
        canReset in class adams.gui.application.AbstractPreferencesPanel
        Returns:
        true if supported
      • reset

        public String reset()
        Resets the settings to their default.
        Specified by:
        reset in interface adams.gui.application.PreferencesPanel
        Overrides:
        reset in class adams.gui.application.AbstractPreferencesPanel
        Returns:
        null if successfully reset, otherwise error message