Package adams.gui.goe

Class WekaGenericObjectEditorPanel

    • Field Detail

      • m_Editor

        protected weka.gui.GenericObjectEditor m_Editor
        the generic object editor.
      • m_Current

        protected transient Object m_Current
        the current object.
    • Constructor Detail

      • WekaGenericObjectEditorPanel

        public WekaGenericObjectEditorPanel​(Class cls,
                                            Object defValue)
        Initializes the panel with the given class and default value. Cannot change the class.
        Parameters:
        cls - the class to handler
        defValue - the default value
      • WekaGenericObjectEditorPanel

        public WekaGenericObjectEditorPanel​(Class cls,
                                            Object defValue,
                                            boolean canChangeClassInDialog)
        Initializes the panel with the given class and default value. Cannot change the class.
        Parameters:
        cls - the class to handler
        defValue - the default value
        canChangeClassInDialog - whether the user can change the class
    • Method Detail

      • doChoose

        protected Object doChoose()
        Performs the actual choosing of an object.
        Specified by:
        doChoose in class AbstractChooserPanel
        Returns:
        the chosen object or null if none chosen
      • fromString

        protected Object fromString​(String value)
        Converts the string representation into its object representation.
        Specified by:
        fromString in class AbstractChooserPanel
        Parameters:
        value - the string value to convert
        Returns:
        the generated object
      • toString

        protected String toString​(Object value)
        Converts the value into its string representation.
        Specified by:
        toString in class AbstractChooserPanel
        Parameters:
        value - the value to convert
        Returns:
        the generated string
      • setCurrent

        public boolean setCurrent​(Object value)
        Sets the current value.
        Overrides:
        setCurrent in class AbstractChooserPanel
        Parameters:
        value - the value to use, can be null
        Returns:
        true if successfully set