use of gaiasky.scenegraph.IStarFocus in project gaiasky by langurmonkey.
the class UncertaintiesHandler method notify.
@Override
public void notify(final Event event, Object source, final Object... data) {
switch(event) {
case SHOW_UNCERTAINTIES:
if (data[0] instanceof IStarFocus) {
final IStarFocus s = (IStarFocus) data[0];
GaiaSky.postRunnable(new Runnable() {
@Override
public void run() {
ParticleGroup pg = load(s.getCandidateId());
GaiaSky.instance.sceneGraph.getRoot().addChild(pg, true);
particleGroups.add(pg);
}
});
}
break;
case HIDE_UNCERTAINTIES:
GaiaSky.postRunnable(new Runnable() {
@Override
public void run() {
for (ParticleGroup pg : particleGroups) {
GaiaSky.instance.sceneGraph.getRoot().removeChild(pg, true);
}
particleGroups.clear();
}
});
break;
default:
break;
}
}
Aggregations