Package weka.gui
Class FileEditor
java.lang.Object
java.beans.PropertyEditorSupport
weka.gui.FileEditor
- All Implemented Interfaces:
PropertyEditor
A PropertyEditor for File objects that lets the user select a file.
- Version:
- $Revision: 15104 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the custom editor component.Returns a representation of the current property value as java source.boolean
Returns true since this editor is paintable.void
paintValue
(Graphics gfx, Rectangle box) Paints a representation of the current Object.boolean
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
-
Constructor Details
-
FileEditor
public FileEditor()
-
-
Method Details
-
getJavaInitializationString
Returns a representation of the current property value as java source.- Specified by:
getJavaInitializationString
in interfacePropertyEditor
- Overrides:
getJavaInitializationString
in classPropertyEditorSupport
- Returns:
- a value of type 'String'
-
supportsCustomEditor
public boolean supportsCustomEditor()Returns true because we do support a custom editor.- Specified by:
supportsCustomEditor
in interfacePropertyEditor
- Overrides:
supportsCustomEditor
in classPropertyEditorSupport
- Returns:
- true
-
getCustomEditor
Gets the custom editor component.- Specified by:
getCustomEditor
in interfacePropertyEditor
- Overrides:
getCustomEditor
in classPropertyEditorSupport
- Returns:
- a value of type 'java.awt.Component'
-
isPaintable
public boolean isPaintable()Returns true since this editor is paintable.- Specified by:
isPaintable
in interfacePropertyEditor
- Overrides:
isPaintable
in classPropertyEditorSupport
- Returns:
- true.
-
paintValue
Paints a representation of the current Object.- Specified by:
paintValue
in interfacePropertyEditor
- Overrides:
paintValue
in classPropertyEditorSupport
- Parameters:
gfx
- the graphics context to usebox
- the area we are allowed to paint into
-