Package weka.gui

Class PropertyDialog

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

public class PropertyDialog extends JDialog
Support for PropertyEditors with custom editors: puts the editor into a separate frame.
Version:
$Revision: 15302 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz)
See Also:
  • Constructor Details

    • PropertyDialog

      public PropertyDialog(PropertyEditor pe, int x, int y)
      Deprecated.
      instead of this constructor, one should use the constructors with an explicit owner (either derived from java.awt.Dialog or from java.awt.Frame) or, if none available, using (Frame) null as owner.
      Creates the editor frame - only kept for backward-compatibility.
      Parameters:
      pe - the PropertyEditor
      x - initial x coord for the frame
      y - initial y coord for the frame
    • PropertyDialog

      public PropertyDialog(Dialog owner, PropertyEditor pe)
      Creates the (screen-centered) editor dialog. The dialog is automatically modal in case the owner is non-null.
      Parameters:
      owner - the dialog that opens this dialog
      pe - the PropertyEditor
    • PropertyDialog

      public PropertyDialog(Dialog owner, PropertyEditor pe, int x, int y)
      Creates the editor dialog at the given position. The dialog is automatically modal in case the owner is non-null.
      Parameters:
      owner - the dialog that opens this dialog
      pe - the PropertyEditor
      x - initial x coord for the dialog
      y - initial y coord for the dialog
    • PropertyDialog

      public PropertyDialog(Frame owner, PropertyEditor pe)
      Creates the (screen-centered) editor dialog. The dialog is automatically modal in case the owner is non-null.
      Parameters:
      owner - the frame that opens this dialog
      pe - the PropertyEditor
    • PropertyDialog

      public PropertyDialog(Frame owner, PropertyEditor pe, int x, int y)
      Creates the editor dialog at the given position. The dialog is automatically modal in case the owner is non-null.
      Parameters:
      owner - the frame that opens this dialog
      pe - the PropertyEditor
      x - initial x coord for the dialog
      y - initial y coord for the dialog
  • Method Details

    • dispose

      public void dispose()
      We need to extend the dispose method so that the member variables are set to null and the corresponding objects can be garbage collected.
      Overrides:
      dispose in class Window
    • getEditor

      public PropertyEditor getEditor()
      Gets the current property editor.
      Returns:
      a value of type 'PropertyEditor'
    • getParentFrame

      public static Frame getParentFrame(Container c)
      Tries to determine the frame this panel is part of.
      Parameters:
      c - the container to start with
      Returns:
      the parent frame if one exists or null if not
    • getParentInternalFrame

      public static JInternalFrame getParentInternalFrame(Container c)
      Tries to determine the internal frame this panel is part of.
      Parameters:
      c - the container to start with
      Returns:
      the parent internal frame if one exists or null if not
    • getParentDialog

      public static Dialog getParentDialog(Container c)
      Tries to determine the dialog this panel is part of.
      Parameters:
      c - the container to start with
      Returns:
      the parent dialog if one exists or null if not