Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)

org.uncommons.watchmaker.swing
Class ObjectSwingRenderer

java.lang.Object
  extended by org.uncommons.watchmaker.swing.ObjectSwingRenderer
All Implemented Interfaces:
Renderer<Object,JComponent>

public class ObjectSwingRenderer
extends Object
implements Renderer<Object,JComponent>

A default Renderer implementation that can display any object as a Swing component. It simply converts the object into its String representation (via the Object.toString() method) and shows that in a text area.

Author:
Daniel Dyer

Constructor Summary
ObjectSwingRenderer()
           
 
Method Summary
 JComponent render(Object entity)
          Calls Object.toString() on the specified entity and creates a JTextArea containing that text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectSwingRenderer

public ObjectSwingRenderer()
Method Detail

render

public JComponent render(Object entity)
Calls Object.toString() on the specified entity and creates a JTextArea containing that text.

Specified by:
render in interface Renderer<Object,JComponent>
Parameters:
entity - The evolved entity to render.
Returns:
A text area containing the string representation of the entity.

Watchmaker Framework for Evolutionary Computation API
(Version 0.7.1)