Package weka.gui
Class FileEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- weka.gui.FileEditor
-
- All Implemented Interfaces:
java.beans.PropertyEditor
public class FileEditor extends java.beans.PropertyEditorSupport
A PropertyEditor for File objects that lets the user select a file.- Version:
- $Revision: 7059 $
- 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 java.awt.Component
getCustomEditor()
Gets the custom editor component.java.lang.String
getJavaInitializationString()
Returns a representation of the current property value as java source.boolean
isPaintable()
Returns true since this editor is paintable.void
paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)
Paints a representation of the current Object.boolean
supportsCustomEditor()
Returns true because we do support a custom editor.
-
-
-
Method Detail
-
getJavaInitializationString
public java.lang.String getJavaInitializationString()
Returns a representation of the current property value as java source.- Specified by:
getJavaInitializationString
in interfacejava.beans.PropertyEditor
- Overrides:
getJavaInitializationString
in classjava.beans.PropertyEditorSupport
- Returns:
- a value of type 'String'
-
supportsCustomEditor
public boolean supportsCustomEditor()
Returns true because we do support a custom editor.- Specified by:
supportsCustomEditor
in interfacejava.beans.PropertyEditor
- Overrides:
supportsCustomEditor
in classjava.beans.PropertyEditorSupport
- Returns:
- true
-
getCustomEditor
public java.awt.Component getCustomEditor()
Gets the custom editor component.- Specified by:
getCustomEditor
in interfacejava.beans.PropertyEditor
- Overrides:
getCustomEditor
in classjava.beans.PropertyEditorSupport
- Returns:
- a value of type 'java.awt.Component'
-
isPaintable
public boolean isPaintable()
Returns true since this editor is paintable.- Specified by:
isPaintable
in interfacejava.beans.PropertyEditor
- Overrides:
isPaintable
in classjava.beans.PropertyEditorSupport
- Returns:
- true.
-
paintValue
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)
Paints a representation of the current Object.- Specified by:
paintValue
in interfacejava.beans.PropertyEditor
- Overrides:
paintValue
in classjava.beans.PropertyEditorSupport
- Parameters:
gfx
- the graphics context to usebox
- the area we are allowed to paint into
-
-