#NEWLINE# def insertTab( self , text , asHTML , beforeIndex = None ) : #NEWLINE# #INDENT# ' 1st arg can, instead of being \'text\', be a widget.\n\n            1st arg can also be None, which results in a blank\n            space between tabs.  Use this to push subsequent\n            tabs out to the right hand end of the TabBar.\n            (the "blank" tab, by not being focussable, is not\n            clickable).\n        ' #NEWLINE# if ( beforeIndex is None ) : #NEWLINE# #INDENT# beforeIndex = asHTML #NEWLINE# asHTML = False #NEWLINE# #UNINDENT# if ( ( beforeIndex < 0 ) or ( beforeIndex > self . getTabCount ( ) ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if ( text is None ) : #NEWLINE# #INDENT# text = HTML ( '&nbsp;' , True ) #NEWLINE# text . setWidth ( '100%' ) #NEWLINE# text . setStyleName ( 'gwt-TabBarRest' ) #NEWLINE# self . panel . insert ( text , ( istext + 1 ) ) #NEWLINE# self . panel . setCellWidth ( text , '100%' ) #NEWLINE# return #NEWLINE# #UNINDENT# istext = isinstance ( text , basestring ) #NEWLINE# if istext : #NEWLINE# #INDENT# if asHTML : #NEWLINE# #INDENT# item = HTML ( text ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# item = Label ( text ) #NEWLINE# #UNINDENT# item . setWordWrap ( False ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# item = text #NEWLINE# #UNINDENT# self . insertTabWidget ( item , beforeIndex )