Class AbstractViewPlugin

    • Field Detail

      • m_LastSetup

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

        protected BasePanel m_Panel
        the generated panel.
      • m_CanceledByUser

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

      • AbstractViewPlugin

        public AbstractViewPlugin()
    • 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
      • 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
      • canView

        public boolean canView​(SpreadSheetPanel panel)
        Returns whether a view can be generated.
        Parameters:
        panel - the panel to check
        Returns:
        true if view can be generated
      • 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
      • requiresButtons

        public boolean requiresButtons()
        Returns whether the dialog requires the OK/Cancel buttons.

        Default implementation returns true.
        Returns:
        true if the dialog requires the buttons
      • doGenerate

        protected abstract BasePanel doGenerate​(SpreadSheet sheet)
        Performs the actual generation of the information.
        Parameters:
        sheet - the sheet to process
        Returns:
        the generated information panel
      • getPlugins

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