All Packages Class Hierarchy This Package Previous Next Index WEKA's home
Class weka.gui.GenericArrayEditor
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Container
|
+----javax.swing.JComponent
|
+----javax.swing.JPanel
|
+----weka.gui.GenericArrayEditor
- public class GenericArrayEditor
- extends javax.swing.JPanel
- implements java.beans.PropertyEditor
A PropertyEditor for arrays of objects that themselves have
property editors.
- Version:
- $Revision: 1.11 $
- Author:
- Len Trigg (trigg@cs.waikato.ac.nz)
GenericArrayEditor()
- Sets up the array editor.
addPropertyChangeListener(PropertyChangeListener)
- Adds a PropertyChangeListener who will be notified of value changes.
getAsText()
- Returns null as we don't support getting/setting values as text.
getCustomEditor()
- Returns the array editing component.
getJavaInitializationString()
- Supposedly returns an initialization string to create a classifier
identical to the current one, including it's state, but this doesn't
appear possible given that the initialization string isn't supposed to
contain multiple statements.
getTags()
- Returns null as we don't support getting values as tags.
getValue()
- Gets the current object array.
isPaintable()
- Returns true to indicate that we can paint a representation of the
string array
main(String[])
- Tests out the array editor from the command line.
paintValue(Graphics, Rectangle)
- Paints a representation of the current classifier.
removePropertyChangeListener(PropertyChangeListener)
- Removes a PropertyChangeListener.
setAsText(String)
- Returns null as we don't support getting/setting values as text.
setValue(Object)
- Sets the current object array.
supportsCustomEditor()
- Returns true because we do support a custom editor.
GenericArrayEditor
public GenericArrayEditor()
Sets up the array editor.
setValue
public void setValue(java.lang.Object o)
Sets the current object array.
- Parameters:
o
- an object that must be an array.
getValue
public java.lang.Object getValue()
Gets the current object array.
- Returns:
- the current object array
getJavaInitializationString
public java.lang.String getJavaInitializationString()
Supposedly returns an initialization string to create a classifier
identical to the current one, including it's state, but this doesn't
appear possible given that the initialization string isn't supposed to
contain multiple statements.
- Returns:
- the java source code initialisation string
isPaintable
public boolean isPaintable()
Returns true to indicate that we can paint a representation of the
string array
- Returns:
- true
paintValue
public void paintValue(java.awt.Graphics gfx,
java.awt.Rectangle box)
Paints a representation of the current classifier.
- Parameters:
gfx
- the graphics context to use
box
- the area we are allowed to paint into
getAsText
public java.lang.String getAsText()
Returns null as we don't support getting/setting values as text.
- Returns:
- null
setAsText
public void setAsText(java.lang.String text) throws java.lang.IllegalArgumentException
Returns null as we don't support getting/setting values as text.
- Parameters:
text
- the text value
- Throws:
- java.lang.IllegalArgumentException - as we don't support
getting/setting values as text.
getTags
public java.lang.String[] getTags()
Returns null as we don't support getting values as tags.
- Returns:
- null
supportsCustomEditor
public boolean supportsCustomEditor()
Returns true because we do support a custom editor.
- Returns:
- true
getCustomEditor
public java.awt.Component getCustomEditor()
Returns the array editing component.
- Returns:
- a value of type 'java.awt.Component'
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener who will be notified of value changes.
- Parameters:
l
- a value of type 'PropertyChangeListener'
- Overrides:
- addPropertyChangeListener in class javax.swing.JComponent
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener.
- Parameters:
l
- a value of type 'PropertyChangeListener'
- Overrides:
- removePropertyChangeListener in class javax.swing.JComponent
main
public static void main(java.lang.String args[])
Tests out the array editor from the command line.
- Parameters:
args
- ignored
All Packages Class Hierarchy This Package Previous Next Index WEKA's home