com.ephox.editlive.ephoxaction.filter
Class OrEnabledFilter

java.lang.Object
  extended by com.ephox.editlive.ephoxaction.filter.OrEnabledFilter
All Implemented Interfaces:
EnabledFilter

public class OrEnabledFilter
extends Object
implements EnabledFilter

Combines two filters, enabling when either is enabled (EphoxAction normally only enables when all filters are enabled).

Since:
7.5

Constructor Summary
OrEnabledFilter(EnabledFilter firstFilter, EnabledFilter secondFilter)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Add a property change listener which must be notified when the enabled state of this filter changes.
 EnabledFilter getFirstFilter()
           
 EnabledFilter getSecondFilter()
           
 boolean isEnabled()
          Calculate whether or not this filter will allow the action to be enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrEnabledFilter

public OrEnabledFilter(EnabledFilter firstFilter,
                       EnabledFilter secondFilter)
Method Detail

getFirstFilter

public EnabledFilter getFirstFilter()

getSecondFilter

public EnabledFilter getSecondFilter()

isEnabled

public boolean isEnabled()
Description copied from interface: EnabledFilter
Calculate whether or not this filter will allow the action to be enabled. If any EnabledFilter for an action returns false the action is disabled.

Specified by:
isEnabled in interface EnabledFilter
Returns:
true if this filter allows the action to be enabled, otherwise returns false.

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Description copied from interface: EnabledFilter
Add a property change listener which must be notified when the enabled state of this filter changes.

Specified by:
addPropertyChangeListener in interface EnabledFilter
Parameters:
listener - the listener to add.

Copyright (c) 2005-2012 Ephox Pty Ltd. All rights reserved.