272 |
and use cellviews so they can be handled by the same linking managers, |
and use cellviews so they can be handled by the same linking managers, |
273 |
but the scrollblocks cannot. |
but the scrollblocks cannot. |
274 |
|
|
275 |
|
The following diagram shows the current arrangement, where |
276 |
|
the pluggability is handled through the interfaces |
277 |
|
CellBuoyViewNodeType (where the concrete cbvnodetypes |
278 |
|
create their respective mainnodes) and CellBuoyViewLinker. |
279 |
|
|
280 |
.. UML:: SemiPluggableBuoys |
.. UML:: SemiPluggableBuoys |
281 |
|
|
282 |
jlinkpackage gzz.view.buoy |
jlinkpackage gzz.view.buoy |
284 |
class BuoyViewNodeType "interface" |
class BuoyViewNodeType "interface" |
285 |
jlink |
jlink |
286 |
|
|
287 |
|
class BuoyViewMainNode "interface" |
288 |
|
jlink |
289 |
|
|
290 |
|
class BuoyLinkListener "interface" |
291 |
|
jlink |
292 |
|
|
293 |
class BuoyAdaptor |
class BuoyAdaptor |
294 |
|
jlink |
295 |
inherit BuoyViewNodeType |
inherit BuoyViewNodeType |
296 |
assoc multi(*) - multi(*) CellBuoyViewNodeType |
assoc multi(*) - multi(*) CellBuoyViewNodeType |
297 |
|
|
298 |
class BuoyAdaptor.LinkAdaptor |
class BuoyAdaptor.LinkAdaptor |
299 |
|
jlink |
300 |
inherit gzz.view.CellPlacementHook |
inherit gzz.view.CellPlacementHook |
301 |
assoc multi(*) - multi(1) BuoyAdaptor |
assoc multi(*) - multi(1) BuoyAdaptor |
302 |
assoc multi(*) - multi(1) BuoyLinkListener |
assoc multi(*) - multi(1) BuoyLinkListener |
305 |
jlink |
jlink |
306 |
|
|
307 |
class CellBuoyViewNodeType "interface" |
class CellBuoyViewNodeType "interface" |
308 |
|
jlink |
309 |
methods |
methods |
310 |
boolean ownsCell(Cell c) |
boolean ownsCell(Cell c) |
311 |
void renderBuoy(VobScene vs, int into, Cell c, Object content) |
void renderBuoy(VobScene vs, int into, Cell c) |
312 |
BuoyViewMainNode createMainNode(Cell c, Object content, CellPlacementHook hook) |
BuoyViewMainNode createMainNode(Cell c, CellPlacementHook hook) |
313 |
|
|
314 |
class BuoyViewMainNode "interface" |
class CellBuoyViewLinker "interface" |
315 |
|
jlink |
316 |
|
methods |
317 |
|
void doLinks(Cell c, VobScene vs, int cs, |
318 |
|
BuoyViewNodeType cellNodeType, |
319 |
|
BuoyLinkListener l); |
320 |
|
|
|
class BuoyLinkListener "interface" |
|
321 |
|
|
|
class PPCanvasNode |
|
|
inherit CellBuoyViewNodeType |
|
322 |
|
|
323 |
class PPCanvasCursor |
class ConcreteNodeType "pseudo" |
324 |
fields |
inherit CellBuoyViewNodeType |
325 |
float x, y |
class ConcreteMainNode "pseudo" |
|
float zoom |
|
326 |
inherit BuoyViewMainNode |
inherit BuoyViewMainNode |
|
assoc - multi(1) gzz.view.CellPlacementHook |
|
327 |
|
|
|
dep "create" PPCanvasNode PPCanvasCursor |
|
328 |
|
|
329 |
--- |
dep "call" ConcreteMainNode gzz.view.CellPlacementHook |
330 |
|
dep "call" BuoyAdaptor.LinkAdaptor CellBuoyViewLinker |
331 |
|
dep "call" CellBuoyViewLinker BuoyLinkListener |
332 |
|
|
333 |
gzz.view.CellPlacementHook.c = (-200,0); |
dep "create" ConcreteNodeType ConcreteMainNode |
334 |
|
|
335 |
|
--- |
336 |
vertically(150, gazz, BuoyViewNodeType, BuoyViewMainNode, BuoyLinkListener); |
vertically(150, gazz, BuoyViewNodeType, BuoyViewMainNode, BuoyLinkListener); |
337 |
|
vertically(60, foo, BuoyAdaptor, BuoyAdaptor.LinkAdaptor, gzz.view.CellPlacementHook); |
338 |
|
vertically(300, cbv, CellBuoyViewNodeType, CellBuoyViewLinker); |
339 |
|
vertically(60, conc, ConcreteNodeType, ConcreteMainNode); |
340 |
|
|
341 |
vertically(30, foo, BuoyAdaptor, BuoyAdaptor.LinkAdaptor, gzz.view.CellPlacementHook); |
horizontally(20, groo, gazz, foo, cbv, conc); |
342 |
horizontally(80, faz, BuoyViewNodeType, BuoyAdaptor, CellBuoyViewNodeType); |
|
343 |
vertically(80, bar, CellBuoyViewNodeType, PPCanvasNode, PPCanvasCursor); |
BuoyAdaptor.c = (0,0); |
344 |
|
|
345 |
|
|
346 |
There are two different types of links that this part of the systme |
There are two different types of links that this part of the systme |
347 |
needs to know: Cell to Cell and Cell to PermaScroll. |
needs to know: Cell to Cell and Cell to PermaScroll. |
348 |
|
... |
349 |
|
|
350 |
|
In the next diagram, the classes that implement the pagespan nodes |
351 |
|
and their associations to the rest of the system are shown. |
352 |
|
The cellNodeType BuoyViewNodeType is the node type that is to be used |
353 |
|
for xanalogical links to cells. |
354 |
|
|
355 |
|
.. UML:: ConcreteSemiPluggables |
356 |
|
|
357 |
|
jlinkpackage gzz.view.buoy |
358 |
|
|
359 |
|
class CellBuoyViewLinker "interface" |
360 |
|
jlink |
361 |
|
class BuoyViewNodeType "interface" |
362 |
|
jlink |
363 |
|
class BuoyViewMainNode "interface" |
364 |
|
jlink |
365 |
|
|
366 |
|
class ScrollblockCellLinker |
367 |
|
jlink |
368 |
|
inherit CellBuoyViewLinker |
369 |
|
assoc - multi(1) role(transclusionNodeType) WholePageSpanNodeType |
370 |
|
assoc - multi(1) role(xulinkNodeType) AnchorPageSpanNodeType |
371 |
|
assoc - multi(1) role(cellNodeType) BuoyViewNodeType |
372 |
|
|
373 |
|
class AbstractPageSpanNodeType "pyClass" |
374 |
|
inherit BuoyViewNodeType |
375 |
|
methods |
376 |
|
createMainNode(linkId, anchorSpan, listener) |
377 |
|
|
378 |
|
class WholePageSpanNodeType "pyClass" |
379 |
|
inherit AbstractPageSpanNodeType |
380 |
|
class AnchorPageSpanNodeType "pyClass" |
381 |
|
inherit AbstractPageSpanNodeType |
382 |
|
class PageSpanMainNode "pyClass" |
383 |
|
inherit BuoyViewMainNode |
384 |
|
|
385 |
|
dep "create" AbstractPageSpanNodeType PageSpanMainNode |
386 |
|
|
387 |
|
--- |
388 |
|
horizontally(80, inters, CellBuoyViewLinker, |
389 |
|
BuoyViewNodeType, BuoyViewMainNode); |
390 |
|
|
391 |
|
horizontally(220, pspnt, WholePageSpanNodeType, AnchorPageSpanNodeType); |
392 |
|
|
393 |
|
vertically(30, pspstuff, AbstractPageSpanNodeType, pspnt, PageSpanMainNode); |
394 |
|
|
395 |
|
vertically(100, topi, inters, ScrollblockCellLinker); |
396 |
|
|
397 |
|
AbstractPageSpanNodeType.c = ScrollblockCellLinker.c + (50, -100); |
398 |
|
|
399 |
|
|
400 |
|
|
401 |
|
Foo:: |
402 |
|
|
403 |
|
class PPCanvasNode |
404 |
|
inherit CellBuoyViewNodeType |
405 |
|
|
406 |
|
class PPCanvasCursor |
407 |
|
fields |
408 |
|
float x, y |
409 |
|
float zoom |
410 |
|
inherit BuoyViewMainNode |
411 |
|
|
412 |
|
dep "create" PPCanvasNode PPCanvasCursor |
413 |
|
|