<s> from pyjamas . ui . CustomButton import CustomButton <EOL> from pyjamas import Factory <EOL> class ToggleButton ( CustomButton ) : <EOL> """<STR_LIT>""" <EOL> STYLENAME_DEFAULT = "<STR_LIT>" <EOL> def __init__ ( self , upImageText = None , downImageText = None , handler = None , <EOL> ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> kwargs [ '<STR_LIT>' ] = kwargs . get ( '<STR_LIT>' , self . STYLENAME_DEFAULT ) <EOL> CustomButton . __init__ ( self , upImageText , downImageText , handler , <EOL> ** kwargs ) <EOL> def onClick ( self , sender = None ) : <EOL> self . toggleDown ( ) <EOL> CustomButton . onClick ( self ) <EOL> Factory . registerClass ( '<STR_LIT>' , '<STR_LIT>' , ToggleButton ) </s>
