vitro
Class DataView

java.lang.Object
  extended by vitro.DataView

public class DataView
extends Object

DataView contains the backing logic for rendering data structures used by DataAnnotation- it can also be used within your own Views and debugging tools.


Constructor Summary
DataView(Object o, ColorScheme colorScheme)
          Construct a DataView for a given set of data structures, honoring specific ColorScheme.
 
Method Summary
 void draw(Graphics g)
          Draw the DataView to the origin of a Graphics surface.
 int height()
          The height of the DataView, in pixels.
 int width()
          The width of the DataView, in pixels.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataView

public DataView(Object o,
                ColorScheme colorScheme)
Construct a DataView for a given set of data structures, honoring specific ColorScheme. Note that if the underlying data structure changes, the DataView will not update its layout or spacing. This system works best with immutable data structures or "snapshot" copies.

Parameters:
o - the data structure to visualize.
colorScheme - the ColorScheme to use during drawing.
Method Detail

draw

public void draw(Graphics g)
Draw the DataView to the origin of a Graphics surface.

Parameters:
g - the destination Graphics surface.

width

public int width()
The width of the DataView, in pixels.

Returns:
the width of the view.

height

public int height()
The height of the DataView, in pixels.

Returns:
the height of the view.