sk.uniba.euromath.editor
Class RendererSelector

java.lang.Object
  extended by sk.uniba.euromath.editor.RendererSelector

public final class RendererSelector
extends Object

Selects preferred renderers.

Author:
Martin Vysny

Constructor Summary
RendererSelector()
          Creates new empty selector, with no preferred renderers.
RendererSelector(RendererSelector other)
          Clones given selector.
 
Method Summary
protected  Map<String,RendererInfo> getPreferredRenderers()
           
 Map<String,EnumSet<SourceEnum>> getRenderable()
          Computes and returns information about renderable namespaces.
 RendererInfo getRendererInfo(String namespace, EnumSet<ResultEnum> products)
          Retrieves the renderer that will be used to renderer document with given namespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RendererSelector

public RendererSelector()
Creates new empty selector, with no preferred renderers.


RendererSelector

public RendererSelector(RendererSelector other)
Clones given selector.

Parameters:
other - the selector to clone.
Method Detail

getRenderable

public Map<String,EnumSet<SourceEnum>> getRenderable()
Computes and returns information about renderable namespaces.

Returns:
map mapping namespace URI to a set of source kinds, in which the namespace is accepted.

getRendererInfo

public RendererInfo getRendererInfo(String namespace,
                                    EnumSet<ResultEnum> products)
                             throws EditorException
Retrieves the renderer that will be used to renderer document with given namespace.

Parameters:
namespace - the nametree namespace.
products - in which kinds of sources the document can be provided.
Returns:
rendererinfo instance, never null.
Throws:
EditorException - if no renderer is suitable for given namespace.

getPreferredRenderers

protected Map<String,RendererInfo> getPreferredRenderers()
Returns:
Returns the preferredRenderers.


Copyright © 2003-2006 null. All Rights Reserved.