Package muntjac :: Package ui :: Module component_container :: Class IComponentContainer
[hide private]
[frames] | no frames]

Class IComponentContainer

source code

                        object --+            
                                 |            
               util.IEventListener --+        
                                     |        
         terminal.paintable.IPaintable --+    
                                         |    
                            object --+   |    
                                     |   |    
terminal.variable_owner.IVariableOwner --+    
                                         |    
                            object --+   |    
                                     |   |    
           terminal.sizeable.ISizeable --+    
                                         |    
                      component.IComponent --+
                                             |
                                            IComponentContainer
Known Subclasses:

Extension to the IComponent interface which adds to it the capacity to contain other components. All UI elements that can have child elements implement this interface.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
addComponent(self, c)
Adds the component into this container.
source code
 
removeComponent(self, c)
Removes the component from this container.
source code
 
removeAllComponents(self)
Removes all components from this container.
source code
 
replaceComponent(self, oldComponent, newComponent)
Replaces the component in the container with another one without changing position.
source code
 
getComponentIterator(self)
Gets an iterator to the collection of contained components.
source code
 
requestRepaintAll(self)
Causes a repaint of this component, and all components below it.
source code
 
moveComponentsFrom(self, source)
Moves all components from an another container into this container.
source code
 
addListener(self, listener, iface=None)
Listens the component attach/detach events.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Stops the listening component attach/detach events.
source code
 
removeCallback(self, callback, eventType=None) source code

Inherited from component.IComponent: addStyleName, attach, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeStyleName, setCaption, setEnabled, setIcon, setParent, setReadOnly, setStyleName, setVisible

Inherited from terminal.paintable.IPaintable: getDebugId, paint, requestRepaint, requestRepaintRequests, setDebugId

Inherited from terminal.variable_owner.IVariableOwner: changeVariables, isImmediate

Inherited from terminal.sizeable.ISizeable: getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeightUnits, setSizeFull, setSizeUndefined, setWidth, setWidthUnits

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

Class Variables [hide private]

Inherited from terminal.sizeable.ISizeable: SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS, UNIT_SYMBOLS

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

addComponent(self, c)

source code 

Adds the component into this container.

Parameters:
  • c - the component to be added.

removeComponent(self, c)

source code 

Removes the component from this container.

Parameters:
  • c - the component to be removed.

replaceComponent(self, oldComponent, newComponent)

source code 

Replaces the component in the container with another one without changing position.

This method replaces component with another one is such way that the new component overtakes the position of the old component. If the old component is not in the container, the new component is added to the container. If the both component are already in the container, their positions are swapped. IComponent attach and detach events should be taken care as with add and remove.

Parameters:
  • oldComponent - the old component that will be replaced.
  • newComponent - the new component to be replaced.

getComponentIterator(self)

source code 

Gets an iterator to the collection of contained components. Using this iterator it is possible to step through all components contained in this container.

Returns:
the component iterator.

requestRepaintAll(self)

source code 

Causes a repaint of this component, and all components below it.

This should only be used in special cases, e.g when the state of a descendant depends on the state of a ancestor.

moveComponentsFrom(self, source)

source code 

Moves all components from an another container into this container. The components are removed from source.

Parameters:
  • source - the container which contains the components that are to be moved to this container.

addListener(self, listener, iface=None)

source code 

Listens the component attach/detach events.

Parameters:
  • listener - the listener to add.
Overrides: terminal.paintable.IPaintable.addListener

addCallback(self, callback, eventType=None, *args)

source code 
Overrides: terminal.paintable.IPaintable.addCallback

removeListener(self, listener, iface=None)

source code 

Stops the listening component attach/detach events.

Parameters:
  • listener - the listener to removed.
Overrides: terminal.paintable.IPaintable.removeListener

removeCallback(self, callback, eventType=None)

source code 
Overrides: terminal.paintable.IPaintable.removeCallback