sk.uniba.euromath.editor
Interface IRendererFactory

All Known Implementing Classes:
ImageRendererFactory

public interface IRendererFactory

Produces renderer instances. Must be equal only to factory with same class. hashCode() must be implemented correctly aswell, to reflect this behaviour. In case of singleton factory, default Object's equals() and hashCode() is the correct implementation thus it is not needed to be overriden.

Author:
Martin Vysny

Field Summary
static String EXTENSION_POINT_ID
          ID of extension point for renderer factory instances.
 
Method Summary
 Map<String,RendererInfo> getSupportedRenderers()
          Returns map that maps ID of an renderer to the information about that renderer.
 IRenderer produce(String id)
          Produces an instance of renderer denoted by given ID.
 

Field Detail

EXTENSION_POINT_ID

static final String EXTENSION_POINT_ID
ID of extension point for renderer factory instances.

See Also:
Constant Field Values
Method Detail

produce

IRenderer produce(String id)
                  throws EditorException
Produces an instance of renderer denoted by given ID.

Parameters:
id - id of the renderer.
Returns:
renderer instance.
Throws:
EditorException - if error occurs during renderer creation.
IllegalArgumentException - if id is not known.

getSupportedRenderers

Map<String,RendererInfo> getSupportedRenderers()
                                               throws EditorException
Returns map that maps ID of an renderer to the information about that renderer.

Returns:
maps ID to info about the renderer. Factory should compute this map only once - it won't get modified.
Throws:
EditorException - if problem occurs.


Copyright © 2003-2006 null. All Rights Reserved.