Package adams.gui.goe

Class WekaExperimentFileEditor

  • All Implemented Interfaces:
    adams.core.HelpProvider, adams.gui.goe.CustomStringRepresentationHandler, adams.gui.goe.InlineEditorSupport, PropertyEditor

    public class WekaExperimentFileEditor
    extends adams.gui.goe.AbstractPropertyEditorSupport
    implements adams.gui.goe.CustomStringRepresentationHandler, adams.gui.goe.InlineEditorSupport
    A PropertyEditor for WekaExperimentFile objects that lets the user select a file.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_PanelFile

        protected adams.gui.chooser.FileChooserPanel m_PanelFile
        the panel for selecting the experiment file.
      • m_PanelEditor

        protected adams.gui.core.BasePanel m_PanelEditor
        the editor panel.
      • m_ButtonEdit

        protected adams.gui.core.BaseButton m_ButtonEdit
        the button to bring up the dialog for editing the experiment.
      • m_ButtonOK

        protected adams.gui.core.BaseButton m_ButtonOK
        the OK button.
      • m_ButtonCancel

        protected adams.gui.core.BaseButton m_ButtonCancel
        the Cancel button.
    • Constructor Detail

      • WekaExperimentFileEditor

        public WekaExperimentFileEditor()
    • Method Detail

      • toCustomStringRepresentation

        public String toCustomStringRepresentation​(Object obj)
        Returns a custom string representation of the object.
        Specified by:
        toCustomStringRepresentation in interface adams.gui.goe.CustomStringRepresentationHandler
        Parameters:
        obj - the object to turn into a string
        Returns:
        the string representation
      • fromCustomStringRepresentation

        public Object fromCustomStringRepresentation​(String str)
        Returns an object created from the custom string representation.
        Specified by:
        fromCustomStringRepresentation in interface adams.gui.goe.CustomStringRepresentationHandler
        Parameters:
        str - the string to turn into an object
        Returns:
        the object
      • newExperiment

        public static weka.experiment.Experiment newExperiment()
        Generates a new (simple) experiment.
        Returns:
        the generated experiment
      • createCustomEditor

        protected JComponent createCustomEditor()
        Gets the custom editor component.
        Specified by:
        createCustomEditor in class adams.gui.goe.AbstractPropertyEditorSupport
        Returns:
        a value of type 'Component'
      • initForDisplay

        protected void initForDisplay()
        Initializes the display of the value.
        Overrides:
        initForDisplay in class adams.gui.goe.AbstractPropertyEditorSupport
      • isInlineEditingAvailable

        public boolean isInlineEditingAvailable()
        Checks whether inline editing is available.
        Specified by:
        isInlineEditingAvailable in interface adams.gui.goe.InlineEditorSupport
        Returns:
        true if editing available
      • setInlineValue

        public void setInlineValue​(String value)
        Sets the value to use.
        Specified by:
        setInlineValue in interface adams.gui.goe.InlineEditorSupport
        Parameters:
        value - the value to use
      • getInlineValue

        public String getInlineValue()
        Returns the current value.
        Specified by:
        getInlineValue in interface adams.gui.goe.InlineEditorSupport
        Returns:
        the current value
      • isInlineValueValid

        public boolean isInlineValueValid​(String value)
        Checks whether the value id valid.
        Specified by:
        isInlineValueValid in interface adams.gui.goe.InlineEditorSupport
        Parameters:
        value - the value to check
        Returns:
        true if valid