org.graffiti.plugin.tool
Class NegatingToolFilter

java.lang.Object
  extended by org.graffiti.plugin.tool.NegatingToolFilter
All Implemented Interfaces:
ToolFilter

public class NegatingToolFilter
extends Object
implements ToolFilter

ToolFilter, which lets pass the complement of tools admitted by another tool filter.

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

Constructor Summary
NegatingToolFilter(ToolFilter filter)
          Constructs a ToolFilter, which negates the responses of the specified tool filter.
 
Method Summary
 boolean isVisible(Tool<?> tool)
          Returns if the specified tool shall be visible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegatingToolFilter

public NegatingToolFilter(ToolFilter filter)
Constructs a ToolFilter, which negates the responses of the specified tool filter.

Parameters:
filter - the ToolFilter, whose responses are to be negated by this tool filter.
Method Detail

isVisible

public boolean isVisible(Tool<?> tool)
Returns if the specified tool shall be visible. This implementation delegates the question to the contained tool filter and returns the negation of its response.

Specified by:
isVisible in interface ToolFilter
Parameters:
tool - the tool in question.
Returns:
true iff the specified tool shall be visible.


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