public static class CustomButton extends Object
down-hovering
face, the button's style is
gwt-PushButton-down-hovering. The overall style name can be used to
change the style of the button irrespective of the current face.
Each button face can be assigned is own image, text, or html contents. If no
content is defined for a face, then the face will use the contents of another
face. For example, if down-hovering
does not have defined
contents, it will use the contents defined by the down
face.
The supported faces are defined below:
CSS style name | Getter method | description of face | defaults to contents of face |
up | #getUpFace() |
face shown when button is up | none |
down | #getDownFace() |
face shown when button is down | up |
up-hovering | #getUpHoveringFace() |
face shown when button is up and hovering | up |
up-disabled | #getUpDisabledFace() |
face shown when button is up and disabled | up |
down-hovering | #getDownHoveringFace() |
face shown when button is down and hovering | down |
down-disabled | #getDownDisabledFace() |
face shown when button is down and disabled | down |
UiBinder
templates, you
can set text and assign ImageResources for their various faces via
child elements:
image
attribute
and an html body. For example:
<ui:image field='downButton'/> <!-- define an ImageResource
-->
<g:PushButton ui:field='pushButton' enabled='true'>
<g:upFace>
<b>click me</b>
</gwt:upFace>
<g:upHoveringFace>
<b>Click ME!</b>
</gwt:upHoveringFace>
<g:downFace image='{downButton}'/>
<g:downHoveringFace image='{downButton}'/>
</g:PushButton>
Copyright © 2018. All rights reserved.