com.tensegrity.palowebviewer.modules.widgets.client.tab
Class GTabBar

java.lang.Object
  extended by com.google.gwt.user.client.ui.UIObject
      extended by com.google.gwt.user.client.ui.Widget
          extended by com.google.gwt.user.client.ui.Composite
              extended by com.tensegrity.palowebviewer.modules.widgets.client.tab.GTabBar
All Implemented Interfaces:
com.google.gwt.user.client.EventListener

public class GTabBar
extends com.google.gwt.user.client.ui.Composite

A horizontal bar of folder-style tabs

CSS Style Rules

Example


Constructor Summary
GTabBar()
          Creates an empty tab bar.
 
Method Summary
 void addTab(java.lang.String text, java.lang.String imgURL, boolean closeable, boolean selected)
          Adds a new tab with the specified text, icon and close button
 void addTabListener(TabListener listener)
           
 int getTabCount()
          Gets the number of tabs present.
 void removeTab(int index)
          Removes the tab at the specified index.
 void selectTab(int index)
           
 void selectTab(com.google.gwt.user.client.ui.Widget w)
           
 void setTabIcon(java.lang.String iconUrl, int index)
           
 void setTabTitle(java.lang.String title, int index)
           
 
Methods inherited from class com.google.gwt.user.client.ui.Composite
getElement, getWidget, initWidget, isAttached, onAttach, onDetach, setWidget
 
Methods inherited from class com.google.gwt.user.client.ui.Widget
doAttachChildren, doDetachChildren, getParent, onBrowserEvent, onLoad, onUnload, removeFromParent, setElement
 
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, removeStyleDependentName, removeStyleName, setHeight, setPixelSize, setSize, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkEvents, toString, unsinkEvents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GTabBar

public GTabBar()
Creates an empty tab bar.

Method Detail

addTab

public void addTab(java.lang.String text,
                   java.lang.String imgURL,
                   boolean closeable,
                   boolean selected)
Adds a new tab with the specified text, icon and close button

Parameters:
text - the new tab's text
asHTML - true to treat the specified text as html
imgURL - the tab's icon URL
closeable - true with close button

addTabListener

public void addTabListener(TabListener listener)

getTabCount

public int getTabCount()
Gets the number of tabs present.

Returns:
the tab count

removeTab

public void removeTab(int index)
Removes the tab at the specified index.

Parameters:
index - the index of the tab to be removed

selectTab

public void selectTab(int index)

setTabTitle

public void setTabTitle(java.lang.String title,
                        int index)

setTabIcon

public void setTabIcon(java.lang.String iconUrl,
                       int index)

selectTab

public void selectTab(com.google.gwt.user.client.ui.Widget w)