<s> from pyjamas . ui . Sink import Sink , SinkInfo <EOL> from pyjamas . ui . TabPanel import TabPanel <EOL> from pyjamas . ui import HasAlignment <EOL> from pyjamas . ui . Image import Image <EOL> from pyjamas . ui . VerticalPanel import VerticalPanel <EOL> class Tabs ( Sink ) : <EOL> def __init__ ( self ) : <EOL> Sink . __init__ ( self ) <EOL> self . fTabs = TabPanel ( ) <EOL> self . fTabs . addTabListener ( self ) <EOL> self . fTabs . add ( self . createImage ( self . baseURL ( ) + "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> self . fTabs . add ( self . createImage ( self . baseURL ( ) + "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> self . fTabs . add ( self . createImage ( self . baseURL ( ) + "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> self . fTabs . add ( self . createImage ( self . baseURL ( ) + "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> self . fTabs . add ( self . createImage ( self . baseURL ( ) + "<STR_LIT>" ) , "<STR_LIT>" ) <EOL> self . fTabs . selectTab ( <NUM_LIT:0> ) <EOL> self . fTabs . setWidth ( "<STR_LIT>" ) <EOL> self . fTabs . setHeight ( "<STR_LIT>" ) <EOL> self . initWidget ( self . fTabs ) <EOL> def onShow ( self ) : <EOL> pass <EOL> def createImage ( self , imageUrl ) : <EOL> image = Image ( imageUrl ) <EOL> image . setStyleName ( "<STR_LIT>" ) <EOL> p = VerticalPanel ( ) <EOL> p . setHorizontalAlignment ( HasAlignment . ALIGN_CENTER ) <EOL> p . setVerticalAlignment ( HasAlignment . ALIGN_MIDDLE ) <EOL> p . add ( image ) <EOL> return p <EOL> def onBeforeTabSelected ( self , sender , tabIndex ) : <EOL> if tabIndex == <NUM_LIT:4> : <EOL> return False <EOL> return True <EOL> def onTabSelected ( self , sender , tabIndex ) : <EOL> bar = self . fTabs . getTabBar ( ) <EOL> if tabIndex == <NUM_LIT:0> : <EOL> bar . getTabWidget ( <NUM_LIT:0> ) . setText ( '<STR_LIT>' ) <EOL> else : <EOL> bar . getTabWidget ( <NUM_LIT:0> ) . setText ( '<STR_LIT>' ) <EOL> def init ( ) : <EOL> text = "<STR_LIT>" <EOL> text = "<STR_LIT>" <EOL> text += "<STR_LIT>" <EOL> text += "<STR_LIT>" <EOL> return SinkInfo ( "<STR_LIT>" , text , Tabs ) </s>
