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)

Constructor Index

 o GenericArrayEditor()
Sets up the array editor.

Method Index

 o addPropertyChangeListener(PropertyChangeListener)
Adds a PropertyChangeListener who will be notified of value changes.
 o getAsText()
Returns null as we don't support getting/setting values as text.
 o getCustomEditor()
Returns the array editing component.
 o 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.
 o getTags()
Returns null as we don't support getting values as tags.
 o getValue()
Gets the current object array.
 o isPaintable()
Returns true to indicate that we can paint a representation of the string array
 o main(String[])
Tests out the array editor from the command line.
 o paintValue(Graphics, Rectangle)
Paints a representation of the current classifier.
 o removePropertyChangeListener(PropertyChangeListener)
Removes a PropertyChangeListener.
 o setAsText(String)
Returns null as we don't support getting/setting values as text.
 o setValue(Object)
Sets the current object array.
 o supportsCustomEditor()
Returns true because we do support a custom editor.

Constructors

 o GenericArrayEditor
 public GenericArrayEditor()
Sets up the array editor.

Methods

 o setValue
 public void setValue(Object o)
Sets the current object array.

Parameters:
o - an object that must be an array.
 o getValue
 public Object getValue()
Gets the current object array.

Returns:
the current object array
 o 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
 o isPaintable
 public boolean isPaintable()
Returns true to indicate that we can paint a representation of the string array

Returns:
true
 o 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
 o getAsText
 public String getAsText()
Returns null as we don't support getting/setting values as text.

Returns:
null
 o 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.
 o getTags
 public String[] getTags()
Returns null as we don't support getting values as tags.

Returns:
null
 o supportsCustomEditor
 public boolean supportsCustomEditor()
Returns true because we do support a custom editor.

Returns:
true
 o getCustomEditor
 public Component getCustomEditor()
Returns the array editing component.

Returns:
a value of type 'java.awt.Component'
 o 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
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener.

Parameters:
l - a value of type 'PropertyChangeListener'
Overrides:
removePropertyChangeListener in class JComponent
 o 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