Package adams.gui.goe

Class GenericArrayEditorDialog

    • 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

      • GenericArrayEditorDialog

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

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

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

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

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

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

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

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

        public 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 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
      • setOkAlwaysEnabled

        public void setOkAlwaysEnabled​(boolean value)
        Sets whether the OK button is always enabled, not just when array was modified.
        Parameters:
        value - true if to always enable
      • isOkAlwaysEnabled

        public boolean isOkAlwaysEnabled()
        Returns whether the OK button is always enabled, not just when array was modified.
        Returns:
        true if always enabled
      • createDialog

        public static GenericArrayEditorDialog 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 GenericArrayEditorDialog 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