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

Class UIObject

source code

UIObject is the base class for user interface objects.

Instance Methods [hide private]
 
getAbsoluteLeft(self) source code
 
getAbsoluteTop(self) source code
 
getElement(self)
Get the DOM element associated with the UIObject, if any
source code
 
getOffsetHeight(self) source code
 
getOffsetWidth(self) source code
 
getStyleName(self) source code
 
getTitle(self) source code
 
setElement(self, element)
Set the DOM element associated with the UIObject.
source code
 
setHeight(self, height)
Set the height of the element associated with this UIObject.
source code
 
setPixelSize(self, width, height)
Set the width and height of the element associated with this UIObject in pixels.
source code
 
setSize(self, width, height)
Set the width and height of the element associated with this UIObject.
source code
 
addStyleName(self, style)
Append a style to the element associated with this UIObject.
source code
 
removeStyleName(self, style)
Remove a style from the element associated with this UIObject.
source code
 
setStyleName(self, element, style=None, add=True)
When called with a single argument, this replaces all the CSS classes associated with this UIObject's element with the given parameter.
source code
 
setTitle(self, title) source code
 
setzIndex(self, index) source code
 
setWidth(self, width)
Set the width of the element associated with this UIObject.
source code
 
sinkEvents(self, eventBitsToAdd)
Request that the given events be delivered to the event handler for this element.
source code
 
isVisible(self, element=None)
Determine whether this element is currently visible, by checking the CSS property 'display'
source code
 
setVisible(self, element, visible=None)
Set whether this element is visible or not.
source code
 
unsinkEvents(self, eventBitsToRemove)
Reverse the operation of sinkEvents.
source code
Method Details [hide private]

setHeight(self, height)

source code 

Set the height of the element associated with this UIObject. The value should be given as a CSS value, such as 100px, 30%, or 50pi

setPixelSize(self, width, height)

source code 

Set the width and height of the element associated with this UIObject in pixels. Width and height should be numbers.

setSize(self, width, height)

source code 

Set the width and height of the element associated with this UIObject. The values should be given as a CSS value, such as 100px, 30%, or 50pi

addStyleName(self, style)

source code 

Append a style to the element associated with this UIObject. This is a CSS class name. It will be added after any already-assigned CSS class for the element.

removeStyleName(self, style)

source code 

Remove a style from the element associated with this UIObject. This is a CSS class name.

setStyleName(self, element, style=None, add=True)

source code 

When called with a single argument, this replaces all the CSS classes associated with this UIObject's element with the given parameter. Otherwise, this is assumed to be a worker function for addStyleName and removeStyleName.

setWidth(self, width)

source code 

Set the width of the element associated with this UIObject. The value should be given as a CSS value, such as 100px, 30%, or 50pi

sinkEvents(self, eventBitsToAdd)

source code 

Request that the given events be delivered to the event handler for this element. The event bits passed are added (using inclusive OR) to the events already "sunk" for the element associated with the UIObject. The event bits are a combination of values from class Event.

setVisible(self, element, visible=None)

source code 

Set whether this element is visible or not. If a single parameter is given, the self.element is used. This modifies the CSS property 'display', which means that an invisible element not only is not drawn, but doesn't occupy any space on the page.

unsinkEvents(self, eventBitsToRemove)

source code 

Reverse the operation of sinkEvents. See UIObject.sinkEvents.