com.sencha.gxt.widget.core.client
Class TabItemConfig

java.lang.Object
  extended by com.sencha.gxt.widget.core.client.TabItemConfig
All Implemented Interfaces:
HasSafeHtml, HasHTML, HasText, HasUiAttributes, HasIcon

public class TabItemConfig
extends java.lang.Object
implements HasIcon, HasHTML, HasSafeHtml, HasUiAttributes

Config object which controls the content and behavior of a widget in a TabPanel.

When updating the config object after the widget has been inserted, you must call TabPanel.update(com.google.gwt.user.client.ui.Widget, TabItemConfig).


Constructor Summary
TabItemConfig()
          Creates a tab item configuration.
TabItemConfig(java.lang.String text)
          Creates a tab item configuration with the specified text.
TabItemConfig(java.lang.String text, boolean close)
          Creates a tab item configuration with the specified properties.
 
Method Summary
 java.lang.String getHTML()
           
 ImageResource getIcon()
          Returns the icon.
 java.lang.String getText()
           
 boolean isClosable()
          Returns the item closable state.
 boolean isEnabled()
          Returns the enable / disable state.
 boolean isHTML()
          Returns true if the item text is treated as HTML.
 void setClosable(boolean closable)
          True to allow the item to be closable (defaults to false).
 void setEnabled(boolean enabled)
          True to enable, false to disable (defaults to true).
 void setHTML(SafeHtml html)
           
 void setHTML(java.lang.String html)
           
 void setIcon(ImageResource icon)
          Sets the icon.
 void setText(java.lang.String text)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabItemConfig

public TabItemConfig()
Creates a tab item configuration.


TabItemConfig

public TabItemConfig(java.lang.String text)
Creates a tab item configuration with the specified text.

Parameters:
text - the text of the tab item.

TabItemConfig

public TabItemConfig(java.lang.String text,
                     boolean close)
Creates a tab item configuration with the specified properties.

Parameters:
text - the tab item text
close - true to indicate the tab is closable
Method Detail

getHTML

public java.lang.String getHTML()
Specified by:
getHTML in interface HasHTML

getIcon

public ImageResource getIcon()
Description copied from interface: HasIcon
Returns the icon.

Specified by:
getIcon in interface HasIcon
Returns:
the icon

getText

public java.lang.String getText()
Specified by:
getText in interface HasText

isClosable

public boolean isClosable()
Returns the item closable state.

Returns:
true if closable

isEnabled

public boolean isEnabled()
Returns the enable / disable state.

Returns:
true if enabled

isHTML

public boolean isHTML()
Returns true if the item text is treated as HTML.

Returns:
true for HTML

setClosable

public void setClosable(boolean closable)
True to allow the item to be closable (defaults to false).

Parameters:
closable - true for closable

setEnabled

public void setEnabled(boolean enabled)
True to enable, false to disable (defaults to true).

Parameters:
enabled - the enabled state

setHTML

public void setHTML(SafeHtml html)
Specified by:
setHTML in interface HasSafeHtml

setHTML

public void setHTML(java.lang.String html)
Specified by:
setHTML in interface HasHTML

setIcon

public void setIcon(ImageResource icon)
Description copied from interface: HasIcon
Sets the icon.

Specified by:
setIcon in interface HasIcon
Parameters:
icon - the icon

setText

public void setText(java.lang.String text)
Specified by:
setText in interface HasText


Copyright © 2012. All Rights Reserved.