35 |
print k,"\t",v |
print k,"\t",v |
36 |
|
|
37 |
from org import fenfire as ff |
from org import fenfire as ff |
38 |
|
from org.fenfire.swamp import Nodes |
39 |
|
|
40 |
from org.nongnu import alph |
from org.nongnu import alph |
41 |
from org.nongnu import storm |
from org.nongnu import storm |
53 |
vob.buoy.buoymanager.replaceNewScene = vob.putil.demo.replacingScene |
vob.buoy.buoymanager.replaceNewScene = vob.putil.demo.replacingScene |
54 |
vob.buoy.buoymanager.w = vob.putil.demo.w |
vob.buoy.buoymanager.w = vob.putil.demo.w |
55 |
|
|
56 |
|
pool = storm.impl.TransientPool(java.util.HashSet()) |
57 |
|
myalph = alph.impl.StormAlph(pool) |
58 |
|
sc = myalph.addFile(java.io.File('../alph/testdata/test1.pdf'), 'application/pdf') |
59 |
|
enfMaker = alph.impl.Enfilade1DImpl.Enfilade1DImplMaker() |
60 |
|
|
61 |
# Create fen with swamps. |
# Create fen with swamps. |
62 |
|
|
63 |
fen = ff.Fen() |
fen = ff.Fen() |
64 |
fen.graph = fen.constgraph = ff.swamp.impl.HashGraph() |
fen.graph = fen.constgraph = ff.swamp.impl.HashGraph() |
65 |
fen.txt = ff.impl.SimpleNodeContent(fen); |
fen.txt = ff.impl.SimpleNodeContent(fen, myalph); |
66 |
fen.txtfunc = fen.txt.getNodeFunction() |
fen.txtfunc = fen.txt.getNodeFunction() |
67 |
|
|
68 |
# Create the buoy view elements |
# Create the buoy view elements |
102 |
vs.put(background((.8, .4, .9))) |
vs.put(background((.8, .4, .9))) |
103 |
w.renderStill(vs, 0) |
w.renderStill(vs, 0) |
104 |
|
|
105 |
xulinks = 0 |
if 1: |
|
|
|
|
canvases = 1 |
|
|
|
|
|
# /BIG/PAPERART/ht/p16-furnas.pdf -- urn:x-storm:1.0:application/pdf,j4vb6u6cumtnstfusywhht3avhn2ujan.57hmjk7o7yqehac5mom3e3hvgckjq6xakx6o7qy |
|
|
|
|
|
if xulinks: |
|
|
xuspace = ff.impl.ModularSpace( |
|
|
ff.impl.SimpleVStreamTexter( |
|
|
alph.impl.FakeSpanMaker(), |
|
|
alph.impl.Enfilade1DImpl.Enfilade1DImplMaker()), |
|
|
model |
|
|
) |
|
|
xuindexer = ff.index.IndexManager.getXuIndexer(xuspace) |
|
|
|
|
|
|
|
|
pagescrolls = ( |
|
|
PageImageScroll(None, storm.Mediaserver.Id( |
|
|
# "Focus+context views of World-Wide Web nodes" |
|
|
"01F8679C51FC1E410829DB31E838B9F15551F8E1F0")), |
|
|
|
|
|
PageImageScroll(None, storm.Mediaserver.Id( |
|
|
# ""Digital Library Information Appliances"" |
|
|
"01A3F5119A280DE2AA5F58B1A9FF1B23F26022B4E0")), |
|
|
|
|
|
PageImageScroll(None, storm.Mediaserver.Id( |
|
|
# "Fluid Links for Informed and Incremental Link Transitions" |
|
|
"01E941CB556ACB221B3909F6203E1763B7CA9A74B4")), |
|
|
|
|
|
PageImageScroll(None, storm.Mediaserver.Id( |
|
|
# "The mind's views of space" |
|
|
"011CA01BE52823106ED33F2C086FF8E7CCF9921A8D")), |
|
|
|
|
|
PageImageScroll(None, storm.Mediaserver.Id( |
|
|
# "A Zooming Web Browser" |
|
|
"015482A47DAA0FFAE5AA3084954C4D26DA9356C2BD")), |
|
|
|
|
|
PageImageScroll(None, storm.Mediaserver.Id( |
|
|
# "Generalized fisheye views" |
|
|
"01F8C8A93BE231D1CAC9C9C9AC79D130246B287298")) |
|
|
) |
|
|
|
|
|
|
|
|
pagespans = [scroll.getCurrent() for scroll in pagescrolls] |
|
|
|
|
|
print 'FOOOOOOOO' |
|
|
|
|
|
if 1: |
|
|
xuindexer.add(XuLink( |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[0].subSpan(0,1).subArea(300,350,30,200)), |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[1].subSpan(0,1).subArea(220,250,370,240)) |
|
|
)) |
|
|
print 'FOOOOOOOO' |
|
|
|
|
|
xuindexer.add(XuLink( |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[1].subSpan(1,2).subArea(0,300,350,300)), |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[0].subSpan(2,3).subArea(300,400,300,200)), |
|
|
)) |
|
|
|
|
|
xuindexer.add(XuLink( |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[3].subSpan(1,2).subArea(0,200,350,200)), |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[0].subSpan(3,4).subArea(300,400,30,40)), |
|
|
)) |
|
|
|
|
|
xuindexer.add(XuLink( |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[0].subSpan(1,2).subArea(20,40,332,220)), |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[4].subSpan(2,3).subArea(300,150,280,240)), |
|
|
)) |
|
|
|
|
|
xuindexer.add(XuLink( |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[5].subSpan(1,2).subArea(0,240,350,200)), |
|
|
ff.view.buoy.pagespanNodes.makeEnf(pagespans[0].subSpan(0,1).subArea(470,100,30,20)), |
|
|
)) |
|
|
|
|
|
if canvases: |
|
|
|
|
106 |
global linkid1 |
global linkid1 |
107 |
|
|
108 |
# try out some notes.. |
# try out some notes.. |
111 |
#wholepage = pg0.getCurrent().subSpan(0,1) |
#wholepage = pg0.getCurrent().subSpan(0,1) |
112 |
#span = wholepage.subArea(70, 50, 400, 100) |
#span = wholepage.subArea(70, 50, 400, 100) |
113 |
paperA = ppAct.newPaper() |
paperA = ppAct.newPaper() |
114 |
note1 = ppAct.newNote(paperA, 0,0, 'This is a test!') |
note1 = Nodes.get(ppAct.newNote(paperA, 0,0, 'This is a test!')) |
115 |
note1b = ppAct.newNote(paperA, 100, 100, 'This is translated by (100,100)!') |
note1b = Nodes.get(ppAct.newNote(paperA, 100, 100, '')) |
116 |
|
|
117 |
|
span = sc.getCurrent().getPage(0).subArea(100, 100, 300, 200); |
118 |
|
fen.txt.set(note1b, enfMaker.makeEnfilade(span)) |
119 |
#linkid1 = addTrans(span, paper) |
#linkid1 = addTrans(span, paper) |
120 |
|
|
121 |
paperB = ppAct.newPaper() |
paperB = ppAct.newPaper() |
122 |
note2 = ppAct.newNote(paperB, 10,30, 'This is an another test!') |
note2 = Nodes.get(ppAct.newNote(paperB, 10,30, 'This is an another test!')) |
123 |
|
|
124 |
ppAct.assocNotes(note1, 1, note2) |
ppAct.assocNotes(note1, 1, note2) |
125 |
|
|
140 |
# irregu.border = 10 |
# irregu.border = 10 |
141 |
irregu.type = 2 |
irregu.type = 2 |
142 |
|
|
143 |
plane = ff.swamp.Nodes.get(paperA) |
plane = Nodes.get(paperA) |
144 |
|
|
145 |
mainNode = ff.view.buoy.MainNode2D(plane, irregu) |
mainNode = ff.view.buoy.MainNode2D(plane, irregu) |
146 |
# mainNode = ff.view.buoy.MainNode2D(plane, paperview) |
# mainNode = ff.view.buoy.MainNode2D(plane, paperview) |