Package muntjac :: Package ui :: Module abstract_layout :: Class AbstractLayout
[hide private]
[frames] | no frames]

Class AbstractLayout

source code

                             object --+                    
                                      |                    
                    util.IEventListener --+                
                                          |                
              terminal.paintable.IPaintable --+            
                                              |            
                                 object --+   |            
                                          |   |            
     terminal.variable_owner.IVariableOwner --+            
                                              |            
                                 object --+   |            
                                          |   |            
                terminal.sizeable.ISizeable --+            
                                              |            
                           component.IComponent --+        
                                                  |        
                                     object --+   |        
                                              |   |        
   event.method_event_source.IMethodEventSource --+        
                                                  |        
               abstract_component.AbstractComponent --+    
                                                      |    
                             object --+               |    
                                      |               |    
                    util.IEventListener --+           |    
                                          |           |    
              terminal.paintable.IPaintable --+       |    
                                              |       |    
                                 object --+   |       |    
                                          |   |       |    
     terminal.variable_owner.IVariableOwner --+       |    
                                              |       |    
                                 object --+   |       |    
                                          |   |       |    
                terminal.sizeable.ISizeable --+       |    
                                              |       |    
                           component.IComponent --+   |    
                                                  |   |    
            component_container.IComponentContainer --+    
                                                      |    
abstract_component_container.AbstractComponentContainer --+
                                                          |
                             object --+                   |
                                      |                   |
                    util.IEventListener --+               |
                                          |               |
              terminal.paintable.IPaintable --+           |
                                              |           |
                                 object --+   |           |
                                          |   |           |
     terminal.variable_owner.IVariableOwner --+           |
                                              |           |
                                 object --+   |           |
                                          |   |           |
                terminal.sizeable.ISizeable --+           |
                                              |           |
                           component.IComponent --+       |
                                                  |       |
            component_container.IComponentContainer --+   |
                                                      |   |
                                         layout.ILayout --+
                                                          |
                                             object --+   |
                                                      |   |
                                  layout.IMarginHandler --+
                                                          |
                                                         AbstractLayout
Known Subclasses:

An abstract class that defines default implementation for the ILayout interface.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self)
Constructs a new component container.
source code
 
setMargin(self, *args)
Enable layout margins.
source code
 
getMargin(self)
Returns: MarginInfo containing the currently enabled margins.
source code
 
paintContent(self, target)
Paints any needed component-specific things to the given UIDL stream.
source code
 
changeVariables(self, source, variables)
Called when one or more variables handled by the implementing class are changed.
source code
 
fireClick(self, parameters)
Fire a layout click event.
source code

Inherited from abstract_component_container.AbstractComponentContainer: addCallback, addComponent, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, getInvalidSizedChildren, moveComponentsFrom, removeAllComponents, removeCallback, removeComponent, removeListener, repaintChangedChildTrees, repaintChildTrees, requestRepaintAll, setEnabled, setHeight, setWidth

Inherited from abstract_component.AbstractComponent: __getstate__, __setstate__, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, fireRequestRepaintEvent, focus, getApplication, getCSSHeight, getCSSWidth, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isReadOnly, isVisible, paint, parseStringSize, registerCallback, registerListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setErrorHandler, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidthUnits, withdrawCallback, withdrawListener

Inherited from component_container.IComponentContainer: getComponentIterator, replaceComponent

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

Class Variables [hide private]
  _CLICK_EVENT = 'layout_click'

Inherited from abstract_component.AbstractComponent: SIZE_PATTERN

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]

__init__(self)
(Constructor)

source code 

Constructs a new component container.

Overrides: object.__init__
(inherited documentation)

setMargin(self, *args)

source code 

Enable layout margins. Affects all four sides of the layout. This will tell the client-side implementation to leave extra space around the layout. The client-side implementation decides the actual amount, and it can vary between themes.

Alternatively, enable specific layout margins. This will tell the client-side implementation to leave extra space around the layout in specified edges, clockwise from top (top, right, bottom, left). The client-side implementation decides the actual amount, and it can vary between themes.

Parameters:
  • args - tuple of the form
    • (enabled)
    • (top, right, bottom, left)
Overrides: layout.IMarginHandler.setMargin
(inherited documentation)

getMargin(self)

source code 
Returns:
MarginInfo containing the currently enabled margins.
Overrides: layout.IMarginHandler.getMargin
(inherited documentation)

paintContent(self, target)

source code 

Paints any needed component-specific things to the given UIDL stream. The more general paint method handles all general attributes common to all components, and it calls this method to paint any component-specific attributes to the UIDL stream.

Parameters:
  • target - the target UIDL stream where the component should paint itself to
Raises:
Overrides: abstract_component.AbstractComponent.paintContent
(inherited documentation)

changeVariables(self, source, variables)

source code 

Called when one or more variables handled by the implementing class are changed.

Parameters:
  • source - the Source of the variable change. This is the origin of the event. For example in Web Adapter this is the request.
  • variables - the Mapping from variable names to new variable values.
Overrides: terminal.variable_owner.IVariableOwner.changeVariables
(inherited documentation)

fireClick(self, parameters)

source code 

Fire a layout click event.

Note that this method is only used by the subclasses that implement LayoutClickNotifier, and can be overridden for custom click event firing.

Parameters:
  • parameters - The parameters received from the client side implementation