Class SpreadSheetViewerPanel

    • Constructor Detail

      • SpreadSheetViewerPanel

        public SpreadSheetViewerPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Initializes the members.
        Overrides:
        initialize in class ToolBarPanel
      • initGUI

        protected void initGUI()
        Initializes the widgets.
        Overrides:
        initGUI in class ToolBarPanel
      • getMenuBar

        public JMenuBar getMenuBar()
        Creates a menu bar (singleton per panel object). Can be used in frames.
        Specified by:
        getMenuBar in interface MenuBarProvider
        Returns:
        the menu bar
      • getMultiPagePane

        public MultiPagePane getMultiPagePane()
        Returns the spreadsheet tabbed pane.
        Returns:
        the tabbed pane
      • getViewerTabs

        public ViewerTabManager getViewerTabs()
        Returns the viewer tabs.
        Returns:
        the tabs
      • enterNumDecimals

        public void enterNumDecimals​(boolean applyAll)
        Alows the user to enter the number of decimals to display.
        Parameters:
        applyAll - whether to apply the setting to all open tabs
      • selectRendering

        public void selectRendering​(boolean applyAll)
        Allows the user to select a different cell rendering customizer.
        Parameters:
        applyAll - whether to apply background to all open tabs
      • updateActions

        public void updateActions()
        Updates the enabled state of the actions.
        Specified by:
        updateActions in class ToolBarPanel
      • updateMenu

        public void updateMenu()
        updates the enabled state of the menu items.
      • checkForModified

        public boolean checkForModified()
        Returns whether we can proceed with the operation or not, depending on whether the user saved the sheet or discarded the changes.
        Returns:
        true if safe to proceed
      • checkForModified

        public boolean checkForModified​(SpreadSheetPanel panel)
        Returns whether we can proceed with the operation or not, depending on whether the user saved the sheet or discarded the changes.
        Parameters:
        panel - the panel to check
        Returns:
        true if safe to proceed
      • open

        public void open()
        Opens one or more CSV files.
      • load

        public void load​(File file)
        Loads the specified file.
        Parameters:
        file - the file to load
      • load

        public void load​(SpreadSheetReader reader,
                         File file)
        Loads the specified file.
        Parameters:
        reader - the reader to use for reading the file
        file - the file to load
      • write

        public void write​(SpreadSheetWriter writer,
                          File file)
        Saves the specified file.
        Parameters:
        writer - the writer to use for saving the file
        file - the file to save
      • save

        protected void save​(SpreadSheetWriter writer,
                            File file,
                            boolean recent)
        Writes the file to disk (uses SwingWorker).
        Parameters:
        writer - the writer to use for writing the spreadsheet
        file - the file to write to
        recent - whether to add the file to the recent files list
      • closeFile

        public void closeFile()
        Closes the current active tab.
      • close

        public void close()
        Closes the dialog or frame.
      • getAllPanels

        public SpreadSheetPanel[] getAllPanels()
        Returns all the image panels.
        Returns:
        the image panels
      • getCurrentPanel

        public SpreadSheetPanel getCurrentPanel()
        Returns the currently selected panel.
        Returns:
        the current panel, null if not available
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface SendToActionSupporter
        Parameters:
        cls - the classes to retrieve the item for
        Returns:
        true if an object is available for sending
      • getSendToItem

        public Object getSendToItem​(Class[] cls)
        Returns the object to send.
        Specified by:
        getSendToItem in interface SendToActionSupporter
        Parameters:
        cls - the classes to retrieve the item for
        Returns:
        the item to send
      • filterData

        public void filterData​(String oldTitle,
                               Object input,
                               Actor filter)
        Filters the data with the transformer and adds the generated output as new tab.
        Parameters:
        oldTitle - the title from the old tab
        input - the spreadsheet to process
        filter - the transformer
      • process

        protected void process​(AbstractDataPlugin plugin)
        Processes the current spreadsheet with the specified plugin.
        Parameters:
        plugin - the plugin to use
      • view

        protected void view​(AbstractViewPlugin plugin)
        Displays a dialog with the panel created by the plugin.
        Parameters:
        plugin - for generating the view
      • setVisibleAgain

        protected void setVisibleAgain()
        Used by the close() method to re-display the flow, in case the flow cannot or should not be closed after all.
        See Also:
        close()
      • cleanUp

        public void cleanUp()
        Cleans up data structures, frees up memory.
        Specified by:
        cleanUp in interface CleanUpHandler
      • setApplyToAll

        public void setApplyToAll​(boolean value)
        Sets whether to apply settings to all tabs or just current one.
        Parameters:
        value - true if to apply to all
      • getApplyToAll

        public boolean getApplyToAll()
        Returns whether to apply settings to all tabs or just current one.
        Returns:
        true if to apply to all
      • newWindow

        public SpreadSheetViewerPanel newWindow()
        Displays a new preview window/frame.
        Returns:
        the new panel
      • getProperties

        public static Properties getProperties()
        Returns the properties that define the editor.
        Returns:
        the properties
      • getPropertiesMenu

        public static Properties getPropertiesMenu()
        Returns the properties that define the menu.
        Returns:
        the properties