Package muntjac :: Package ui :: Module expand_layout :: Class ExpandLayout
[hide private]
[frames] | no frames]

Class ExpandLayout

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 --+            
                                                          |            
                             abstract_layout.AbstractLayout --+        
                                                              |        
                                                 object --+   |        
                                                          |   |        
                                   layout.IAlignmentHandler --+        
                                                              |        
                                                 object --+   |        
                                                          |   |        
                                     layout.ISpacingHandler --+        
                                                              |        
                                                 object --+   |        
                                                          |   |        
                   event.layout_events.ILayoutClickNotifier --+        
                                                              |        
                  abstract_ordered_layout.AbstractOrderedLayout --+    
                                                                  |    
                                       ordered_layout.OrderedLayout --+
                                                                      |
                                                                     ExpandLayout

A layout that will give one of it's components as much space as possible, while still showing the other components in the layout. The other components will in effect be given a fixed sized space, while the space given to the expanded component will grow/shrink to fill the rest of the space available - for instance when re-sizing the window.

Note that this layout is 100% in both directions by default (setSizeFull). Remember to set the units if you want to specify a fixed size. If the layout fails to show up, check that the parent layout is actually giving some space.


Deprecated: Deprecated in favor of the new OrderedLayout

Instance Methods [hide private]
 
__init__(self, orientation=None)
Creates a new ordered layout.
source code
 
expand(self, c) source code
 
addComponent(self, c, index=None)
Add a component into this container.
source code
 
addComponentAsFirst(self, c)
Adds a component into this container.
source code
 
removeComponent(self, c)
Removes the component from this container.
source code
 
replaceComponent(self, oldComponent, newComponent)
Replaces the component in the container with another one without changing position.
source code

Inherited from ordered_layout.OrderedLayout: getOrientation, paintContent, setOrientation

Inherited from abstract_ordered_layout.AbstractOrderedLayout: addCallback, addListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getComponentIterator, getExpandRatio, isSpacing, isSpacingEnabled, removeCallback, removeListener, setComponentAlignment, setExpandRatio, setSpacing

Inherited from abstract_layout.AbstractLayout: changeVariables, fireClick, getMargin, setMargin

Inherited from abstract_component_container.AbstractComponentContainer: attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, getInvalidSizedChildren, moveComponentsFrom, removeAllComponents, 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 object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from ordered_layout.OrderedLayout: CLIENT_WIDGET, ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL

Inherited from abstract_ordered_layout.AbstractOrderedLayout: ALIGNMENT_DEFAULT

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

Inherited from layout.IAlignmentHandler: ALIGNMENT_BOTTOM, ALIGNMENT_HORIZONTAL_CENTER, ALIGNMENT_LEFT, ALIGNMENT_RIGHT, ALIGNMENT_TOP, ALIGNMENT_VERTICAL_CENTER

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, orientation=None)
(Constructor)

source code 

Creates a new ordered layout. The order of the layout defaults to ORIENTATION_VERTICAL.

Parameters:
  • orientation - the Orientation of the layout.
Overrides: object.__init__
(inherited documentation)

expand(self, c)

source code 
Parameters:
  • c - Component which container will be maximized

addComponent(self, c, index=None)

source code 

Add a component into this container. The component is added to the right or under the previous component or into the indexed position in this container.

Parameters:
  • c - the component to be added.
  • index - the Index of the component position. The components currently in and after the position are shifted forwards.
Overrides: component_container.IComponentContainer.addComponent
(inherited documentation)

addComponentAsFirst(self, c)

source code 

Adds a component into this container. The component is added to the left or on top of the other components.

Parameters:
  • c - the component to be added.
Overrides: abstract_ordered_layout.AbstractOrderedLayout.addComponentAsFirst
(inherited documentation)

removeComponent(self, c)

source code 

Removes the component from this container.

Parameters:
  • c - the component to be removed.
Overrides: component_container.IComponentContainer.removeComponent
(inherited documentation)

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.
Overrides: component_container.IComponentContainer.replaceComponent
(inherited documentation)