Class ThreeWayDataHeatmapPanel

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, ImageObserver, MenuContainer, Serializable, Accessible

    public class ThreeWayDataHeatmapPanel
    extends adams.gui.core.BasePanel
    implements adams.core.CleanUpHandler
    Panel for displaying a single 3-way data structure.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_Properties

        protected static adams.core.Properties m_Properties
        the setup for the panel.
      • m_Data

        protected ThreeWayData m_Data
        the data on display.
      • m_DataImage

        protected adams.gui.visualization.image.ImagePanel m_DataImage
        the panel for displaying the data as image.
      • m_ReportTable

        protected adams.gui.visualization.report.ReportFactory.Table m_ReportTable
        the report of the data.
      • m_SearchPanel

        protected adams.gui.core.SearchPanel m_SearchPanel
        the search panel for the data report.
      • m_SplitPaneAll

        protected adams.gui.core.BaseSplitPane m_SplitPaneAll
        the split pane for X-list and split pane on right.
      • m_SplitPaneRight

        protected adams.gui.core.BaseSplitPane m_SplitPaneRight
        the split pane for image/spreadsheet and report.
      • m_ColorGenerator

        protected adams.gui.visualization.core.ColorGradientGenerator m_ColorGenerator
        the color generator to use.
      • m_MissingValueColor

        protected Color m_MissingValueColor
        the color to use for missing values.
      • m_ListX

        protected adams.gui.core.BaseList m_ListX
        the list for selecting the X layer.
      • m_CurrentFile

        protected File m_CurrentFile
        the current file.
    • Constructor Detail

      • ThreeWayDataHeatmapPanel

        public ThreeWayDataHeatmapPanel​(ThreeWayDataHeatmapViewerPanel owner)
        Initializes the panel.
        Parameters:
        owner - the owner
    • Method Detail

      • initialize

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

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

        protected String refresh()
        Regenerates the image of the current heatmap and redisplays it.
        Returns:
        null if everything OK, otherwise error message
      • setData

        public void setData​(ThreeWayData value)
        Sets the data to display.
        Parameters:
        value - the data to display
      • getData

        public ThreeWayData getData()
        The current data on display.
        Returns:
        the data on display
      • setCurrentFile

        public void setCurrentFile​(File value)
        Sets the current file.
        Parameters:
        value - the file to use
      • getCurrentFile

        public File getCurrentFile()
        Returns the current file.
        Returns:
        the file, null if none set
      • setColorGenerator

        public void setColorGenerator​(adams.gui.visualization.core.ColorGradientGenerator value)
        Sets the generator for the color gradient.
        Parameters:
        value - the generator
      • getColorGenerator

        public adams.gui.visualization.core.ColorGradientGenerator getColorGenerator()
        Returns the generator for the color gradient.
        Returns:
        the generator
      • addOverlay

        public void addOverlay​(AbstractThreeWayDataOverlay overlay)
        Adds the heatmap overlay.
        Parameters:
        overlay - the overlay to add
      • removeOverlays

        public void removeOverlays()
        Removes all overlays.
      • setMissingValueColor

        public void setMissingValueColor​(Color value)
        Sets the color to use for missing values.
        Parameters:
        value - the color
      • getMissingValueColor

        public Color getMissingValueColor()
        Returns the color to use for missing values.
        Returns:
        the color
      • getTitle

        public String getTitle()
        Returns the database ID or filename as title.
        Returns:
        the title
      • getImagePanel

        public adams.gui.visualization.image.ImagePanel getImagePanel()
        Returns the underlying image panel
        Returns:
        the panel
      • search

        public void search​(String text,
                           boolean isRegExp)
        Performs a search.
        Parameters:
        text - the search text
        isRegExp - whether the search text is a regular expression
      • setSearchPanelVisible

        public void setSearchPanelVisible​(boolean value)
        Sets whether to display the search panel or not.
        Parameters:
        value - if true then the search panel is displayed
      • isSearchPanelVisible

        public boolean isSearchPanelVisible()
        Returns whether the search panel is visible.
        Returns:
        true if the search panel is visible
      • getProperties

        public static adams.core.Properties getProperties()
        Returns the properties for this panel.
        Returns:
        the properties file for this panel
      • setZoom

        public void setZoom​(double zoom)
        Sets the zoom factor (0-16). Use -1 to fit inside panel.
        Parameters:
        zoom - the zoom factor
      • getZoom

        public double getZoom()
        Returns the zoom factor (0-16).
        Returns:
        the zoom factor
      • isReportVisible

        public boolean isReportVisible()
        Returns whether the report table is visible.
        Returns:
        true if visible
      • setReportVisible

        public void setReportVisible​(boolean value)
        Sets the visibility state of the report table.
        Parameters:
        value - true if visible
      • clearImageCache

        protected void clearImageCache()
        Clears the image cache.
      • cleanUp

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