public class CostMatrixEditor extends Object implements PropertyEditor
| Constructor and Description |
|---|
CostMatrixEditor()
Constructs a new CostMatrixEditor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds an object to the list of those that wish to be informed when the
cost matrix changes.
|
String |
getAsText()
Some objects can be represented as text, but a cost matrix cannot.
|
Component |
getCustomEditor()
Gets a GUI component with which the user can edit the cost matrix.
|
String |
getJavaInitializationString()
Returns the Java code that generates an object the same as the one being edited.
|
String[] |
getTags()
Some objects can return tags, but a cost matrix cannot.
|
Object |
getValue()
Gets the cost matrix that is being edited.
|
boolean |
isPaintable()
Indicates whether the object can be represented graphically.
|
void |
paintValue(Graphics gfx,
Rectangle box)
Paints a graphical representation of the object.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes an object from the list of those that wish to be informed when the
cost matrix changes.
|
void |
setAsText(String text)
Some objects can be represented as text, but a cost matrix cannot.
|
void |
setValue(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.
|
public void setValue(Object value)
setValue in interface PropertyEditorvalue - a CostMatrix object to be editedpublic Object getValue()
getValue in interface PropertyEditorpublic boolean isPaintable()
isPaintable in interface PropertyEditorpublic void paintValue(Graphics gfx, Rectangle box)
paintValue in interface PropertyEditorgfx - the graphics context to draw the representation tobox - the bounds within which the representation should fit.public String getJavaInitializationString()
getJavaInitializationString in interface PropertyEditorpublic String getAsText()
getAsText in interface PropertyEditorpublic void setAsText(String text)
setAsText in interface PropertyEditortext - ignoredIllegalArgumentException - always throws an IllegalArgumentExceptionpublic String[] getTags()
getTags in interface PropertyEditorpublic Component getCustomEditor()
getCustomEditor in interface PropertyEditorpublic boolean supportsCustomEditor()
supportsCustomEditor in interface PropertyEditorpublic void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener in interface PropertyEditorlistener - a new listener to add to the listpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener in interface PropertyEditorlistener - the listener to remove from the listCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.