com.vaadin.terminal.gwt.client.ui.button
Class ButtonState

java.lang.Object
  extended by com.vaadin.terminal.gwt.client.communication.SharedState
      extended by com.vaadin.terminal.gwt.client.ComponentState
          extended by com.vaadin.terminal.gwt.client.ui.button.ButtonState
All Implemented Interfaces:
TabIndexState, Serializable

public class ButtonState
extends ComponentState
implements TabIndexState

Shared state for Button and NativeButton.

Since:
7.0
See Also:
ComponentState, Serialized Form

Constructor Summary
ButtonState()
           
 
Method Summary
 int getClickShortcutKeyCode()
          Returns the key code for activating the button via a keyboard shortcut.
 int getTabIndex()
          Gets the tabulator index of the field.
 boolean isDisableOnClick()
          Checks whether the button should be disabled on the client side on next click.
 boolean isHtmlContentAllowed()
          Return HTML rendering setting.
 void setClickShortcutKeyCode(int clickShortcutKeyCode)
          Sets the key code for activating the button via a keyboard shortcut.
 void setDisableOnClick(boolean disableOnClick)
          Sets whether the button should be disabled on the client side on next click.
 void setHtmlContentAllowed(boolean htmlContentAllowed)
          Set whether the caption text is rendered as HTML or not.
 void setTabIndex(int tabIndex)
          Sets the tabulator index of the field.
 
Methods inherited from class com.vaadin.terminal.gwt.client.ComponentState
addRegisteredEventListener, getCaption, getDebugId, getDescription, getErrorMessage, getHeight, getIcon, getRegisteredEventListeners, getStyles, getWidth, hasDescription, hasStyles, isImmediate, isReadOnly, isUndefinedHeight, isUndefinedWidth, isVisible, removeRegisteredEventListener, setCaption, setDebugId, setDescription, setErrorMessage, setHeight, setIcon, setImmediate, setReadOnly, setRegisteredEventListeners, setStyles, setVisible, setWidth
 
Methods inherited from class com.vaadin.terminal.gwt.client.communication.SharedState
isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ButtonState

public ButtonState()
Method Detail

isDisableOnClick

public boolean isDisableOnClick()
Checks whether the button should be disabled on the client side on next click.

Returns:
true if the button should be disabled on click

setDisableOnClick

public void setDisableOnClick(boolean disableOnClick)
Sets whether the button should be disabled on the client side on next click.

Parameters:
disableOnClick - true if the button should be disabled on click

getClickShortcutKeyCode

public int getClickShortcutKeyCode()
Returns the key code for activating the button via a keyboard shortcut. See Button.setClickShortcut(int, int...) for more information.

Returns:
key code or 0 for none

setClickShortcutKeyCode

public void setClickShortcutKeyCode(int clickShortcutKeyCode)
Sets the key code for activating the button via a keyboard shortcut. See Button.setClickShortcut(int, int...) for more information.

Parameters:
clickShortcutKeyCode - key code or 0 for none

setHtmlContentAllowed

public void setHtmlContentAllowed(boolean htmlContentAllowed)
Set whether the caption text is rendered as HTML or not. You might need to retheme button to allow higher content than the original text style. If set to true, the captions are passed to the browser as html and the developer is responsible for ensuring no harmful html is used. If set to false, the content is passed to the browser as plain text.

Parameters:
htmlContentAllowed - true if caption is rendered as HTML, false otherwise

isHtmlContentAllowed

public boolean isHtmlContentAllowed()
Return HTML rendering setting.

Returns:
true if the caption text is to be rendered as HTML, false otherwise

getTabIndex

public int getTabIndex()
Description copied from interface: TabIndexState
Gets the tabulator index of the field.

Specified by:
getTabIndex in interface TabIndexState
Returns:
the tab index for the Field

setTabIndex

public void setTabIndex(int tabIndex)
Description copied from interface: TabIndexState
Sets the tabulator index of the field.

Specified by:
setTabIndex in interface TabIndexState
Parameters:
tabIndex - the tab index to set


Copyright © 2000-2011 Vaadin Ltd. All Rights Reserved.