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 defaultRenderer
implementation 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 JComponent
render(Object entity)
CallsObject.toString()
on the specified entity and creates aJTextArea
containing that text.
-
-
-
Method Detail
-
render
public JComponent render(Object entity)
CallsObject.toString()
on the specified entity and creates aJTextArea
containing that text.- Specified by:
render
in interfaceRenderer<Object,JComponent>
- Parameters:
entity
- The evolved entity to render.- Returns:
- A text area containing the string representation of the entity.
-
-