Package weka.gui

Class PropertyPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PropertyPanel extends JPanel
Support for drawing a property value in a component.
Version:
$Revision: 14496 $
Author:
Len Trigg (trigg@cs.waikato.ac.nz), Richard Kirkby (rkirkby@cs.waikato.ac.nz)
See Also:
  • Constructor Details

    • PropertyPanel

      public PropertyPanel(PropertyEditor pe)
      Create the panel with the supplied property editor.
      Parameters:
      pe - the PropertyEditor
    • PropertyPanel

      public PropertyPanel(PropertyEditor pe, boolean ignoreCustomPanel)
      Create the panel with the supplied property editor, optionally ignoring any custom panel the editor can provide.
      Parameters:
      pe - the PropertyEditor
      ignoreCustomPanel - whether to make use of any available custom panel
  • Method Details

    • showPropertyDialog

      public void showPropertyDialog()
      Displays the property edit dialog for the panel.
    • removeNotify

      public void removeNotify()
      Cleans up when the panel is destroyed.
      Overrides:
      removeNotify in class JComponent
    • setEnabled

      public void setEnabled(boolean enabled)
      Passes on enabled/disabled status to the custom panel (if one is set).
      Overrides:
      setEnabled in class JComponent
      Parameters:
      enabled - true if this panel (and the custom panel is enabled)
    • paintComponent

      public void paintComponent(Graphics g)
      Paints the component, using the property editor's paint method.
      Parameters:
      g - the current graphics context
    • addToHistory

      public boolean addToHistory()
      Adds the current editor value to the history.
      Returns:
      true if successfully added (i.e., if editor is a GOE)
    • addToHistory

      public boolean addToHistory(Object obj)
      Adds the specified value to the history.
      Parameters:
      obj - the object to add to the history
      Returns:
      true if successfully added (i.e., if editor is a GOE)