use of javax.media.j3d.J3DGraphics2D in project ffx by mjschnie.
the class GraphicsCanvas method postRender.
/**
* {@inheritDoc}
*
* Labels are drawn in postRender.
*/
@Override
public void postRender() {
if (RendererCache.labelAtoms || RendererCache.labelResidues) {
J3DGraphics2D g2D = getGraphics2D();
synchronized (mainPanel.getHierarchy()) {
ArrayList<MSNode> nodes = mainPanel.getHierarchy().getActiveNodes();
if (nodes != null && nodes.size() > 0) {
for (MSNode node : nodes) {
MolecularAssembly sys = (MolecularAssembly) node.getMSNode(MolecularAssembly.class);
if (sys != null) {
node.drawLabel(this, g2D, sys.getWireFrame());
}
}
} else {
return;
}
}
g2D.flush(true);
}
}
Aggregations