use of nars.gui.ConceptSurface in project narchy by automenta.
the class DynamicConceptSpace method get.
@Override
protected List<ConceptWidget> get() {
if (updated.get()) {
List<ConceptWidget> w;
w = next.write();
w.clear();
concepts.forEach((clink) -> {
// ConceptWidget cw = space.getOrAdd(clink.get().id, ConceptWidget::new);
Concept cc = clink.get().id;
ConceptWidget cw = cc.meta(spaceID, (sid) -> new ConceptWidget(cc) {
@Override
protected void onClicked(PushButton b) {
SpaceGraph.window(new ConceptSurface(id.term(), nar), 800, 700);
}
});
if (cw != null) {
cw.activate();
cw.pri = clink.priElseZero();
w.add(cw);
}
// space.getOrAdd(concept.term(), materializer).setConcept(concept, now)
});
vis.accept(next.write());
next.commit();
updated.set(false);
}
return next.read();
}
Aggregations