protected void loadPosition ( ) { CSSDecoder dec = new CSSDecoder ( ctx ) ; int contw = getContainingBlock ( ) . width ; int conth = getContainingBlock ( ) . height ; CSSProperty . Top ptop = style . getProperty ( "top" ) ; CSSProperty . Right pright = style . getProperty ( "right" ) ; CSSProperty . Bottom pbottom = style . getProperty ( "bottom" ) ; CSSProperty . Left pleft = style . getProperty ( "left" ) ; topset = ! ( ptop == null || ptop == CSSProperty . Top . AUTO ) ; rightset = ! ( pright == null || pright == CSSProperty . Right . AUTO ) ; bottomset = ! ( pbottom == null || pbottom == CSSProperty . Bottom . AUTO ) ; leftset = ! ( pleft == null || pleft == CSSProperty . Left . AUTO ) ; coords = new LengthSet ( ) ; if ( topset ) coords . top = dec . getLength ( getLengthValue ( "top" ) , ( ptop == CSSProperty . Top . AUTO ) , 0 , 0 , conth ) ; if ( rightset ) coords . right = dec . getLength ( getLengthValue ( "right" ) , ( pright == CSSProperty . Right . AUTO ) , 0 , 0 , contw ) ; if ( bottomset ) coords . bottom = dec . getLength ( getLengthValue ( "bottom" ) , ( pbottom == CSSProperty . Bottom . AUTO ) , 0 , 0 , conth ) ; if ( leftset ) coords . left = dec . getLength ( getLengthValue ( "left" ) , ( pleft == CSSProperty . Left . AUTO ) , 0 , 0 , contw ) ; }
Loads the top left bottom and right coordinates from the style