Class AbstractDataPlugin

    • Field Detail

      • m_LastSetup

        protected static Hashtable<Class,​Object> m_LastSetup
        for storing the last setup for a plugin.
      • m_CanceledByUser

        protected boolean m_CanceledByUser
        whether the user canceled the operation.
    • Constructor Detail

      • AbstractDataPlugin

        public AbstractDataPlugin()
    • Method Detail

      • getMenuText

        public abstract String getMenuText()
        Returns the text of the menu item.
        Returns:
        the text
      • getMenuIcon

        public abstract String getMenuIcon()
        Returns the file name of the icon.
        Returns:
        the filename or null if no icon available
      • isInPlace

        public abstract boolean isInPlace()
        Returns whether the processed sheet should rather get placed ("in-place") in the same tab rather than in a new one.
        Returns:
        true if to replace current sheet with processed one
      • setCurrentPanel

        public void setCurrentPanel​(SpreadSheetPanel value)
        Sets the current panel.
        Parameters:
        value - the panel
      • getCurrentPanel

        public SpreadSheetPanel getCurrentPanel()
        Returns the current panel.
        Returns:
        the panel, null if none set
      • hasLastSetup

        protected boolean hasLastSetup()
        Checks whether there is a setup available for the class of this object.
        Parameters:
        obj - the object to check for
        Returns:
        true if a setup is available
      • getLastSetup

        protected Object getLastSetup()
        Returns the last setup for this object's class.
        Parameters:
        obj - the object (actually the class) to get the setup for
        Returns:
        the setup, null if none available
      • setLastSetup

        protected void setLastSetup​(Object setup)
        Stores the setup for this object's class.
        Parameters:
        obj - the object (actually the class) to get the setup for
        setup - the setup to store
      • getCanceledByUser

        public boolean getCanceledByUser()
        Returns whether the operation was canceled by the user.
        Returns:
        true if the user canceled the operation
      • canProcess

        public boolean canProcess​(SpreadSheetPanel panel)
        Returns whether the panel can be processed.
        Parameters:
        panel - the panel to check
        Returns:
        true if can be processed
      • check

        protected String check​(SpreadSheet sheet)
        Checks the spreadsheet.

        Default implementation only checks whether data was provided.
        Parameters:
        sheet - the spreadsheet to check
        Returns:
        null if check passed, otherwise error message
      • doProcess

        protected abstract SpreadSheet doProcess​(SpreadSheet sheet)
        Performs the actual processing of the spreadsheet.
        Parameters:
        sheet - the sheet to process
        Returns:
        the processed sheet
      • getPlugins

        public static String[] getPlugins()
        Returns a list with classnames of plugins.
        Returns:
        the plugin classnames