Package org.uncommons.watchmaker.swing
Class ObjectSwingRenderer
- java.lang.Object
-
- org.uncommons.watchmaker.swing.ObjectSwingRenderer
-
- All Implemented Interfaces:
Renderer<Object,JComponent>
public class ObjectSwingRenderer extends Object implements Renderer<Object,JComponent>
A defaultRendererimplementation that can display any object as a Swing component. It simply converts the object into its String representation (via theObject.toString()method) and shows that in a text area.
-
-
Constructor Summary
Constructors Constructor Description ObjectSwingRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JComponentrender(Object entity)CallsObject.toString()on the specified entity and creates aJTextAreacontaining that text.
-
-
-
Method Detail
-
render
public JComponent render(Object entity)
CallsObject.toString()on the specified entity and creates aJTextAreacontaining that text.- Specified by:
renderin interfaceRenderer<Object,JComponent>- Parameters:
entity- The evolved entity to render.- Returns:
- A text area containing the string representation of the entity.
-
-