程序包 weka.gui
类 CostMatrixEditor
java.lang.Object
weka.gui.CostMatrixEditor
- 所有已实现的接口:
PropertyEditor
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.
- 版本:
- $Revision: 7059 $
- 作者:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
Adds an object to the list of those that wish to be informed when the cost matrix changes.Some objects can be represented as text, but a cost matrix cannot.Gets a GUI component with which the user can edit the cost matrix.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.getValue()
Gets the cost matrix that is being edited.boolean
Indicates whether the object can be represented graphically.void
paintValue
(Graphics gfx, Rectangle box) Paints a graphical representation of the object.void
Removes an object from the list of those that wish to be informed when the cost matrix changes.void
Some objects can be represented as text, but a cost matrix cannot.void
Sets the value of the CostMatrix to be edited.boolean
Indicates whether the cost matrix can be edited in a GUI, which it can.
-
构造器详细资料
-
CostMatrixEditor
public CostMatrixEditor()Constructs a new CostMatrixEditor.
-
-
方法详细资料
-
setValue
Sets the value of the CostMatrix to be edited.- 指定者:
setValue
在接口中PropertyEditor
- 参数:
value
- a CostMatrix object to be edited
-
getValue
Gets the cost matrix that is being edited.- 指定者:
getValue
在接口中PropertyEditor
- 返回:
- the edited CostMatrix object
-
isPaintable
public boolean isPaintable()Indicates whether the object can be represented graphically. In this case it can.- 指定者:
isPaintable
在接口中PropertyEditor
- 返回:
- true
-
paintValue
Paints a graphical representation of the object. For the cost matrix it prints out the text "X x X matrix", where X is the size of the matrix.- 指定者:
paintValue
在接口中PropertyEditor
- 参数:
gfx
- the graphics context to draw the representation tobox
- the bounds within which the representation should fit.
-
getJavaInitializationString
Returns the Java code that generates an object the same as the one being edited. Unfortunately this can't be done in a single line of code, so the code returned will only build a default cost matrix of the same size.- 指定者:
getJavaInitializationString
在接口中PropertyEditor
- 返回:
- the initialization string
-
getAsText
Some objects can be represented as text, but a cost matrix cannot.- 指定者:
getAsText
在接口中PropertyEditor
- 返回:
- null
-
setAsText
Some objects can be represented as text, but a cost matrix cannot.- 指定者:
setAsText
在接口中PropertyEditor
- 参数:
text
- ignored- 抛出:
IllegalArgumentException
- always throws an IllegalArgumentException
-
getTags
Some objects can return tags, but a cost matrix cannot.- 指定者:
getTags
在接口中PropertyEditor
- 返回:
- null
-
getCustomEditor
Gets a GUI component with which the user can edit the cost matrix.- 指定者:
getCustomEditor
在接口中PropertyEditor
- 返回:
- an editor GUI component
-
supportsCustomEditor
public boolean supportsCustomEditor()Indicates whether the cost matrix can be edited in a GUI, which it can.- 指定者:
supportsCustomEditor
在接口中PropertyEditor
- 返回:
- true
-
addPropertyChangeListener
Adds an object to the list of those that wish to be informed when the cost matrix changes.- 指定者:
addPropertyChangeListener
在接口中PropertyEditor
- 参数:
listener
- a new listener to add to the list
-
removePropertyChangeListener
Removes an object from the list of those that wish to be informed when the cost matrix changes.- 指定者:
removePropertyChangeListener
在接口中PropertyEditor
- 参数:
listener
- the listener to remove from the list
-