gzz.view.buoy
Interface CellBuoyViewNodeType

gzz.view.buoy.BuoyViewNodeType gzz.view.buoy.BuoyViewMainNode gzz.view.buoy.BuoyLinkListener gzz.view.buoy.BuoyAdaptor BuoyAdaptor.LinkAdaptor gzz.view.CellPlacementHook gzz.view.buoy.CellBuoyViewNodeType gzz.view.buoy.CellBuoyViewLinker ../../../../pegboard/buoydesign--tjl/peg.gen.html#SemiPluggableBuoys SemiPluggableBuoys_small
public interface CellBuoyViewNodeType

An interface representing a single node type of the buoy view, based on cells. This is a convenient interface for plugging in Cell-based nodes into a BuoyAdapter.


Method Summary
 BuoyViewMainNode createMainNode(Cell c, java.lang.Object content, CellPlacementHook hook)
           
 java.lang.Object getSize(Cell c, java.lang.Object content, float[] wh)
          Get the ideal size for this buoy.
 boolean ownsCell(Cell c)
          True if this view "owns" a certain cell.
 int renderBuoy(VobScene vs, int into, Cell c, java.lang.Object content, java.lang.Object cachedSize)
          Render this view centered on a given cell.
 

Method Detail

ownsCell

public boolean ownsCell(Cell c)
True if this view "owns" a certain cell.


getSize

public java.lang.Object getSize(Cell c,
                                java.lang.Object content,
                                float[] wh)
Get the ideal size for this buoy.

Returns:
An object that, if passed to renderBuoy, may help performance a little.

renderBuoy

public int renderBuoy(VobScene vs,
                      int into,
                      Cell c,
                      java.lang.Object content,
                      java.lang.Object cachedSize)
Render this view centered on a given cell. Since this is delegated from BuoyViewNodeType.renderBuoy, the same rules apply.

Parameters:
content - If not null, an object describing the part of content that the view should be centered on. Can be ignored.
Returns:
The coordinate system of the anchor
See Also:
BuoyViewNodeType.renderBuoy(gzz.vob.VobScene, int, java.lang.Object, java.lang.Object, java.lang.Object)

createMainNode

public BuoyViewMainNode createMainNode(Cell c,
                                       java.lang.Object content,
                                       CellPlacementHook hook)