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 PropertyEditor
value
- a CostMatrix object to be editedpublic Object getValue()
getValue
in interface PropertyEditor
public boolean isPaintable()
isPaintable
in interface PropertyEditor
public void paintValue(Graphics gfx, Rectangle box)
paintValue
in interface PropertyEditor
gfx
- the graphics context to draw the representation tobox
- the bounds within which the representation should fit.public String getJavaInitializationString()
getJavaInitializationString
in interface PropertyEditor
public String getAsText()
getAsText
in interface PropertyEditor
public void setAsText(String text)
setAsText
in interface PropertyEditor
text
- ignoredIllegalArgumentException
- always throws an IllegalArgumentExceptionpublic String[] getTags()
getTags
in interface PropertyEditor
public Component getCustomEditor()
getCustomEditor
in interface PropertyEditor
public boolean supportsCustomEditor()
supportsCustomEditor
in interface PropertyEditor
public void addPropertyChangeListener(PropertyChangeListener listener)
addPropertyChangeListener
in interface PropertyEditor
listener
- a new listener to add to the listpublic void removePropertyChangeListener(PropertyChangeListener listener)
removePropertyChangeListener
in interface PropertyEditor
listener
- the listener to remove from the listCopyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.