Package library :: 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.InnerHTML --+        
                                       |        
                          object --+   |        
                                   |   |        
                 InnerText.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 ButtonBase.ButtonBase (private): _setWeirdProps

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

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

Inherited from Applier: applyValues, retrieveValues, setDefaults, setElementProperties, updateInstance

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

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

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

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

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

Inherited from Focus.FocusMixin: isEnabled, isReadonly, setReadonly

Class Methods [hide private]

Inherited from UIObject.UIObject (private): _getProps

Inherited from Applier (private): _getElementProps

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

Inherited from UIObject.UIObject (private): _props

Inherited from Applier (private): _elem_props

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