com :: MediaWidgetFactory :: MediaWidgetFactory :: Class MediaWidgetFactory
[hide private]
[frames] | no frames]

Class MediaWidgetFactory

       object --+        
                |        
Mediator.Mediator --+    
                    |    
  Component.Component --+
                        |
                       MediaWidgetFactory

Base class for media widget factory components. This component type is used by the MediaWidgetRegistry to create instances of media rendering widgets for handling MIME types.

The MediaWidgetRegistry queries all registered MediaWidgetFactories to find one that handles a certain MIME type. This factory will then produce the appropriate MediaWidget.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
get_mimetypes(self)
Returns a list of supported mimetypes.
 
get_widget_class(self, mimetype)
Returns the class of a MediaWidget handling the given MIME type.
 
__repr__(self)
Returns a string representation of this component. (Inherited from com.Mediator.Mediator)
 
_attach_to_message_bus(self) (Inherited from com.Mediator.Mediator)
 
call_service(self, svc, *args)
Calls the given service and returns the return value of the service. (Inherited from com.Mediator.Mediator)
 
drop_event(self) (Inherited from com.Mediator.Mediator)
 
emit_event(self, event, *args)
Emits the given message. (Inherited from com.Mediator.Mediator)
 
emit_message(self, msg, *args)
Emits the given message. (Inherited from com.Mediator.Mediator)
 
get_pass_type(self) (Inherited from com.Mediator.Mediator)
 
handle_message(self, msg, *args)
Gets invoked when a message arrives on the message bus. (Inherited from com.Mediator.Mediator)
 
pass_on_event(self) (Inherited from com.Mediator.Mediator)
 
set_pass_type(self, ptype) (Inherited from com.Mediator.Mediator)

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Class Variables [hide private]
  PASS_TYPE_DROP = 1 (Inherited from com.Mediator.Mediator)
  PASS_TYPE_INVALID = 0 (Inherited from com.Mediator.Mediator)
  PASS_TYPE_PASS_ON = 2 (Inherited from com.Mediator.Mediator)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

get_mimetypes(self)

 

Returns a list of supported mimetypes. '*' can be used as a wildcard in the form: image/*

Returns:
list of supported mimetypes

get_widget_class(self, mimetype)

 

Returns the class of a MediaWidget handling the given MIME type.

Parameters:
  • mimetype - MIME type
Returns:
class of appropriate MediaWidget