Package adams.gui.goe

Class WekaGenericArrayEditorDialog

  • All Implemented Interfaces:
    ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

    public class WekaGenericArrayEditorDialog
    extends adams.gui.core.BaseDialog
    Displays a GenericArrayEditor.

    Calling code needs to dispose the dialog manually or enable automatic disposal:
     GenericArrayEditorDialog dialog = new ...
     dialog.setDefaultCloseOperation(GenericArrayEditorDialog.DISPOSE_ON_CLOSE);
     
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • 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_Editor

        protected weka.gui.GenericArrayEditor m_Editor
        the underlying editor.
      • 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

      • WekaGenericArrayEditorDialog

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

        public WekaGenericArrayEditorDialog​(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
      • WekaGenericArrayEditorDialog

        public WekaGenericArrayEditorDialog​(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
      • WekaGenericArrayEditorDialog

        public WekaGenericArrayEditorDialog​(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
      • WekaGenericArrayEditorDialog

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

        public WekaGenericArrayEditorDialog​(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
      • WekaGenericArrayEditorDialog

        public WekaGenericArrayEditorDialog​(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
      • WekaGenericArrayEditorDialog

        public WekaGenericArrayEditorDialog​(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 adams.gui.core.BaseDialog
      • initGUI

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class adams.gui.core.BaseDialog
      • getEditor

        public weka.gui.GenericArrayEditor getEditor()
        Returns the underlying editor.
        Returns:
        the editor in use
      • beforeShow

        protected void beforeShow()
        Hook method just before the dialog is made visible.
        Overrides:
        beforeShow in class adams.gui.core.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
      • createDialog

        public static WekaGenericArrayEditorDialog 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 WekaGenericArrayEditorDialog createDialog​(Container parent,
                                                                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
        value - the value to use, ignored if null
        Returns:
        the dialog
      • main

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