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.
      • m_ClassType

        protected Class m_ClassType
        the class type.
    • 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

      • getClassType

        public Class getClassType()
        Returns the class type.
        Returns:
        the type
      • supportsFavorites

        protected boolean supportsFavorites()
        Whether the favorites button is shown or not.
        Overrides:
        supportsFavorites in class AbstractChooserPanel
        Returns:
        true if to show
      • 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