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 JPanel
- implements PropertyEditor
A PropertyEditor for arrays of objects that themselves have
property editors.
- Version:
- $Revision: 1.6 $
- 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(Object o)
- Sets the current object array.
- Parameters:
- o - an object that must be an array.
getValue
public Object getValue()
- Gets the current object array.
- Returns:
- the current object array
getJavaInitializationString
public 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(Graphics gfx,
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 String getAsText()
- Returns null as we don't support getting/setting values as text.
- Returns:
- null
setAsText
public void setAsText(String text) throws IllegalArgumentException
- Returns null as we don't support getting/setting values as text.
- Parameters:
- text - the text value
- Throws: IllegalArgumentException
- as we don't support
getting/setting values as text.
getTags
public 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 Component getCustomEditor()
- Returns the array editing component.
- Returns:
- a value of type 'java.awt.Component'
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener l)
- Adds a PropertyChangeListener who will be notified of value changes.
- Parameters:
- l - a value of type 'PropertyChangeListener'
- Overrides:
- addPropertyChangeListener in class JComponent
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener l)
- Removes a PropertyChangeListener.
- Parameters:
- l - a value of type 'PropertyChangeListener'
- Overrides:
- removePropertyChangeListener in class JComponent
main
public static void main(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