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.PropertyEditorSupportA 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.ComponentgetCustomEditor()Gets the custom editor component.java.lang.StringgetJavaInitializationString()Returns a representation of the current property value as java source.booleanisPaintable()Returns true since this editor is paintable.voidpaintValue(java.awt.Graphics gfx, java.awt.Rectangle box)Paints a representation of the current Object.booleansupportsCustomEditor()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:
getJavaInitializationStringin interfacejava.beans.PropertyEditor- Overrides:
getJavaInitializationStringin classjava.beans.PropertyEditorSupport- Returns:
- a value of type 'String'
-
supportsCustomEditor
public boolean supportsCustomEditor()
Returns true because we do support a custom editor.- Specified by:
supportsCustomEditorin interfacejava.beans.PropertyEditor- Overrides:
supportsCustomEditorin classjava.beans.PropertyEditorSupport- Returns:
- true
-
getCustomEditor
public java.awt.Component getCustomEditor()
Gets the custom editor component.- Specified by:
getCustomEditorin interfacejava.beans.PropertyEditor- Overrides:
getCustomEditorin classjava.beans.PropertyEditorSupport- Returns:
- a value of type 'java.awt.Component'
-
isPaintable
public boolean isPaintable()
Returns true since this editor is paintable.- Specified by:
isPaintablein interfacejava.beans.PropertyEditor- Overrides:
isPaintablein 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:
paintValuein interfacejava.beans.PropertyEditor- Overrides:
paintValuein classjava.beans.PropertyEditorSupport- Parameters:
gfx- the graphics context to usebox- the area we are allowed to paint into
-
-