protected Drawer < ? super T > draw ( ZoomableGraphicsContext gc , GISElementContainer < T > primitive , Drawer < ? super T > drawer ) { Drawer < ? super T > drw = drawer ; final Iterator < T > iterator = primitive . iterator ( gc . getVisibleArea ( ) ) ; while ( iterator . hasNext ( ) ) { final T mapelement = iterator . next ( ) ; if ( drw == null ) { drw = Drawers . getDrawerFor ( mapelement . getClass ( ) ) ; if ( drw != null ) { gc . save ( ) ; drw . draw ( gc , mapelement ) ; gc . restore ( ) ; } } else { gc . save ( ) ; drw . draw ( gc , mapelement ) ; gc . restore ( ) ; } } return drw ; }
Draw the primitive with the given drawer .