Class AbstractInstanceInfoFrame

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants, weka.gui.visualize.InstanceInfo

    public abstract class AbstractInstanceInfoFrame
    extends weka.gui.visualize.InstanceInfoFrame
    Ancestor for frames for displaying information on the displayed data, with some more domain-specific functionality.

    Methods to implement:
    • getActions() - returns an array of String objects to display in the combobox that allows the user to choose an action. (m_ComboBoxActions)
    • getActionMethod(String) - returns the Method object (no parameters allowed) that is associated with the given action string. locateMethod(String) can be used to determine the reflection object.
    • generateNumPointsLabel(int) - generates the text to display in the label for the number of data points. (m_LabelNumPoints)
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Detail

      • m_TabbedPane

        protected adams.gui.core.BaseTabbedPane m_TabbedPane
        the tabbed pane for displaying the data.
      • m_PanelTextAll

        protected adams.gui.core.BasePanel m_PanelTextAll
        the panel for the text tab.
      • m_LabelTextNumPoints

        protected JLabel m_LabelTextNumPoints
        the number of data points.
      • m_ComboBoxTextInstances

        protected adams.gui.core.BaseComboBox m_ComboBoxTextInstances
        the combobox with all the instances.
      • m_ComboBoxTextActions

        protected adams.gui.core.BaseComboBox m_ComboBoxTextActions
        the combobox with all the actions.
      • m_ButtonTextGo

        protected adams.gui.core.BaseButton m_ButtonTextGo
        the button for displaying the instances.
      • m_PanelTextAction

        protected JPanel m_PanelTextAction
        the panel with buttons etc.
      • m_TableData

        protected adams.gui.core.SortableAndSearchableTable m_TableData
        the table with the dataset.
      • m_PanelData

        protected adams.gui.core.BasePanel m_PanelData
        the panel holding the table and buttons for the dataset.
      • m_ComboBoxData

        protected adams.gui.core.BaseComboBox m_ComboBoxData
        the combobox with all the datasets.
      • m_PanelComboBoxData

        protected adams.gui.core.BasePanel m_PanelComboBoxData
        the panel for the combobox listing the datasets.
      • m_ComboBoxDataActions

        protected adams.gui.core.BaseComboBox m_ComboBoxDataActions
        the combobox with all the actions.
      • m_ButtonDataGo

        protected adams.gui.core.BaseButton m_ButtonDataGo
        the button for displaying the instances.
      • m_PanelDataAction

        protected JPanel m_PanelDataAction
        the panel with buttons etc.
    • Constructor Detail

      • AbstractInstanceInfoFrame

        public AbstractInstanceInfoFrame()
    • Method Detail

      • initGUI

        protected void initGUI()
        Sets up the GUI components.
        Overrides:
        initGUI in class weka.gui.visualize.InstanceInfoFrame
      • getDialogTitle

        protected String getDialogTitle()
        Returns the title for the dialog.
        Returns:
        the dialog
      • generateNumPointsLabel

        protected abstract String generateNumPointsLabel​(int numPoints)
        Generates the string for the label displaying the number of points that are currently selected.
        Parameters:
        numPoints - the number of points currently being displayed
        Returns:
        the generated string
      • getActions

        protected abstract String[] getActions()
        Returns the available actions to list.
        Returns:
        the names of the actions
        See Also:
        m_ComboBoxTextActions
      • getActionMethod

        protected abstract Method getActionMethod​(String action)
        Returns the method associated with the specified action.
        Parameters:
        action - the action to retrieve the method for
        Returns:
        the associated method, null if not available
        See Also:
        locateMethod(String)
      • locateMethod

        protected Method locateMethod​(String name)
        Locates the method with the specified name (method is expected to take no parameters).
        Parameters:
        name - the name of the method
        Returns:
        the method, null if none found
      • extractDatabaseID

        protected int extractDatabaseID​(String idStr)
        Extracts the database ID from a string in the comboxbox.
        Parameters:
        idStr - the string from the combobox
        Returns:
        the ID
      • getDatabaseIDColumnIndex

        protected int getDatabaseIDColumnIndex()
        Returns the index of the column with the database ID.
        Returns:
        the column index, -1 if not found
      • getSelectedDatabaseID

        protected int getSelectedDatabaseID​(int tabIndex)
        Returns the database ID of the currently selected item.
        Parameters:
        tabIndex - the currently selected tab
        Returns:
        the database ID, NO_ID if none selected
        See Also:
        Constants.NO_ID
      • getSelectedDatabaseIDs

        protected int[] getSelectedDatabaseIDs​(int tabIndex)
        Returns the database IDs of the currently selected items.
        Parameters:
        tabIndex - the currently selected tab
        Returns:
        array of database IDs, length 0 if none selected
      • getAllDatabaseIDs

        protected int[] getAllDatabaseIDs​(int tabIndex)
        Returns all database IDs.
        Parameters:
        tabIndex - the currently selected tab
        Returns:
        array of database IDs, length 0 if none available
      • setInfoData

        public void setInfoData​(Vector<weka.core.Instances> data)
        Sets the underlying data.
        Specified by:
        setInfoData in interface weka.gui.visualize.InstanceInfo
        Overrides:
        setInfoData in class weka.gui.visualize.InstanceInfoFrame
        Parameters:
        data - the data of the info text
      • updateDataTable

        protected void updateDataTable()
        Updates the data in the data table.