|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ephox.editlive.ephoxaction.filter.GenericEnabledFilter
public class GenericEnabledFilter
Automatically enables and disables based on listening for TextEvent
events.
NOTE: Must be manually registered as a listener on EventBroadcaster
.
Field Summary | |
---|---|
int |
_disableEvent
The event that triggers this filter to be disabled. |
int |
_enableEvent
The event that triggers this filter to be enabled. |
Constructor Summary | |
---|---|
GenericEnabledFilter(int enableEvent,
int disableEvent,
boolean initialState)
Creates a new GenericEnabledFilter. |
|
GenericEnabledFilter(int event,
String enableValue,
String disableValue,
boolean initialState)
Creates a new GenericEnabledFilter which only uses one event, instead looking at the extra object value to decide when to enable and disable. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener which must be notified when the enabled state of this filter changes. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
boolean |
isEnabled()
The current state of the filter. |
void |
raiseEvent(TextEvent e)
Method used to listen for events raised by EditLive!. |
void |
setEnabled(boolean isEnabled)
Set whether or not the filter is enabled. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final int _enableEvent
public final int _disableEvent
Constructor Detail |
---|
public GenericEnabledFilter(int enableEvent, int disableEvent, boolean initialState)
enableEvent
- the TextEvent
that indicates the filter should be enabled.disableEvent
- the TextEvent
that indicates the filter should be disabled.initialState
- the initial state of this filter.public GenericEnabledFilter(int event, String enableValue, String disableValue, boolean initialState)
event
- the TextEvent
that the filter should listen to.enableValue
- the event value required for the event to enable the filter.disableValue
- the event value required for the event to disable the filter.initialState
- the initial state of this filter.Method Detail |
---|
public final boolean isEnabled()
setEnabled(boolean)
to change the current state in order to notify property
change listeners.
isEnabled
in interface EnabledFilter
public void setEnabled(boolean isEnabled)
public void addPropertyChangeListener(PropertyChangeListener listener)
EnabledFilter
addPropertyChangeListener
in interface EnabledFilter
listener
- the listener to add.public void raiseEvent(TextEvent e)
EventListener
raiseEvent
in interface EventListener
e
- TextEvent to be parsed.public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
Copyright (c) 2005-2013 Ephox Pty Ltd. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |