All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.gui.CostMatrixEditor

java.lang.Object
   |
   +----weka.gui.CostMatrixEditor

public class CostMatrixEditor
extends Object
implements PropertyEditor
A PropertyEditor for CostMatrices. Allows editing of individual elements of the cost matrix, as well as simple operations like loading, saving.

Version:
$Revision: 1.1 $
Author:
Len Trigg (len@intelligenesis.net)

Variable Index

 o COST_EXTENSION
The filename extension for cost files

Constructor Index

 o CostMatrixEditor()

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.

Variables

 o COST_EXTENSION
 public static String COST_EXTENSION
The filename extension for cost files

Constructors

 o CostMatrixEditor
 public CostMatrixEditor()

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'
 o removePropertyChangeListener
 public void removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener.

Parameters:
l - a value of type 'PropertyChangeListener'
 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