for(int i=0;i<dc.size();i++){
// connectors are not connected to connections
// can't call getConnections() on
// connections are connected to connectors
// and have been copied to clipboard
Object o=dc.elementAt(i);
if(o instanceof AbstractShape){
AbstractShape r=(AbstractShape)o;
r.draw(g2);
// update drawing size
r.getMax(pMax);