|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.rapidminer.operator.AbstractIOObject
com.rapidminer.operator.ResultObjectAdapter
public abstract class ResultObjectAdapter
An adapter class for the interface ResultObject. Implements most
methods and can be used if the subclass does not need to extend other
classes. The method toResultString() delivers the return value of
Object.toString(). The visualization components for the graphical user
interface is simply the HTML representation of the result string. If a
subclass also implements Saveable an action for Saving will
automatically be added to the actions list.
| Constructor Summary | |
|---|---|
ResultObjectAdapter()
|
|
| Method Summary | |
|---|---|
protected void |
addAction(javax.swing.Action a)
Adds an action to the list of Java Swing Actions which will shown in the visualization component. |
java.util.List<javax.swing.Action> |
getActions()
Returns a list of all actions which can be performed for this result object. |
java.lang.String |
getName()
The default implementation returns the classname without package. |
javax.swing.Icon |
getResultIcon()
Returns null. |
java.awt.Component |
getVisualizationComponent(IOContainer container)
Returns a editor pane that displays the toResultString() result
encoded as html. |
boolean |
isSavable()
Returns true. |
void |
log(java.lang.String message)
Logs a status message with the correct log service. |
void |
logError(java.lang.String message)
Logs an error message with the correct log service. |
void |
logNote(java.lang.String message)
Logs a note message with the correct log service. |
void |
logWarning(java.lang.String message)
Logs a warning message with the correct log service. |
void |
save(java.io.File file)
Saves the object into the given file by using the AbstractIOObject.write(OutputStream)
method of IOObject (XML format). |
static java.lang.String |
toHTML(java.lang.String string)
Encodes the given String as HTML. |
java.lang.String |
toResultString()
The default implementation simply returns the result of the method Object.toString(). |
| Methods inherited from class com.rapidminer.operator.AbstractIOObject |
|---|
copy, getLog, getSource, initWriting, read, setLoggingHandler, setSource, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.rapidminer.operator.IOObject |
|---|
copy, getLog, getSource, setLoggingHandler, setSource, write |
| Methods inherited from interface com.rapidminer.operator.Saveable |
|---|
getExtension, getFileDescription |
| Constructor Detail |
|---|
public ResultObjectAdapter()
| Method Detail |
|---|
public java.lang.String getName()
getName in interface ResultObjectpublic boolean isSavable()
isSavable in interface Saveable
public void save(java.io.File file)
throws java.io.IOException
AbstractIOObject.write(OutputStream)
method of IOObject (XML format).
save in interface Saveablejava.io.IOExceptionprotected void addAction(javax.swing.Action a)
public java.util.List<javax.swing.Action> getActions()
getActions in interface ResultObjectpublic java.lang.String toResultString()
Object.toString().
toResultString in interface ResultObjectpublic javax.swing.Icon getResultIcon()
getResultIcon in interface ResultObjectpublic java.awt.Component getVisualizationComponent(IOContainer container)
toResultString() result
encoded as html. Please note that the returned pane is already enclosed
by a scroll pane. If you overwrite this method you should again ensure that
the returned component is scrollable. The given container is totally ignored.
getVisualizationComponent in interface ResultObjectpublic static java.lang.String toHTML(java.lang.String string)
public void log(java.lang.String message)
log in interface LoggingHandlerpublic void logNote(java.lang.String message)
logNote in interface LoggingHandlerpublic void logWarning(java.lang.String message)
logWarning in interface LoggingHandlerpublic void logError(java.lang.String message)
logError in interface LoggingHandler
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||