Package weka.gui
Class MOAClassOptionEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- weka.gui.MOAClassOptionEditor
-
- All Implemented Interfaces:
PropertyEditor
public class MOAClassOptionEditor extends PropertyEditorSupport
An editor for MOA ClassOption objects.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
ClassOption
-
-
Field Summary
Fields Modifier and Type Field Description protected Component
m_CustomEditor
the custom editor.protected ClassOptionEditComponent
m_EditComponent
the component for editing.
-
Constructor Summary
Constructors Constructor Description MOAClassOptionEditor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeDialog()
Closes the dialog.protected Component
createCustomEditor()
Creates the custom editor.Component
getCustomEditor()
Gets the custom editor component.JComponent
getEditComponent(Option option)
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, getJavaInitializationString, getSource, getTags, getValue, removePropertyChangeListener, setAsText, setSource, setValue
-
-
-
-
Field Detail
-
m_CustomEditor
protected Component m_CustomEditor
the custom editor.
-
m_EditComponent
protected ClassOptionEditComponent m_EditComponent
the component for editing.
-
-
Method Detail
-
isPaintable
public boolean isPaintable()
Returns true since this editor is paintable.- Specified by:
isPaintable
in interfacePropertyEditor
- Overrides:
isPaintable
in classPropertyEditorSupport
- Returns:
- always true.
-
supportsCustomEditor
public boolean supportsCustomEditor()
Returns true because we do support a custom editor.- Specified by:
supportsCustomEditor
in interfacePropertyEditor
- Overrides:
supportsCustomEditor
in classPropertyEditorSupport
- Returns:
- always true
-
closeDialog
protected void closeDialog()
Closes the dialog.
-
createCustomEditor
protected Component createCustomEditor()
Creates the custom editor.- Returns:
- the editor
-
getEditComponent
public JComponent getEditComponent(Option option)
-
getCustomEditor
public Component getCustomEditor()
Gets the custom editor component.- Specified by:
getCustomEditor
in interfacePropertyEditor
- Overrides:
getCustomEditor
in classPropertyEditorSupport
- Returns:
- the editor
-
paintValue
public void paintValue(Graphics gfx, Rectangle box)
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
-
-