Package adams.gui.goe

Class WekaGenericObjectEditorDialog

    • Field Detail

      • CANCEL_OPTION

        public static final int CANCEL_OPTION
        constant for dialog cancellation.
        See Also:
        Constant Field Values
      • APPROVE_OPTION

        public static final int APPROVE_OPTION
        constant for dialog approval.
        See Also:
        Constant Field Values
      • m_Current

        protected Object m_Current
        the current object.
      • m_Result

        protected int m_Result
        whether the dialog was cancelled or ok'ed.
    • Constructor Detail

      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Dialog owner)
        Creates a modeless dialog without a title with the specified Dialog as its owner.
        Parameters:
        owner - the owning dialog
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Dialog owner,
                                             Dialog.ModalityType modality)
        Creates a dialog with the specified owner Dialog and modality.
        Parameters:
        owner - the owning dialog
        modality - the type of modality
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Dialog owner,
                                             String title)
        Creates a modeless dialog with the specified title and with the specified owner dialog.
        Parameters:
        owner - the owning dialog
        title - the title of the dialog
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Dialog owner,
                                             String title,
                                             Dialog.ModalityType modality)
        Creates a dialog with the specified title, modality and the specified owner Dialog.
        Parameters:
        owner - the owning dialog
        title - the title of the dialog
        modality - the type of modality
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Frame owner)
        Creates a modeless dialog without a title with the specified Frame as its owner.
        Parameters:
        owner - the owning frame
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Frame owner,
                                             boolean modal)
        Creates a dialog with the specified owner Frame, modality and an empty title.
        Parameters:
        owner - the owning frame
        modal - whether the dialog is modal or not
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Frame owner,
                                             String title)
        Creates a modeless dialog with the specified title and with the specified owner frame.
        Parameters:
        owner - the owning frame
        title - the title of the dialog
      • WekaGenericObjectEditorDialog

        public WekaGenericObjectEditorDialog​(Frame owner,
                                             String title,
                                             boolean modal)
        Creates a dialog with the specified owner Frame, modality and title.
        Parameters:
        owner - the owning frame
        title - the title of the dialog
        modal - whether the dialog is modal or not
    • Method Detail

      • initialize

        protected void initialize()
        For initializing members.
        Overrides:
        initialize in class BaseDialog
      • initGUI

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class BaseDialog
      • setEditor

        public void setEditor​(PropertyEditor value)
        Sets the editor to use.
        Parameters:
        value - the editor to use
      • getEditor

        public PropertyEditor getEditor()
        Returns the underlying editor.
        Returns:
        the editor in use
      • isGOEEditor

        public boolean isGOEEditor()
        Returns whether the underlying editor is GenericObjectEditor.
        Returns:
        true if editor is a GenericObjectEditor one
      • getGOEEditor

        public weka.gui.GenericObjectEditor getGOEEditor()
        Returns the underlying GOE editor.
        Returns:
        the GOE editor in use, or null if other editor used
      • beforeShow

        protected void beforeShow()
        Hook method just before the dialog is made visible.
        Overrides:
        beforeShow in class BaseDialog
      • setCurrent

        public void setCurrent​(Object value)
        Sets the current object.
        Parameters:
        value - the current object
      • getCurrent

        public Object getCurrent()
        Returns the current object.
        Returns:
        the current object
      • getResult

        public int getResult()
        Returns whether the dialog got cancelled or approved.
        Returns:
        the result
        See Also:
        APPROVE_OPTION, CANCEL_OPTION
      • getResultType

        public int getResultType()
        Returns whether the dialog got cancelled or approved.
        Returns:
        the result
        See Also:
        APPROVE_OPTION, CANCEL_OPTION
      • actionPerformed

        public void actionPerformed​(ActionEvent e)
        Gets called when the one of the buttons in the GOE panel gets pressed.
        Specified by:
        actionPerformed in interface ActionListener
        Parameters:
        e - the event
      • createDialog

        public static WekaGenericObjectEditorDialog createDialog​(Container parent)
        Creates a modal dialog for the parent.
        Parameters:
        parent - the parent to make the dialog modal
        Returns:
        the dialog
      • createDialog

        public static WekaGenericObjectEditorDialog createDialog​(Container parent,
                                                                 PropertyEditor editor)
        Creates a modal dialog for the parent with the provided editor.
        Parameters:
        parent - the parent to make the dialog modal
        editor - the editor to use
        Returns:
        the dialog
      • createDialog

        public static WekaGenericObjectEditorDialog createDialog​(Container parent,
                                                                 PropertyEditor editor,
                                                                 Object value)
        Creates a modal dialog for the parent with the provided editor and initial value.
        Parameters:
        parent - the parent to make the dialog modal
        editor - the editor to use, ignored if null
        value - the value to use, ignored if null
        Returns:
        the dialog
      • main

        public static void main​(String[] args)
        For testing only.
        Parameters:
        args - ignored