#NEWLINE# def __init__( self , rowStyles = None , containerIndex = 1 , **kwargs ) : #NEWLINE# #INDENT# ' Creates a new panel using the specified style names to\n            apply to each row.  Each row will contain three cells\n            (Left, Center, and Right). The Center cell in the\n            containerIndex row will contain the {@link Widget}.\n\n            @param rowStyles: an array of style names to apply to each row\n            @param containerIndex the index of the container row\n        ' #NEWLINE# if ( rowStyles is None ) : #NEWLINE# #INDENT# rowStyles = self . DEFAULT_ROW_STYLENAMES #NEWLINE# #UNINDENT# if kwargs . has_key ( 'Element' ) : #NEWLINE# #INDENT# self . table = kwargs . pop ( 'Element' ) #NEWLINE# fc = DOM . getFirstChild ( self . table ) #NEWLINE# if containerIndex : #NEWLINE# #INDENT# self . tbody = fc #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . tbody = DOM . createTBody ( ) #NEWLINE# DOM . appendChild ( self . table , self . tbody ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . table = DOM . createTable ( ) #NEWLINE# self . tbody = DOM . createTBody ( ) #NEWLINE# DOM . appendChild ( self . table , self . tbody ) #NEWLINE# DOM . setAttribute ( self . table , 'cellSpacing' , '0' ) #NEWLINE# DOM . setAttribute ( self . table , 'cellPadding' , '0' ) #NEWLINE# #UNINDENT# if ( not kwargs . has_key ( 'StyleName' ) ) : #NEWLINE# #INDENT# kwargs [ 'StyleName' ] = self . DEFAULT_STYLENAME #NEWLINE# #UNINDENT# SimplePanel . __init__ ( self , self . table , ** kwargs ) #NEWLINE# for i in range ( len ( rowStyles ) ) : #NEWLINE# #INDENT# row = self . createTR ( rowStyles [ i ] ) #NEWLINE# DOM . appendChild ( self . tbody , row ) #NEWLINE# if ( i == containerIndex ) : #NEWLINE# #INDENT# self . containerElem = DOM . getFirstChild ( DOM . getChild ( row , 1 ) )