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

Class ToggleButton

source code

              object --+                        
                       |                        
                 Applier --+                    
                           |                    
           UIObject.UIObject --+                
                               |                
                   Widget.Widget --+            
                                   |            
      FocusListener.FocusHandler --+            
                                   |            
KeyboardListener.KeyboardHandler --+            
                                   |            
                      object --+   |            
                               |   |            
      MouseListener.MouseHandler --+            
                                   |            
                      object --+   |            
                               |   |            
      ClickListener.ClickHandler --+            
                                   |            
                Focus.FocusMixin --+            
                                   |            
             FocusWidget.FocusWidget --+        
                                       |        
                          object --+   |        
                                   |   |        
                           InnerHTML --+        
                                       |        
                          object --+   |        
                                   |   |        
                           InnerText --+        
                                       |        
                   ButtonBase.ButtonBase --+    
                                           |    
                   CustomButton.CustomButton --+
                                               |
                                              ToggleButton

A ToggleButton is a stylish stateful button which allows the user to toggle between UP and DOWN states.

CSS: .gwt-ToggleButton- up/down/up-hovering/down-hovering/up-disabled/down-disabled {.html-face}

Instance Methods [hide private]
 
__init__(self, upImageText=None, downImageText=None, handler=None, **kwargs)
Constructor for ToggleButton.
source code
 
onClick(self, sender=None)
Called when the user finishes clicking on this button.
source code

Inherited from CustomButton.CustomButton: cleanupCaptureState, createFace, finishSetup, fireClickListeners, fireEvent, getCurrentFace, getDownDisabledFace, getDownFace, getDownHoveringFace, getFaceFromID, getHTML, getTabIndex, getText, getUpDisabledFace, getUpFace, getUpHoveringFace, isDown, isHovering, onAttach, onBrowserEvent, onClickCancel, onClickStart, onDetach, setAccessKey, setAriaPressed, setCurrentFace, setCurrentFaceElement, setCurrentFaceFromID, setDown, setDownDisabledFace, setDownFace, setDownHoveringFace, setEnabled, setFocus, setHTML, setHovering, setTabIndex, setText, setUpDisabledFace, setUpFace, setUpHoveringFace, toggleDisabled, toggleDown, toggleHover, updateButtonFace

Inherited from Widget.Widget: doAttachChildren, doDetachChildren, getID, getLayoutData, getParent, isAttached, onLoad, removeFromParent, setContextMenu, setID, setLayoutData, setParent

Inherited from UIObject.UIObject: addStyleDependentName, addStyleName, getAbsoluteLeft, getAbsoluteTop, getElement, getHeight, getOffsetHeight, getOffsetWidth, getStyleName, getStylePrimaryName, getTitle, getWidth, isVisible, removeStyleDependentName, removeStyleName, setElement, setHeight, setPixelSize, setSize, setStyleName, setTitle, setVisible, setWidth, setzIndex, sinkEvents, unsinkEvents

Inherited from FocusListener.FocusHandler: addFocusListener, onFocus, onLostFocus, removeFocusListener

Inherited from KeyboardListener.KeyboardHandler: addKeyboardListener, onKeyDown, onKeyPress, onKeyUp, removeKeyboardListener

Inherited from MouseListener.MouseHandler: addMouseListener, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseUp, removeMouseListener

Inherited from ClickListener.ClickHandler: addClickListener, addDoubleClickListener, onDoubleClick, removeClickListener, removeDoubleClickListener

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Inherited from Focus.FocusMixin: isEnabled, isReadonly, setReadonly

Class Variables [hide private]
  STYLENAME_DEFAULT = "gwt-ToggleButton"

Inherited from CustomButton.CustomButton: DISABLED_ATTRIBUTE, DOWN, DOWN_ATTRIBUTE, DOWN_DISABLED, DOWN_HOVERING, HOVERING_ATTRIBUTE, UP, UP_DISABLED, UP_HOVERING

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, upImageText=None, downImageText=None, handler=None, **kwargs)
(Constructor)

source code 

Constructor for ToggleButton.

Overrides: object.__init__

onClick(self, sender=None)

source code 

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.

Overrides: ClickListener.ClickHandler.onClick