Package muntjac :: Package ui :: Module embedded :: Class Embedded
[hide private]
[frames] | no frames]

Class Embedded

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

Component for embedding external objects.


Authors:
Vaadin Ltd., Richard Lincoln

Version: 1.1.2

Instance Methods [hide private]
 
__init__(self, caption=None, source=None)
Creates a new Embedded object whose contents is loaded from given resource.
source code
 
paintContent(self, target)
Invoked when the component state should be painted.
source code
 
setParameter(self, name, value)
Sets an object parameter.
source code
 
getParameter(self, name)
Gets the value of an object parameter.
source code
 
removeParameter(self, name)
Removes an object parameter from the list.
source code
 
getParameterNames(self)
Gets the embedded object parameter names.
source code
 
getCodebase(self)
This attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes.
source code
 
getCodetype(self)
Gets the MIME-Type of the code.
source code
 
getMimeType(self)
Gets the MIME-Type of the object.
source code
 
getStandby(self)
This attribute specifies a message that a user agent may render while loading the object's implementation and data.
source code
 
setCodebase(self, codebase)
This attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes.
source code
 
setCodetype(self, codetype)
This attribute specifies the content type of data expected when downloading the object specified by classid.
source code
 
setMimeType(self, mimeType)
Sets the mimeType, the MIME-Type of the object.
source code
 
setStandby(self, standby)
This attribute specifies a message that a user agent may render while loading the object's implementation and data.
source code
 
getClassId(self)
This attribute may be used to specify the location of an object's implementation via a URI.
source code
 
setClassId(self, classId)
This attribute may be used to specify the location of an object's implementation via a URI.
source code
 
getSource(self)
Gets the resource contained in the embedded object.
source code
 
getType(self)
Gets the type of the embedded object.
source code
 
setSource(self, source)
Sets the object source resource.
source code
 
setType(self, typ)
Sets the object type.
source code
 
getArchive(self)
This attribute may be used to specify a space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes.
source code
 
setArchive(self, archive)
This attribute may be used to specify a space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes.
source code
 
addListener(self, listener, iface=None)
Add a click listener to the component.
source code
 
addCallback(self, callback, eventType=None, *args) source code
 
removeListener(self, listener, iface=None)
Remove a click listener from the component.
source code
 
removeCallback(self, callback, eventType=None) source code
 
changeVariables(self, source, variables)
Called when one or more variables handled by the implementing class are changed.
source code
 
fireClick(self, parameters)
Notifies click-listeners that a mouse click event has occurred.
source code

Inherited from abstract_component.AbstractComponent: __getstate__, __setstate__, addStyleName, attach, childRequestedRepaint, detach, 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, setEnabled, setErrorHandler, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, 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)
  _CLICK_EVENT = 'click'
  TYPE_OBJECT = 0
  TYPE_IMAGE = 1
  TYPE_BROWSER = 2

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, caption=None, source=None)
(Constructor)

source code 

Creates a new Embedded object whose contents is loaded from given resource. The dimensions are assumed if possible. The type is guessed from resource.

Parameters:
  • caption
  • source - the Source of the embedded object.
Overrides: object.__init__

paintContent(self, target)

source code 

Invoked when the component state should be painted.

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

setParameter(self, name, value)

source code 

Sets an object parameter. Parameters are optional information, and they are passed to the instantiated object. Parameters are are stored as name value pairs. This overrides the previous value assigned to this parameter.

Parameters:
  • name - the name of the parameter.
  • value - the value of the parameter.

getParameter(self, name)

source code 

Gets the value of an object parameter. Parameters are optional information, and they are passed to the instantiated object. Parameters are are stored as name value pairs.

Returns:
the Value of parameter or null if not found.

removeParameter(self, name)

source code 

Removes an object parameter from the list.

Parameters:
  • name - the name of the parameter to remove.

getParameterNames(self)

source code 

Gets the embedded object parameter names.

Returns:
the Iterator of parameters names.

getCodebase(self)

source code 

This attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes. When absent, its default value is the base URI of the current document.

Returns:
the code base.

getCodetype(self)

source code 

Gets the MIME-Type of the code.

Returns:
the MIME-Type of the code.

getMimeType(self)

source code 

Gets the MIME-Type of the object.

Returns:
the MIME-Type of the object.

getStandby(self)

source code 

This attribute specifies a message that a user agent may render while loading the object's implementation and data.

Returns:
The text displayed when loading

setCodebase(self, codebase)

source code 

This attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes. When absent, its default value is the base URI of the current document.

Parameters:
  • codebase - The base path

setCodetype(self, codetype)

source code 

This attribute specifies the content type of data expected when downloading the object specified by classid. This attribute is optional but recommended when classid is specified since it allows the user agent to avoid loading information for unsupported content types. When absent, it defaults to the value of the type attribute.

Parameters:
  • codetype - the codetype to set.

setMimeType(self, mimeType)

source code 

Sets the mimeType, the MIME-Type of the object.

Parameters:
  • mimeType - the mimeType to set.

setStandby(self, standby)

source code 

This attribute specifies a message that a user agent may render while loading the object's implementation and data.

Parameters:
  • standby - The text to display while loading

getClassId(self)

source code 

This attribute may be used to specify the location of an object's implementation via a URI.

Returns:
the classid.

setClassId(self, classId)

source code 

This attribute may be used to specify the location of an object's implementation via a URI.

Parameters:
  • classId - the classId to set.

getSource(self)

source code 

Gets the resource contained in the embedded object.

Returns:
the Resource

getType(self)

source code 

Gets the type of the embedded object.

This can be one of the following:

  • TYPE_OBJECT (This is the default)
  • TYPE_IMAGE
Returns:
the type.

setSource(self, source)

source code 

Sets the object source resource. The dimensions are assumed if possible. The type is guessed from resource.

Parameters:
  • source - the source to set.

setType(self, typ)

source code 

Sets the object type.

This can be one of the following:

  • TYPE_OBJECT (This is the default)
  • TYPE_IMAGE
  • TYPE_BROWSER
Parameters:
  • typ - the type to set.

getArchive(self)

source code 

This attribute may be used to specify a space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes. Preloading archives will generally result in reduced load times for objects. Archives specified as relative URIs should be interpreted relative to the codebase attribute.

Returns:
Space-separated list of URIs with resources relevant to the object

setArchive(self, archive)

source code 

This attribute may be used to specify a space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes. Preloading archives will generally result in reduced load times for objects. Archives specified as relative URIs should be interpreted relative to the codebase attribute.

Parameters:
  • archive - Space-separated list of URIs with resources relevant to the object

addListener(self, listener, iface=None)

source code 

Add a click listener to the component. The listener is called whenever the user clicks inside the component. Depending on the content the event may be blocked and in that case no event is fired.

Use removeListener to remove the listener.

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 

Remove a click listener from the component. The listener should earlier have been added using addListener.

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

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)