Package pyjamas :: Package ui :: Module CustomButton
[hide private]
[frames] | no frames]

Module CustomButton

source code

Custom Button is a base button class with built in support for a set number of button faces.

Each face has its own style modifier. For example, the state for down and hovering is assigned the CSS modifier down-hovering. So, if the button's overall style name is gwt-PushButton then when showing the 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 | Getter method | description of face | delegateTo -------------+---------------------+---------------------------+--------- up |getUpFace() |button is up |none down |getDownFace() |button is down | up up-hovering |getUpHoveringFace() |button is up and hovering | up up-disabled |getUpDisabledFace() |button is up and disabled | up down-hovering|getDownHoveringFace()|button is down and hovering|down down-disabled|getDownDisabledFace()|button is down and disabled|down

Classes [hide private]
  Face
  CustomButton
Represents a button's face.