117 |
textstyle = vob.GraphicsAPI.getInstance().getTextStyle("sansserif", 0, 24) |
textstyle = vob.GraphicsAPI.getInstance().getTextStyle("sansserif", 0, 24) |
118 |
|
|
119 |
# normal |
# normal |
120 |
normal_text = ff.view.TextNodeView(fen.txtfunc, textstyle, java.awt.Color(0.5, 0.1, 1)) |
normal_text = ff.view.TextNodeView(fen.txtfunc, textstyle, java.awt.Color(0., 0., 0.)) |
121 |
normal_text_bg = ff.fenmm.WhiteNodeView(normal_text, None) |
normal_text_bg = ff.fenmm.WhiteNodeView(normal_text, java.awt.Color(.6, .6, .6)) |
122 |
normal = ff.swamp.CachedPureNodeFunction(100, fen.constgraph, normal_text_bg) |
normal = ff.swamp.CachedPureNodeFunction(100, fen.constgraph, normal_text_bg) |
123 |
|
|
124 |
# accursed |
# accursed |
125 |
accursed_text = ff.view.TextNodeView(fen.txtfunc, textstyle, java.awt.Color.black) |
accursed_text = ff.view.TextNodeView(fen.txtfunc, textstyle, java.awt.Color.black) |
126 |
accursed = ff.swamp.CachedPureNodeFunction(100, fen.constgraph, accursed_text) |
accursed_text_bg = ff.fenmm.WhiteNodeView(accursed_text, java.awt.Color(.9, .9, .9)) |
127 |
|
accursed = ff.swamp.CachedPureNodeFunction(100, fen.constgraph, accursed_text_bg) |
128 |
multiplexer = ff.swamp.MultiplexerNodeFunction(normal, accursed) |
multiplexer = ff.swamp.MultiplexerNodeFunction(normal, accursed) |
129 |
|
|
|
|
|
130 |
mindView = ff.view.lava.mindMapView2D.MindMapView2D(fen, multiplexer) |
mindView = ff.view.lava.mindMapView2D.MindMapView2D(fen, multiplexer) |
131 |
|
|
132 |
|
|
189 |
if iter.hasNext(): return 1 |
if iter.hasNext(): return 1 |
190 |
return 0 |
return 0 |
191 |
|
|
192 |
def setAccursed(self, node): |
def setAccursed(self, node, multiplexer = None): |
193 |
|
set = java.util.HashSet() |
194 |
|
set.add(node) |
195 |
|
if multiplexer: |
196 |
|
multiplexer.setMultiplexerNodes(set) |
197 |
|
self.main.multiplexer.setMultiplexerNodes(set) |
198 |
|
|
199 |
self._accursed = node |
self._accursed = node |
200 |
if self._accursed != None: |
if self._accursed != None: |
201 |
self.offset = len(alphContent.getText(fen.graph, self._accursed)) |
self.offset = len(alphContent.getText(fen.graph, self._accursed)) |
230 |
|
|
231 |
context = Context() |
context = Context() |
232 |
|
|
|
## obsolete |
|
|
#nodeview.setContext(context) |
|
|
|
|
|
|
|
233 |
if not do_load_graph: |
if not do_load_graph: |
234 |
context.home = ff.util.RDFUtil.N(fen.graph, MINDSTRUCT.Data) |
context.home = ff.util.RDFUtil.N(fen.graph, MINDSTRUCT.Data) |
235 |
alphContent.insertText(context.home, 0, 'home', 1) |
alphContent.insertText(context.home, 0, 'home', 1) |
255 |
|
|
256 |
rmb = context.rmb_switch[0] |
rmb = context.rmb_switch[0] |
257 |
if rmb == 'go': |
if rmb == 'go': |
258 |
self.context.setAccursed(node) |
self.context.setAccursed(node, multiplexer) |
|
set = java.util.HashSet() |
|
|
set.add(node) |
|
|
multiplexer.setMultiplexerNodes(set) |
|
259 |
|
|
260 |
# set cursor, transitions between zoomed and normal should be accounted |
# set cursor, transitions between zoomed and normal should be accounted |
261 |
cs = vs.getCSAt(0, x,y, None) |
cs = vs.getCSAt(0, x,y, None) |
344 |
|
|
345 |
# contexts for e.g. drawCursor callbacks and delivering accursedNode |
# contexts for e.g. drawCursor callbacks and delivering accursedNode |
346 |
self.main.context = context |
self.main.context = context |
347 |
|
self.main.setColors(fen) |
348 |
mindView.context = context |
mindView.context = context |
349 |
|
|
350 |
# flag for cursor('wait') |
# flag for cursor('wait') |