//--------------------------------
for(int i=0;i<ShapesContainer.this.size();i++){
AbstractShape r=(AbstractShape)elementAt(i);
r.draw(g2);
ElementSelection dss=getElementContainer().getSelection().getSelectedShape(r);
if(dss!=null){
drawBounds(g2,dss);
}
// update drawing size