|
|||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||||
java.lang.Objectweka.gui.EnsembleLibraryEditor
public class EnsembleLibraryEditor
Class for editing Library objects. Brings up a custom editing panel for the user to edit the library model list, as well as save load libraries from files.
A model list file is simply a flat file with a single classifier on each line. Each of these classifier is represented by the command line string that would be used to create that specific model with the specified set of paramters. This code in class is based on other custom editors in weka.gui such as the CostMatrixEditor to try and maintain some consistency throughout the package.
| Constructor Summary | |
|---|---|
EnsembleLibraryEditor()
Constructs a new LibraryEditor. |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds an object to the list of those that wish to be informed when the library changes. |
static java.awt.Component |
createGenericObjectRenderer(GenericObjectEditor classifierEditor)
This is a helper function that creates a renderer for GenericObjects |
java.lang.String |
getAsText()
Some objects can be represented as text, but a library cannot. |
java.awt.Component |
getCustomEditor()
Gets a GUI component with which the user can edit the cost matrix. |
static java.awt.Component |
getDefaultRenderer(java.beans.PropertyEditor nodeEditor)
This is a helper function that creates a renderer for Default Objects. |
static java.lang.Object |
getEditorValue(java.lang.Object source)
This method handles the different object editor types in weka to obtain their current values. |
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. |
static void |
main(java.lang.String[] args)
This is a simple main method that lets you run a LibraryEditor on its own without having to deal with the Explorer, etc... |
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 library cannot. |
void |
setValue(java.lang.Object value)
Sets the value of the Library to be edited. |
boolean |
supportsCustomEditor()
Indicates whether the library 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 EnsembleLibraryEditor()
| Method Detail |
|---|
public void setValue(java.lang.Object value)
setValue in interface java.beans.PropertyEditorvalue - a Library object to be editedpublic java.lang.Object getValue()
getValue in interface java.beans.PropertyEditorpublic boolean isPaintable()
isPaintable in interface java.beans.PropertyEditor
public void paintValue(java.awt.Graphics gfx,
java.awt.Rectangle box)
paintValue in interface java.beans.PropertyEditorgfx - 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.PropertyEditorpublic java.lang.String getAsText()
getAsText in interface java.beans.PropertyEditorpublic void setAsText(java.lang.String text)
setAsText in interface java.beans.PropertyEditortext - ignored
always - throws an IllegalArgumentExceptionpublic java.lang.String[] getTags()
getTags in interface java.beans.PropertyEditorpublic java.awt.Component getCustomEditor()
getCustomEditor in interface java.beans.PropertyEditorpublic boolean supportsCustomEditor()
supportsCustomEditor in interface java.beans.PropertyEditorpublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener in interface java.beans.PropertyEditorlistener - a new listener to add to the listpublic void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener in interface java.beans.PropertyEditorlistener - the listener to remove from the listpublic static java.lang.Object getEditorValue(java.lang.Object source)
source - an Editor
public static java.awt.Component getDefaultRenderer(java.beans.PropertyEditor nodeEditor)
nodeEditor - the editor created for the defaultNode
public static java.awt.Component createGenericObjectRenderer(GenericObjectEditor classifierEditor)
classifierEditor - the editor created for this
public static void main(java.lang.String[] args)
args - the commandline arguments
|
|||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||||