|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weka.gui.CostMatrixEditor
Class for editing CostMatrix objects. Brings up a custom editing panel with which the user can edit the matrix interactively, as well as save load cost matrices from files.
Constructor Summary | |
CostMatrixEditor()
Constructs a new CostMatrixEditor. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds an object to the list of those that wish to be informed when the cost matrix changes. |
java.lang.String |
getAsText()
Some objects can be represented as text, but a cost matrix cannot. |
java.awt.Component |
getCustomEditor()
Gets a GUI component with which the user can edit the cost matrix. |
java.lang.String |
getJavaInitializationString()
Returns the Java code that generates an object the same as the one being edited. |
java.lang.String[] |
getTags()
Some objects can return tags, but a cost matrix cannot. |
java.lang.Object |
getValue()
Gets the cost matrix that is being edited. |
boolean |
isPaintable()
Indicates whether the object can be represented graphically. |
void |
paintValue(java.awt.Graphics gfx,
java.awt.Rectangle box)
Paints a graphical representation of the object. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes an object from the list of those that wish to be informed when the cost matrix changes. |
void |
setAsText(java.lang.String text)
Some objects can be represented as text, but a cost matrix cannot. |
void |
setValue(java.lang.Object value)
Sets the value of the CostMatrix to be edited. |
boolean |
supportsCustomEditor()
Indicates whether the cost matrix can be edited in a GUI, which it can. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CostMatrixEditor()
Method Detail |
public void setValue(java.lang.Object value)
setValue
in interface java.beans.PropertyEditor
value
- a CostMatrix object to be editedpublic java.lang.Object getValue()
getValue
in interface java.beans.PropertyEditor
public boolean isPaintable()
isPaintable
in interface java.beans.PropertyEditor
public void paintValue(java.awt.Graphics gfx, java.awt.Rectangle box)
paintValue
in interface java.beans.PropertyEditor
gfx
- the graphics context to draw the representation tobox
- the bounds within which the representation should fit.public java.lang.String getJavaInitializationString()
getJavaInitializationString
in interface java.beans.PropertyEditor
public java.lang.String getAsText()
getAsText
in interface java.beans.PropertyEditor
public void setAsText(java.lang.String text)
setAsText
in interface java.beans.PropertyEditor
text
- ignored
always
- throws an IllegalArgumentExceptionpublic java.lang.String[] getTags()
getTags
in interface java.beans.PropertyEditor
public java.awt.Component getCustomEditor()
getCustomEditor
in interface java.beans.PropertyEditor
public boolean supportsCustomEditor()
supportsCustomEditor
in interface java.beans.PropertyEditor
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface java.beans.PropertyEditor
listener
- a new listener to add to the listpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface java.beans.PropertyEditor
listener
- the listener to remove from the list
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2003 David Lindsay, Computer Learning Research Centre, Dept. Computer Science, Royal Holloway, University of London