org.graffiti.plugin.tool
Interface ToolFactory


public interface ToolFactory

Classes implementing ToolFactory know how to create tools.

Version:
$Revision$ $Date$
Author:
Andreas Gleißner

Method Summary
 boolean acceptsViewFamily(ViewFamily<?> viewFamily)
          Returns if this factory can create tools that support the specified view family.
<T extends InteractiveView<T>>
Tool<T>
create(String id, ViewFamily<T> viewFamily)
          Creates a new tool with the specified id for the specified view family.
 String getId()
           
 

Method Detail

getId

String getId()
Returns:
the id of this factory. Different instances of ToolFactory must return different ids.

create

<T extends InteractiveView<T>> Tool<T> create(String id,
                                              ViewFamily<T> viewFamily)
Creates a new tool with the specified id for the specified view family.

Type Parameters:
T - the superclass of all views belonging to the specified view family.
Parameters:
id - the id of the tool to create.
viewFamily - the view family that is supported by the tool to create.
Returns:
a new tool with the specified id for the specified view family.

acceptsViewFamily

boolean acceptsViewFamily(ViewFamily<?> viewFamily)
Returns if this factory can create tools that support the specified view family.

Parameters:
viewFamily - the view family in question.
Returns:
true iff this factory can create tools that support the specified view family.


Generated at 2012-05-30 11:00:36 PM CEST