Package muntjac :: Package ui :: Module popup_view :: Class PopupView
[hide private]
[frames] | no frames]

Class PopupView

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 --+
                                                          |
                                                         PopupView

A component for displaying a two different views to data. The minimized view is normally used to render the component, and when it is clicked the full view is displayed on a popup. The class popup_view.IContent is used to deliver contents to this component.


Authors:
Vaadin Ltd., Richard Lincoln
Instance Methods [hide private]
 
__init__(self, *args)
A simple way to create a PopupPanel.
source code
 
setContent(self, newContent)
This method will replace the current content of the panel with a new one.
source code
 
getContent(self)
Returns the content-package for this PopupView.
source code
 
setPopupVisibility(self, visible) source code
 
getPopupVisibility(self) source code
 
setPopupVisible(self, visible)
Set the visibility of the popup.
source code
 
isPopupVisible(self)
Return whether the popup is visible.
source code
 
isHideOnMouseOut(self)
Check if this popup will be hidden when the user takes the mouse cursor out of the popup area.
source code
 
setHideOnMouseOut(self, hideOnMouseOut)
Should the popup automatically hide when the user takes the mouse cursor out of the popup area? If this is false, the user must click outside the popup to close it.
source code
 
getComponentIterator(self)
This class only contains other components when the popup is showing.
source code
 
getComponentCount(self)
Gets the number of contained components.
source code
 
removeAllComponents(self)
Not supported in this implementation.
source code
 
moveComponentsFrom(self, source)
Not supported in this implementation.
source code
 
addComponent(self, c)
Not supported in this implementation.
source code
 
replaceComponent(self, oldComponent, newComponent)
Not supported in this implementation.
source code
 
removeComponent(self, c)
Not supported in this implementation
source code
 
paintContent(self, target)
Paint (serialize) the component for the client.
source code
 
changeVariables(self, source, variables)
Deserialize changes received from client.
source code
 
addListener(self, listener, iface=None)
Add a listener that is called whenever the visibility of the popup is changed.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Removes a previously added listener, so that it no longer receives events when the visibility of the popup changes.
source code
 
removeCallback(self, callback, eventType=None) source code

Inherited from abstract_component_container.AbstractComponentContainer: attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, getInvalidSizedChildren, 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]
  CLIENT_WIDGET = None
hash(x)

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

Instance Variables [hide private]
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args)
(Constructor)

source code 

A simple way to create a PopupPanel. Note that the minimal representation may not be dynamically updated.

Alternatively, creates a PopupView through the IContent interface. This allows the creator to dynamically change the contents of the PopupView.

Parameters:
  • args - tuple of the form
    • (small, large)
      1. the minimal textual representation as HTML
      2. the full, Component-type representation
    • (content)
      1. the IContent that contains the information for this
Overrides: object.__init__

setContent(self, newContent)

source code 

This method will replace the current content of the panel with a new one.

Parameters:
  • newContent - IContent object containing new information for the PopupView
Raises:
  • ValueError - if the method is passed a null value, or if one of the content methods returns null

getContent(self)

source code 

Returns the content-package for this PopupView.

Returns:
the IContent for this object or null

setPopupVisibility(self, visible)

source code 

Deprecated: Use setPopupVisible instead.

getPopupVisibility(self)

source code 

Deprecated: Use isPopupVisible instead.

setPopupVisible(self, visible)

source code 

Set the visibility of the popup. Does not hide the minimal representation.

isPopupVisible(self)

source code 

Return whether the popup is visible.

Returns:
true if the popup is showing

isHideOnMouseOut(self)

source code 

Check if this popup will be hidden when the user takes the mouse cursor out of the popup area.

Returns:
true if the popup is hidden on mouse out, false otherwise

setHideOnMouseOut(self, hideOnMouseOut)

source code 

Should the popup automatically hide when the user takes the mouse cursor out of the popup area? If this is false, the user must click outside the popup to close it. The default is true.

getComponentIterator(self)

source code 

This class only contains other components when the popup is showing.

Returns:
the component iterator.
Overrides: component_container.IComponentContainer.getComponentIterator

See Also: ComponentContainer.getComponentIterator

getComponentCount(self)

source code 

Gets the number of contained components. Consistent with the iterator returned by getComponentIterator.

Returns:
the number of contained components (zero or one)

removeAllComponents(self)

source code 

Not supported in this implementation.

Raises:
  • NotImplementedError
Overrides: component_container.IComponentContainer.removeAllComponents

moveComponentsFrom(self, source)

source code 

Not supported in this implementation.

Parameters:
  • source - the container which contains the components that are to be moved to this container.
Raises:
  • NotImplementedError
Overrides: component_container.IComponentContainer.moveComponentsFrom

addComponent(self, c)

source code 

Not supported in this implementation.

Parameters:
  • c - the component to be added.
Raises:
  • NotImplementedError
Overrides: component_container.IComponentContainer.addComponent

replaceComponent(self, oldComponent, newComponent)

source code 

Not supported in this implementation.

Parameters:
  • oldComponent - the old component that will be replaced.
  • newComponent - the new component to be replaced.
Raises:
  • NotImplementedError
Overrides: component_container.IComponentContainer.replaceComponent

See Also: ComponentContainer.replaceComponent

removeComponent(self, c)

source code 

Not supported in this implementation

Parameters:
  • c - the component to be removed.
Overrides: component_container.IComponentContainer.removeComponent

paintContent(self, target)

source code 

Paint (serialize) the component for the client.

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

changeVariables(self, source, variables)

source code 

Deserialize changes received from client.

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

addListener(self, listener, iface=None)

source code 

Add a listener that is called whenever the visibility of the popup is changed.

Parameters:
  • listener - the listener to add
Raises:
  • ValueError - unless method has a match in object
Overrides: event.method_event_source.IMethodEventSource.addListener

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

source code 
Overrides: terminal.paintable.IPaintable.addCallback

removeListener(self, listener, iface=None)

source code 

Removes a previously added listener, so that it no longer receives events when the visibility of the popup changes.

Parameters:
  • listener - the listener to remove
Overrides: event.method_event_source.IMethodEventSource.removeListener

removeCallback(self, callback, eventType=None)

source code 
Overrides: terminal.paintable.IPaintable.removeCallback