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$
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
-
-
Constructor Summary
Constructors Constructor Description FileEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentgetCustomEditor()Gets the custom editor component.StringgetJavaInitializationString()Returns a representation of the current property value as java source.booleanisPaintable()Returns true since this editor is paintable.voidpaintValue(Graphics gfx, Rectangle box)Paints a representation of the current Object.booleansupportsCustomEditor()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
-
-
-
-
Method Detail
-
getJavaInitializationString
public String getJavaInitializationString()
Returns a representation of the current property value as java source.- Specified by:
getJavaInitializationStringin interfacePropertyEditor- Overrides:
getJavaInitializationStringin classPropertyEditorSupport- Returns:
- a value of type 'String'
-
supportsCustomEditor
public boolean supportsCustomEditor()
Returns true because we do support a custom editor.- Specified by:
supportsCustomEditorin interfacePropertyEditor- Overrides:
supportsCustomEditorin classPropertyEditorSupport- Returns:
- true
-
getCustomEditor
public Component getCustomEditor()
Gets the custom editor component.- Specified by:
getCustomEditorin interfacePropertyEditor- Overrides:
getCustomEditorin classPropertyEditorSupport- Returns:
- a value of type 'java.awt.Component'
-
isPaintable
public boolean isPaintable()
Returns true since this editor is paintable.- Specified by:
isPaintablein interfacePropertyEditor- Overrides:
isPaintablein classPropertyEditorSupport- Returns:
- true.
-
paintValue
public void paintValue(Graphics gfx, Rectangle box)
Paints a representation of the current Object.- Specified by:
paintValuein interfacePropertyEditor- Overrides:
paintValuein classPropertyEditorSupport- Parameters:
gfx- the graphics context to usebox- the area we are allowed to paint into
-
-