Class InstanceExplorer

  • All Implemented Interfaces:
    adams.core.CleanUpHandler, adams.core.StatusMessageHandler, adams.gui.core.MenuBarProvider, adams.gui.event.DataChangeListener, adams.gui.sendto.SendToActionSupporter, adams.gui.visualization.container.ContainerListManager<InstanceContainerManager>, ImageObserver, MenuContainer, Serializable, Accessible

    public class InstanceExplorer
    extends adams.gui.core.BasePanel
    implements adams.gui.core.MenuBarProvider, adams.core.StatusMessageHandler, adams.gui.visualization.container.ContainerListManager<InstanceContainerManager>, adams.gui.event.DataChangeListener, adams.core.CleanUpHandler, adams.gui.sendto.SendToActionSupporter
    A panel for exploring Instances visually.
    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 properties.
      • m_PanelInstance

        protected InstancePanel m_PanelInstance
        the panel for displaying.
      • m_StatusBar

        protected adams.gui.core.BaseStatusBar m_StatusBar
        the status bar.
      • m_MenuBar

        protected JMenuBar m_MenuBar
        the menu bar, if used.
      • m_MenuItemLoadRecent

        protected JMenu m_MenuItemLoadRecent
        the "load recent" submenu.
      • m_MenuView

        protected JMenu m_MenuView
        the menu item for view related stuff.
      • m_MenuItemViewZoomOverview

        protected JMenuItem m_MenuItemViewZoomOverview
        the toggle zoom overview menu item.
      • m_MenuItemViewAntiAliasing

        protected JMenuItem m_MenuItemViewAntiAliasing
        the toggle anti-aliasing menu item.
      • m_MenuItemViewColorProvider

        protected JMenuItem m_MenuItemViewColorProvider
        the color provider menu item.
      • m_MenuItemViewPaintlet

        protected JMenuItem m_MenuItemViewPaintlet
        the paintlet menu item.
      • m_MenuItemClearData

        protected JMenuItem m_MenuItemClearData
        the clear data menu item.
      • m_TabbedPane

        protected adams.gui.core.BaseTabbedPane m_TabbedPane
        the tabbed pane for the data to display.
      • m_Reports

        protected adams.gui.visualization.report.ReportFactory.Panel m_Reports
        the reports.
      • m_SearchPanel

        protected adams.gui.core.SearchPanel m_SearchPanel
        for searching the fields in the reports.
      • m_LoadFromDiskDialog

        protected LoadDatasetDialog m_LoadFromDiskDialog
        the dialog for loading datasets.
      • m_LoadFromDatabaseDialog

        protected weka.gui.sql.SqlViewerDialog m_LoadFromDatabaseDialog
        the SQL viewer dialog.
      • m_RecentFilesHandler

        protected adams.gui.core.RecentFilesHandler<JMenu> m_RecentFilesHandler
        the recent files handler.
      • m_DialogColorProvider

        protected adams.gui.goe.GenericObjectEditorDialog m_DialogColorProvider
        the dialog for selecting the color provider.
      • m_DialogPaintlet

        protected adams.gui.goe.GenericObjectEditorDialog m_DialogPaintlet
        the dialog for selecting the paintlet.
    • Constructor Detail

      • InstanceExplorer

        public InstanceExplorer()
    • 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
      • getInstancePanel

        public InstancePanel getInstancePanel()
        Returns the panel for painting the instances.
        Returns:
        the panel
      • getInstanceContainerList

        public InstanceContainerList getInstanceContainerList()
        Returns the panel listing the instances.
        Returns:
        the panel
      • showStatus

        public void showStatus​(String msg)
        Displays a message.
        Specified by:
        showStatus in interface adams.core.StatusMessageHandler
        Parameters:
        msg - the message to display
      • newReportPanel

        protected InstanceReportFactory.Panel newReportPanel()
        Creates a new tabbed pane for the reports.
        Returns:
        the tabbed pane
      • dataChanged

        public void dataChanged​(adams.gui.event.DataChangeEvent e)
        Gets called if the data of the instance panel has changed.
        Specified by:
        dataChanged in interface adams.gui.event.DataChangeListener
        Parameters:
        e - the event that the instance panel sent
      • getContainerManager

        public InstanceContainerManager getContainerManager()
        Returns the current container manager.
        Specified by:
        getContainerManager in interface adams.gui.visualization.container.ContainerListManager<InstanceContainerManager>
        Returns:
        the manager
      • setContainerManager

        public void setContainerManager​(InstanceContainerManager value)
        Sets the manager for handling the containers.
        Specified by:
        setContainerManager in interface adams.gui.visualization.container.ContainerListManager<InstanceContainerManager>
        Parameters:
        value - the manager
      • updateMenu

        protected void updateMenu()
        updates the enabled state of the menu items.
      • getMenuBar

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

        public void clearData()
        Removes all the data.
      • loadDataFromDatabase

        public void loadDataFromDatabase()
        pops up SQL Viewer for SQL statement.
      • loadDataFromDisk

        public void loadDataFromDisk()
        pops up file dialog for loading dataset form disk.
      • loadDataFromDisk

        public void loadDataFromDisk​(File file)
        pops up file dialog for loading dataset form disk.
        Parameters:
        file - an optional file, use null to ignore
      • loadData

        protected void loadData​(weka.core.Instances dataset,
                                List<InstanceContainer> data)
        Loads the given data into the container manager.
        Parameters:
        dataset - the dataset
        data - the data to add to the manager
      • close

        public void close()
        closes the dialog/frame.
      • setSidePanelVisible

        public void setSidePanelVisible​(boolean visible)
        Whether to display the side panel or not.
        Parameters:
        visible - if true, then the side panel will be displayed
      • isSidePanelVisible

        public boolean isSidePanelVisible()
        Returns whether the side panel is visible or not.
        Returns:
        true if the side panel is visible
      • getSidePanel

        public JPanel getSidePanel()
        Returns the side panel.
        Returns:
        the side panel
      • setZoomOverviewPanelVisible

        public void setZoomOverviewPanelVisible​(boolean value)
        Sets the zoom overview panel visible or not.
        Parameters:
        value - if true then the panel is visible
      • isZoomOverviewPanelVisible

        public boolean isZoomOverviewPanelVisible()
        Returns whether the zoom overview panel is visible or not.
        Returns:
        true if visible
      • selectColorProvider

        protected void selectColorProvider()
        Lets the user select a new color provider.
      • selectPaintlet

        protected void selectPaintlet()
        Lets the user select a new paintlet.
      • getSendToClasses

        public Class[] getSendToClasses()
        Returns the classes that the supporter generates.
        Specified by:
        getSendToClasses in interface adams.gui.sendto.SendToActionSupporter
        Returns:
        the classes
      • hasSendToItem

        public boolean hasSendToItem​(Class[] cls)
        Checks whether something to send is available.
        Specified by:
        hasSendToItem in interface adams.gui.sendto.SendToActionSupporter
        Parameters:
        cls - the classes to retrieve an 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 adams.gui.sendto.SendToActionSupporter
        Parameters:
        cls - the classes to retrieve the item for
        Returns:
        the item to send
      • cleanUp

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

        public static adams.core.Properties getProperties()
        Returns the properties that define the editor.
        Returns:
        the properties