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)

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.

Constructor Detail

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

Method Detail

 o setValue
public void setValue(java.lang.Object o)
          Sets the current object array.
Parameters:
o - an object that must be an array.
 o getValue
public java.lang.Object getValue()
          Gets the current object array.
Returns:
the current object array
 o 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
 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(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
 o getAsText
public java.lang.String getAsText()
          Returns null as we don't support getting/setting values as text.
Returns:
null
 o 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.
 o getTags
public java.lang.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 java.awt.Component getCustomEditor()
          Returns the array editing component.
Returns:
a value of type 'java.awt.Component'
 o 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
 o 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
 o 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