public void insert ( HtmlObject child , int beforeIndex ) { asDivPanel ( ) . insertBefore ( child , beforeIndex ) ; if ( child instanceof AbstractHtmlObject ) { ( ( AbstractHtmlObject ) child ) . setParent ( this ) ; } child . setLeft ( child . getLeft ( ) ) ; child . setTop ( child . getTop ( ) ) ; }
Insert a new child HtmlObject in the list at a certain index . The position will determine it s place in the visibility stack where the first element lies at the bottom and the last element on top .