#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# self . handlers = [ ] #NEWLINE# self . content = None #NEWLINE# element = kwargs . pop ( 'Element' , None ) #NEWLINE# headerText = headerWidget = None #NEWLINE# isOpen = False #NEWLINE# if ( len ( args ) == 1 ) : #NEWLINE# #INDENT# header = args [ 0 ] #NEWLINE# #UNINDENT# if ( len ( args ) == 2 ) : #NEWLINE# #INDENT# ( header , isOpen ) = args [ : 2 ] #NEWLINE# #UNINDENT# if isinstance ( header , basestring ) : #NEWLINE# #INDENT# headerText = header #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# headerWidget = header #NEWLINE# #UNINDENT# isOpen = kwargs . pop ( 'isOpen' , isOpen ) #NEWLINE# headerText = kwargs . pop ( 'header' , headerText ) #NEWLINE# headerWidget = kwargs . pop ( 'header' , headerWidget ) #NEWLINE# headerContent = headerWidget #NEWLINE# if ( ( headerText is not None ) or ( headerContent is None ) ) : #NEWLINE# #INDENT# if ( headerText is None ) : #NEWLINE# #INDENT# headerText = '' #NEWLINE# #UNINDENT# headerContent = DefaultHeader ( headerText ) #NEWLINE# #UNINDENT# self . mainPanel = VerticalPanel ( Element = element ) #NEWLINE# self . _init_header ( headerContent ) #NEWLINE# self . contentWrapper = SimplePanel ( ) #NEWLINE# self . mainPanel . add ( self . header ) #NEWLINE# self . mainPanel . add ( self . contentWrapper ) #NEWLINE# DOM . setStyleAttribute ( self . contentWrapper . getElement ( ) , 'padding' , '0px' ) #NEWLINE# DOM . setStyleAttribute ( self . contentWrapper . getElement ( ) , 'overflow' , 'hidden' ) #NEWLINE# kwargs [ 'StyleName' ] = kwargs . get ( 'StyleName' , 'gwt-DisclosurePanel' ) #NEWLINE# Composite . __init__ ( self , self . mainPanel , ** kwargs ) #NEWLINE# self . isOpen = None #NEWLINE# self . setOpen ( isOpen ) #NEWLINE# self . setContentDisplay ( )