public class

PushButton

extends CustomButton
java.lang.Object
   ↳ com.google.gwt.user.client.ui.UIObject
     ↳ com.google.gwt.user.client.ui.Widget
       ↳ com.google.gwt.user.client.ui.FocusWidget
         ↳ com.google.gwt.user.client.ui.ButtonBase
           ↳ com.google.gwt.user.client.ui.CustomButton
             ↳ com.google.gwt.user.client.ui.PushButton

Class Overview

A normal push button with custom styling.

CSS Style Rules

  • .gwt-PushButton-up/down/up-hovering/down-hovering/up-disabled/down-disabled {.html-face}

Example

{@example com.google.gwt.examples.PushButtonExample}

Summary

[Expand]
Inherited Constants
From class com.google.gwt.user.client.ui.UIObject
Public Constructors
PushButton()
Constructor for PushButton.
PushButton(Image upImage)
Constructor for PushButton.
PushButton(Image upImage, ClickHandler handler)
Constructor for PushButton.
PushButton(Image upImage, ClickListener listener)
This constructor is deprecated. Use PushButton(Image, ClickHandler) instead
PushButton(Image upImage, Image downImage)
Constructor for PushButton.
PushButton(Image upImage, Image downImage, ClickHandler handler)
Constructor for PushButton.
PushButton(Image upImage, Image downImage, ClickListener listener)
This constructor is deprecated. Use PushButton(Image, Image, ClickHandler) instead
PushButton(String upText)
Constructor for PushButton.
PushButton(String upText, ClickHandler handler)
Constructor for PushButton.
PushButton(String upText, ClickListener listener)
This constructor is deprecated. Use PushButton(String, ClickHandler) instead
PushButton(String upText, String downText)
Constructor for PushButton.
PushButton(String upText, String downText, ClickHandler handler)
Constructor for PushButton.
PushButton(String upText, String downText, ClickListener listener)
This constructor is deprecated. Use PushButton(String, String, ClickHandler) instead
Protected Methods
void onClick()
Called when the user finishes clicking on this button.
void onClickCancel()
Called when the user aborts a click in progress; for example, by dragging the mouse outside of the button before releasing the mouse button.
void onClickStart()
Called when the user begins to click on this button.
[Expand]
Inherited Methods
From class com.google.gwt.user.client.ui.CustomButton
From class com.google.gwt.user.client.ui.ButtonBase
From class com.google.gwt.user.client.ui.FocusWidget
From class com.google.gwt.user.client.ui.Widget
From class com.google.gwt.user.client.ui.UIObject
From class java.lang.Object
From interface com.google.gwt.event.dom.client.HasBlurHandlers
From interface com.google.gwt.event.dom.client.HasClickHandlers
From interface com.google.gwt.event.dom.client.HasDoubleClickHandlers
From interface com.google.gwt.event.dom.client.HasFocusHandlers
From interface com.google.gwt.event.dom.client.HasGestureChangeHandlers
From interface com.google.gwt.event.dom.client.HasGestureEndHandlers
From interface com.google.gwt.event.dom.client.HasGestureStartHandlers
From interface com.google.gwt.event.dom.client.HasKeyDownHandlers
From interface com.google.gwt.event.dom.client.HasKeyPressHandlers
From interface com.google.gwt.event.dom.client.HasKeyUpHandlers
From interface com.google.gwt.event.dom.client.HasMouseDownHandlers
From interface com.google.gwt.event.dom.client.HasMouseMoveHandlers
From interface com.google.gwt.event.dom.client.HasMouseOutHandlers
From interface com.google.gwt.event.dom.client.HasMouseOverHandlers
From interface com.google.gwt.event.dom.client.HasMouseUpHandlers
From interface com.google.gwt.event.dom.client.HasMouseWheelHandlers
From interface com.google.gwt.event.dom.client.HasTouchCancelHandlers
From interface com.google.gwt.event.dom.client.HasTouchEndHandlers
From interface com.google.gwt.event.dom.client.HasTouchMoveHandlers
From interface com.google.gwt.event.dom.client.HasTouchStartHandlers
From interface com.google.gwt.event.logical.shared.HasAttachHandlers
From interface com.google.gwt.event.shared.HasHandlers
From interface com.google.gwt.safehtml.client.HasSafeHtml
From interface com.google.gwt.user.client.EventListener
From interface com.google.gwt.user.client.ui.Focusable
From interface com.google.gwt.user.client.ui.HasEnabled
From interface com.google.gwt.user.client.ui.HasHTML
From interface com.google.gwt.user.client.ui.HasText
From interface com.google.gwt.user.client.ui.IsWidget
From interface com.google.gwt.user.client.ui.SourcesClickEvents
From interface com.google.gwt.user.client.ui.SourcesFocusEvents
From interface com.google.gwt.user.client.ui.SourcesKeyboardEvents
From interface com.google.gwt.user.client.ui.SourcesMouseEvents

Public Constructors

public PushButton ()

Constructor for PushButton.

public PushButton (Image upImage)

Constructor for PushButton.

Parameters
upImage image for the default(up) face of the button

public PushButton (Image upImage, ClickHandler handler)

Constructor for PushButton. The supplied image is used to construct the default face of the button.

Parameters
upImage image for the default (up) face of the button
handler teh click handler

public PushButton (Image upImage, ClickListener listener)

This constructor is deprecated.
Use PushButton(Image, ClickHandler) instead

Constructor for PushButton. The supplied image is used to construct the default face of the button.

Parameters
upImage image for the default (up) face of the button
listener the click listener

public PushButton (Image upImage, Image downImage)

Constructor for PushButton.

Parameters
upImage image for the default(up) face of the button
downImage image for the down face of the button

public PushButton (Image upImage, Image downImage, ClickHandler handler)

Constructor for PushButton.

Parameters
upImage image for the default(up) face of the button
downImage image for the down face of the button
handler the click handler

public PushButton (Image upImage, Image downImage, ClickListener listener)

This constructor is deprecated.
Use PushButton(Image, Image, ClickHandler) instead

Constructor for PushButton.

Parameters
upImage image for the default(up) face of the button
downImage image for the down face of the button
listener clickListener

public PushButton (String upText)

Constructor for PushButton. The supplied text is used to construct the default face of the button.

Parameters
upText the text for the default (up) face of the button.

public PushButton (String upText, ClickHandler handler)

Constructor for PushButton. The supplied text is used to construct the default face of the button.

Parameters
upText the text for the default (up) face of the button
handler the click handler

public PushButton (String upText, ClickListener listener)

This constructor is deprecated.
Use PushButton(String, ClickHandler) instead

Constructor for PushButton. The supplied text is used to construct the default face of the button.

Parameters
upText the text for the default (up) face of the button
listener the click listener

public PushButton (String upText, String downText)

Constructor for PushButton.

Parameters
upText the text for the default (up) face of the button
downText the text for down face of the button

public PushButton (String upText, String downText, ClickHandler handler)

Constructor for PushButton.

Parameters
upText the text for the default (up) face of the button
downText the text for down face of the button
handler the click handler

public PushButton (String upText, String downText, ClickListener listener)

This constructor is deprecated.
Use PushButton(String, String, ClickHandler) instead

Constructor for PushButton.

Parameters
upText the text for the default (up) face of the button
downText the text for down face of the button
listener the click listener

Protected Methods

protected void onClick ()

Called when the user finishes clicking on this button. The default behavior is to fire the click event to listeners. Subclasses that override onClickStart() should override this method to restore the normal widget display.

protected void onClickCancel ()

Called when the user aborts a click in progress; for example, by dragging the mouse outside of the button before releasing the mouse button. Subclasses that override onClickStart() should override this method to restore the normal widget display.

protected void onClickStart ()

Called when the user begins to click on this button. Subclasses may override this method to display the start of the click visually; such subclasses should also override onClick() and onClickCancel() to restore normal visual state. Each onClickStart will eventually be followed by either onClick or onClickCancel, depending on whether the click is completed.