<s> from muntjac . api import VerticalLayout , Panel , Label , CssLayout <EOL> class CssLayoutsExample ( VerticalLayout ) : <EOL> def __init__ ( self ) : <EOL> super ( CssLayoutsExample , self ) . __init__ ( ) <EOL> self . setMargin ( True ) <EOL> panel = Panel ( '<STR_LIT>' ) <EOL> panel . setStyleName ( '<STR_LIT>' ) <EOL> panel . setWidth ( '<STR_LIT>' ) <EOL> panel . setHeight ( '<STR_LIT>' ) <EOL> panel . addComponent ( Label ( '<STR_LIT>' <EOL> + '<STR_LIT>' <EOL> + '<STR_LIT>' <EOL> + '<STR_LIT>' <EOL> + '<STR_LIT>' <EOL> + '<STR_LIT>' <EOL> + '<STR_LIT>' ) ) <EOL> bottomCenter = Label ( <EOL> '<STR_LIT>' ) <EOL> bottomCenter . setSizeUndefined ( ) <EOL> bottomCenter . setStyleName ( '<STR_LIT>' ) <EOL> cssLayout = MyCssLayout ( ) <EOL> cssLayout . setWidth ( '<STR_LIT>' ) <EOL> cssLayout . addComponent ( panel ) <EOL> for _ in range ( <NUM_LIT:15> ) : <EOL> cssLayout . addComponent ( Brick ( ) ) <EOL> cssLayout . addComponent ( bottomCenter ) <EOL> self . addComponent ( cssLayout ) <EOL> class MyCssLayout ( CssLayout ) : <EOL> def __init__ ( self ) : <EOL> super ( MyCssLayout , self ) . __init__ ( ) <EOL> self . _brickCounter = <NUM_LIT:0> <EOL> def getCss ( self , c ) : <EOL> if isinstance ( c , Brick ) : <EOL> self . _brickCounter += <NUM_LIT:1> <EOL> if self . _brickCounter % <NUM_LIT:3> == <NUM_LIT:0> : <EOL> return '<STR_LIT>' <EOL> return None <EOL> class Brick ( Label ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> super ( Brick , self ) . __init__ ( '<STR_LIT>' ) <EOL> self . setSizeUndefined ( ) <EOL> self . setStyleName ( '<STR_LIT>' ) </s>
