public synchronized void add ( int index , Layer layer , boolean redraw ) { checkIsNull ( layer ) ; layer . setDisplayModel ( this . displayModel ) ; this . layersList . add ( index , layer ) ; layer . assign ( this . redrawer ) ; if ( redraw ) { this . redrawer . redrawLayers ( ) ; } }
Adds a new layer at the specified position .