public static class BlocksWorldVisualizer.BlockPainter extends java.lang.Object implements ObjectPainter
| Constructor and Description | 
|---|
BlockPainter()  | 
BlockPainter(int fontSize)
Initializes with a font size for rendering the name of the block object. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected int | 
getHeight(OOState s,
         BlocksWorldBlock ob)  | 
protected java.lang.String | 
getStackBottom(OOState s,
              BlocksWorldBlock ob)  | 
void | 
paintObject(java.awt.Graphics2D g2,
           OOState s,
           ObjectInstance ob,
           float cWidth,
           float cHeight)
Paints object instance ob to graphics context g2 
 | 
public BlockPainter()
public BlockPainter(int fontSize)
fontSize - a font size for rendering the name of the block object.public void paintObject(java.awt.Graphics2D g2,
                        OOState s,
                        ObjectInstance ob,
                        float cWidth,
                        float cHeight)
ObjectPainterpaintObject in interface ObjectPainterg2 - graphics context to which the object should be painteds - the state of the object to be paintedob - the instantiated object to be paintedcWidth - width of the canvas sizecHeight - height of the canvas sizeprotected java.lang.String getStackBottom(OOState s, BlocksWorldBlock ob)
protected int getHeight(OOState s, BlocksWorldBlock ob)