Package weka.gui

# Class FileEditor

java.lang.Object
java.beans.PropertyEditorSupport
weka.gui.FileEditor

All Implemented Interfaces:
  `PropertyEditor`

public class FileEditor extends PropertyEditorSupport
A PropertyEditor for File objects that lets the user select a file.

Version:
  $Revision: 15231 $
Author:
  Len Trigg (trigg@cs.waikato.ac.nz)

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `FileEditor()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Component`
  `getCustomEditor()`
  Gets the custom editor component.
  `String`
  `getJavaInitializationString()`
  Returns a representation of the current property value as java source.
  `boolean`
  `isPaintable()`
  Returns true since this editor is paintable.
  `void`
  `paintValue(Graphics gfx, Rectangle box)`
  Paints a representation of the current Object.
  `boolean`
  `supportsCustomEditor()`
  Returns true because we do support a custom editor.

  ### Methods inherited from class java.beans.PropertyEditorSupport

  `addPropertyChangeListener, firePropertyChange, getAsText, getSource, getTags, getValue, removePropertyChangeListener, setAsText, setSource, setValue`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### FileEditor

    public FileEditor()

- ## Method Details

  - ### getJavaInitializationString

    public String getJavaInitializationString()
    Returns a representation of the current property value as java source.
    Specified by:
      `getJavaInitializationString` in interface `PropertyEditor`
    Overrides:
      `getJavaInitializationString` in class `PropertyEditorSupport`
    Returns:
      a value of type 'String'

  - ### supportsCustomEditor

    public boolean supportsCustomEditor()
    Returns true because we do support a custom editor.
    Specified by:
      `supportsCustomEditor` in interface `PropertyEditor`
    Overrides:
      `supportsCustomEditor` in class `PropertyEditorSupport`
    Returns:
      true

  - ### getCustomEditor

    public Component getCustomEditor()
    Gets the custom editor component.
    Specified by:
      `getCustomEditor` in interface `PropertyEditor`
    Overrides:
      `getCustomEditor` in class `PropertyEditorSupport`
    Returns:
      a value of type 'java.awt.Component'

  - ### isPaintable

    public boolean isPaintable()
    Returns true since this editor is paintable.
    Specified by:
      `isPaintable` in interface `PropertyEditor`
    Overrides:
      `isPaintable` in class `PropertyEditorSupport`
    Returns:
      true.

  - ### paintValue

    public void paintValue(Graphics gfx, Rectangle box)
    Paints a representation of the current Object.
    Specified by:
      `paintValue` in interface `PropertyEditor`
    Overrides:
      `paintValue` in class `PropertyEditorSupport`
    Parameters:
      `gfx` - the graphics context to use
      `box` - the area we are allowed to paint into