@SGWTInternal public abstract class BaseButton extends StatefulCanvas
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseButton.ButtonType |
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled| Modifier and Type | Field and Description |
|---|---|
static ButtonsCssResource |
_CSS |
protected java.lang.String |
tintColor
Buttons support being tinted dynamically.
|
_CONTENT_CHANGED_EVENT_TYPE, _HISTORY_ENABLED, _REQUEST_SCROLL_TO_EVENT_TYPE, id, touched| Constructor and Description |
|---|
BaseButton()
The default constructor that sets up the basic button structure.
|
BaseButton(BaseButton button) |
BaseButton(java.lang.String title)
BaseButton constructor.
|
| Modifier and Type | Method and Description |
|---|---|
float |
_getContentWidth() |
java.lang.Object |
_getInnerAttributeFromSplitLocator(java.util.List<java.lang.String> locatorArray,
com.smartgwt.mobile.client.internal.test.GetAttributeConfiguration configuration) |
com.google.gwt.dom.client.SpanElement |
_getLabelElement() |
java.lang.String |
_getStateName() |
void |
destroy() |
com.google.gwt.resources.client.ImageResource |
getIcon()
Return the button icon, or null if not set.
|
IconAlign |
getIconAlign()
Return the icon alignment.
|
java.lang.String |
getIconColor()
Return the icon color.
|
java.lang.String |
getTintColor()
Return the tint color.
|
java.lang.String |
getTitle()
Return the title label.
|
boolean |
isStretch()
Should the button stretch in width?
|
void |
setContents(java.lang.String html)
Deprecated.
Use
setTitle(String) instead. |
void |
setIcon(com.google.gwt.resources.client.ImageResource icon,
boolean mask)
Set the button icon from an
ImageResource. |
void |
setIcon(com.google.gwt.resources.client.ImageResource icon,
boolean mask,
IconAlign iconAlign)
Set the button icon from an
ImageResource. |
void |
setIconAlign(IconAlign iconAlign)
Set the icon alignment.
|
void |
setIconColor(java.lang.String iconColor)
Set the icon color.
|
void |
setStretch(boolean stretch)
Should the button stretch in width?
|
void |
setTintColor(java.lang.String tintColor)
Set the button tintColor.
|
void |
setTitle(java.lang.String title)
Sets the title label of the button.
|
protected void |
stateChanged() |
_getStateSuffix, _handleActivate, _setHandleDisabled, addToRadioGroup, deselect, getActionType, getBaseStyle, getRadioGroup, getShowDisabled, getShowDown, getState, getStateSuffix, isSelected, onBrowserEvent, removeFromRadioGroup, removeFromRadioGroup, select, setActionType, setBaseStyle, setRadioGroup, setSelected, setShowDisabled, setShowDown, setState_add, _booleanValue, _fireContentChangedEvent, _fireContentChangedEvent, _fireRequestScrollToEvent, _getAndroidWindowSoftInputMode, _getAttributeFromSplitLocator, _getChildFromLocatorSubstring, _getFixNavigationBarPositionDuringKeyboardFocus, _getHideTabBarDuringKeyboardFocus, _getInnerElement, _hideAddressBar, _hideAddressBarNow, _insert, _isDifferent, _isHDPIDisplay, _isIOS4OrOlder, _isIOS5, _isIOSMin6_0, _isStandaloneMode, _nativeParseFloat, _removeClassName, _setClassName, _sinkAnimationEndEvent, _sinkContentChangedEvent, _sinkFocusInEvent, _sinkFocusOutEvent, _sinkInputEvent, _sinkRequestScrollToEvent, _sinkTransitionEndEvent, _triggerDebugger, addChild, addChild, addChild, addClickHandler, addShowContextMenuHandler, disable, enable, getContextMenu, getID, getInnerHTML, getMargin, hasChild, hasChild, isAndroid, isDisabled, isEnabled, isIPad, isIPhone, isSafari, isStandAlone, isUIWebView, parseDimension, removeChild, removeChild, setContextMenu, setDisabled, setElement, setID, setMargin, setStyleName, split, useIOSNativeScrollingadd, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, removeadd, add, adopt, clear, doAttachChildren, doDetachChildren, orphan, removeaddAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEventsaddStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setVisible, setVisible, setWidth, sinkBitlessEvent, toString@SGWTInternal public static final ButtonsCssResource _CSS
protected java.lang.String tintColor
public BaseButton()
title and / or an icon
to have a meaningful appearance.public BaseButton(java.lang.String title)
title - the title label of the buttonpublic BaseButton(BaseButton button)
public java.lang.Object _getInnerAttributeFromSplitLocator(java.util.List<java.lang.String> locatorArray,
com.smartgwt.mobile.client.internal.test.GetAttributeConfiguration configuration)
_getInnerAttributeFromSplitLocator in interface com.smartgwt.mobile.client.internal.test.AutoTestLocatable_getInnerAttributeFromSplitLocator in class Canvaspublic void destroy()
destroy in class StatefulCanvas@Deprecated public void setContents(java.lang.String html)
setTitle(String) instead.setContents in class Canvas@SGWTInternal public final float _getContentWidth()
@SGWTInternal public final com.google.gwt.dom.client.SpanElement _getLabelElement()
public java.lang.String _getStateName()
_getStateName in class StatefulCanvaspublic final java.lang.String getTitle()
getTitle in class com.google.gwt.user.client.ui.UIObjectpublic void setTitle(java.lang.String title)
setTitle in class com.google.gwt.user.client.ui.UIObjecttitle - the button titlepublic final com.google.gwt.resources.client.ImageResource getIcon()
public void setIcon(com.google.gwt.resources.client.ImageResource icon,
boolean mask)
ImageResource.
Note: When using masking, the ImageResource must be a separate resource
at runtime. If using GWT ClientBundles, it is
sufficient to set the preventInlining image option to true.
icon - the icon image resource.mask - true to mask the button. Masking is typically applied to black-only icons causing its final
appearance to be whitepublic void setIcon(com.google.gwt.resources.client.ImageResource icon,
boolean mask,
IconAlign iconAlign)
ImageResource.
Note: When using masking, the ImageResource must be a separate resource
at runtime. If using GWT ClientBundles, it is
sufficient to set the preventInlining image option to true.
icon - the icon image resource.mask - true to mask the button. Masking is typically applied to black-only icons causing its final
appearance to be whiteiconAlign - the alignment of the iconpublic IconAlign getIconAlign()
public void setIconAlign(IconAlign iconAlign)
iconAlign - the icon alignmentpublic java.lang.String getTintColor()
public void setTintColor(java.lang.String tintColor)
tintColor - the tint colorpublic final java.lang.String getIconColor()
public void setIconColor(java.lang.String iconColor)
iconColor - the icon color. Defaults to nullpublic final boolean isStretch()
public void setStretch(boolean stretch)
stretch - true for stretch, false for auto-width based on contentsprotected void stateChanged()
stateChanged in class StatefulCanvas