Class AbstractExplorerPanelHandler

    • Field Detail

      • m_SkipHistory

        protected boolean m_SkipHistory
        whether to skip the history panels.
    • Constructor Detail

      • AbstractExplorerPanelHandler

        public AbstractExplorerPanelHandler()
    • Method Detail

      • setSkipHistory

        public void setSkipHistory​(boolean value)
        Sets whether to skip history panels.
        Parameters:
        value - true if to skip
      • getSkipHistory

        public boolean getSkipHistory()
        Returns whether history panels are skipped.
        Returns:
        true if skipped
      • handles

        public abstract boolean handles​(weka.gui.explorer.Explorer.ExplorerPanel panel)
        Checks whether this handler can process the given panel.
        Parameters:
        panel - the panel to check
        Returns:
        true if it can be processed
      • serialize

        protected Object serialize​(weka.gui.GenericObjectEditor editor)
        Serializes the content of a GenericObjectEditor.
        Parameters:
        editor - the editor to serialize
        Returns:
        the serialized content
      • serialize

        protected Object serialize​(weka.gui.ResultHistoryPanel history)
        Serializes a ResultHistoryPanel.
        Parameters:
        history - the history to serialize
        Returns:
        the serialized content
        See Also:
        getSkipHistory()
      • serialize

        public abstract Object serialize​(weka.gui.explorer.Explorer.ExplorerPanel panel)
        Generates a view of the explorer panel that can be serialized.
        Parameters:
        panel - the panel to serialize
        Returns:
        the data to serialize
      • deserialize

        protected void deserialize​(Object data,
                                   weka.gui.GenericObjectEditor editor)
        Deserializes the data and configures the GenericObjectEditor with it.
        Parameters:
        data - the content for the GOE
        editor - the editor to configure
      • deserialize

        protected void deserialize​(Object data,
                                   weka.gui.ResultHistoryPanel history)
        Deserializes the data and configures the ResultHistoryPanel with it.
        Parameters:
        data - the content for the history panel
        history - the history panel to configure
      • getValue

        protected Object getValue​(Map map,
                                  String key,
                                  Object defValue)
        Returns the specified default value if the map doesn't contain a value for the specified key.
        Parameters:
        map - the map to obtain the value from
        key - the key to obtain the value for
        defValue - the default value in case the value is not present in map
      • restoreSelectedState

        protected void restoreSelectedState​(Map map,
                                            String key,
                                            Boolean defValue,
                                            JCheckBox checkbox)
        Sets the selected state of the checkbox.
        Parameters:
        map - the map to obtain the value from
        key - the key to obtain the value for
        defValue - the default value in case the value is not present in map
        checkbox - the checkbox to update
      • restoreSelectedState

        protected void restoreSelectedState​(JCheckBox checkbox,
                                            Boolean selected)
        Sets the selected state of the checkbox.
        Parameters:
        selected - the default value in case the value is not present in map
        checkbox - the checkbox to update
      • restoreText

        protected void restoreText​(Map map,
                                   String key,
                                   String defValue,
                                   JTextComponent comp)
        Restores the text of the text component, e.g., a BaseTextField.
        Parameters:
        map - the map to obtain the value from
        key - the key to obtain the value for
        defValue - the default value in case the value is not present in map
        comp - the text component to update
      • restoreSpinner

        protected void restoreSpinner​(Map map,
                                      String key,
                                      Integer defValue,
                                      JSpinner spinner)
        Restores the integer value of the JSpinner.
        Parameters:
        map - the map to obtain the value from
        key - the key to obtain the value for
        defValue - the default value in case the value is not present in map
        spinner - the spinner to update
      • restoreGOE

        protected void restoreGOE​(Map map,
                                  String key,
                                  Object defValue,
                                  weka.gui.GenericObjectEditor goe)
        Restores the value of the GenericObjectEditor.
        Parameters:
        map - the map to obtain the value from
        key - the key to obtain the value for
        defValue - the default value in case the value is not present in map
        goe - the GenericObjectEditor to update
      • restoreSelectedIndex

        protected void restoreSelectedIndex​(Map map,
                                            String key,
                                            Integer defValue,
                                            JComboBox combo)
        Restores the selected index of the BaseComboBox.
        Parameters:
        map - the map to obtain the index from
        key - the key to obtain the index for
        defValue - the default index in case the index is not present in map, -1 means last
        combo - the BaseComboBox to update
      • restoreSelectedIndices

        protected void restoreSelectedIndices​(Map map,
                                              String key,
                                              int[] defValue,
                                              JList list)
        Restores the selected indices of the JList.
        Parameters:
        map - the map to obtain the indices from
        key - the key to obtain the indices for
        defValue - the default indices in case the index is not present in map, -1 means last
        list - the JList to update
      • deserialize

        public abstract void deserialize​(weka.gui.explorer.Explorer.ExplorerPanel panel,
                                         Object data)
        Deserializes the data and configures the panel.
        Parameters:
        panel - the panel to update
        data - the serialized data to restore the panel with
      • getHandlers

        public static String[] getHandlers()
        Returns a list with classnames of handlers.
        Returns:
        the handler classnames