// (c): Tuomas J. Lukka package gzz.view.buoy; import gzz.view.*; import gzz.media.*; import gzz.vob.*; import gzz.*; /** Make links between cells that transclude from scrollblocks and * views of the scrollblocks. *

* The links are made to the first span of the enfilade of the cell * in the scrollblock. */ public abstract class ScrollblockCellLinker implements CellBuoyViewLinker { BuoyViewNodeType pageSpanNodeType; void doLinks(Cell c, VobScene vs, int cs, BuoyViewNodeType cellNodeType, BuoyLinkListener l) { Enfilade1D enf = c.space.getCellTexter().getEnfilade(c); List l = enf.getList(); Set done = new HashSet(); for(Iterator i = l.iterator(); i.hasNext(); ) { Span s = (Span)i.next(); ScrollBlock sb = s.getScrollBlock(); if(done.contains(sb)) continue; done.add(sb); if(s instanceof PageSpan) { sb.getCurrent(); l.link(1, cs, pageSpanNodeType, new Pair(c, sb), s); } } } // XXX Reverse links! Scrollblock to }