gzz.view.buoy
Class BuoyAdaptor

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
java.lang.Object
  |
  +--gzz.view.buoy.BuoyAdaptor
All Implemented Interfaces:
BuoyViewNodeType

public class BuoyAdaptor
extends java.lang.Object
implements BuoyViewNodeType

A class that allows different cell-based views to be connected easily to a buoy view, separating the viewing and linking.


Field Summary
 CellBuoyViewLinker[] cellLinkers
          The cell-to-X link types used by the current instance.
 CellBuoyViewNodeType[] cellNodes
          The cell node types used by the current instance.
static boolean dbg
           
 
Constructor Summary
BuoyAdaptor()
           
 
Method Summary
 BuoyViewMainNode createMainNode(java.lang.Object linkId, java.lang.Object anchor, BuoyLinkListener l)
          Focus was set to the buoy -- create an object that knows the user interface and motion in that space.
 java.lang.Object getSize(java.lang.Object linkId, java.lang.Object anchor, float[] wh)
          Get the ideal size for this buoy.
 int renderBuoy(VobScene vs, int into, java.lang.Object linkId, java.lang.Object anchor, java.lang.Object cachedSize)
          Render portion of the view relevant to linkId and anchor into the given box.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbg

public static boolean dbg

cellNodes

public CellBuoyViewNodeType[] cellNodes
The cell node types used by the current instance.


cellLinkers

public CellBuoyViewLinker[] cellLinkers
The cell-to-X link types used by the current instance.

Constructor Detail

BuoyAdaptor

public BuoyAdaptor()
Method Detail

getSize

public java.lang.Object getSize(java.lang.Object linkId,
                                java.lang.Object anchor,
                                float[] wh)
Description copied from interface: BuoyViewNodeType
Get the ideal size for this buoy.

Specified by:
getSize in interface BuoyViewNodeType
Returns:
An object that, if passed to renderBuoy, may help performance a little.

renderBuoy

public int renderBuoy(VobScene vs,
                      int into,
                      java.lang.Object linkId,
                      java.lang.Object anchor,
                      java.lang.Object cachedSize)
Description copied from interface: BuoyViewNodeType
Render portion of the view relevant to linkId and anchor into the given box. This should not have any side effects, beyond e.g. beginning to load images. The box should be filled completely because it will be used for sensing mouse clicks to this buoy (XXX kludge! Will change later)

Specified by:
renderBuoy in interface BuoyViewNodeType
Returns:
The coordinate system of the anchor

createMainNode

public BuoyViewMainNode createMainNode(java.lang.Object linkId,
                                       java.lang.Object anchor,
                                       BuoyLinkListener l)
Description copied from interface: BuoyViewNodeType
Focus was set to the buoy -- create an object that knows the user interface and motion in that space. The object will use the given BuoyLinkListener to call back when it is rendered and there are buoys that should be rendered.

Specified by:
createMainNode in interface BuoyViewNodeType