edu.umd.cfar.lamp.viper.gui.canvas
Interface ViewableAttribute

All Known Implementing Classes:
BboxNodeWrapper

public interface ViewableAttribute

An interface to a tool to convert from a datatype Object to a PNode.

Author:
davidm

Method Summary
 edu.umd.cs.piccolo.PNode getViewable(java.lang.Object o)
          Gets a piccolo node representing the object, to be laid out on a ViperDataFrameView.
 edu.umd.cs.piccolo.PNode updateViewable(java.lang.Object o, edu.umd.cs.piccolo.PNode old)
          In order to avoid unnecessary object creation, this method takes an old PNode that was returned with either getViewable or this method and returns a reference to it, updating the internals at the time.
 

Method Detail

getViewable

public edu.umd.cs.piccolo.PNode getViewable(java.lang.Object o)
Gets a piccolo node representing the object, to be laid out on a ViperDataFrameView.

Parameters:
o -
Returns:
PNode

updateViewable

public edu.umd.cs.piccolo.PNode updateViewable(java.lang.Object o,
                                               edu.umd.cs.piccolo.PNode old)
In order to avoid unnecessary object creation, this method takes an old PNode that was returned with either getViewable or this method and returns a reference to it, updating the internals at the time. Note that, like toArray, the return reference is only to the same location as the old value if it is more convenient and efficient than creating a new object.

Parameters:
o - The current value of the attribute.
old - The old view node.
Returns:
PNode A new view node.