Package snap.view
Class EventAdapter
java.lang.Object
snap.view.EventAdapter
This class manages which node events are sent to which targets.
-
Field Summary
Modifier and TypeFieldDescriptionprotected EventListener[]
protected EventListener[]
protected Map<Object,
Set<ViewEvent.Type>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addFilter
(EventListener aLsnr, ViewEvent.Type... theTypes) Adds an event filter.void
addHandler
(EventListener aLsnr, ViewEvent.Type... theTypes) Adds an event handler.void
clear()
Clears the adapter.void
disableEvents
(Object aLsnr, ViewEvent.Type... theTypes) Called to unregister types for a listener.void
enableEvents
(Object aLsnr, ViewEvent.Type... theTypes) Called to register types for a listener.boolean
isEnabled
(ViewEvent.Type aType) Returns whether given type is enabled.void
removeFilter
(EventListener aLsnr, ViewEvent.Type... theTypes) Removes an event filter.void
removeHandler
(EventListener aLsnr, ViewEvent.Type... theTypes) Removes an event handler.void
setEnabled
(ViewEvent.Type aType, boolean aValue) Sets whether a given type is enabled.
-
Field Details
-
_filters
-
_handlers
-
_types
-
-
Constructor Details
-
EventAdapter
public EventAdapter()Constructor.
-
-
Method Details
-
addFilter
Adds an event filter. -
removeFilter
Removes an event filter. -
addHandler
Adds an event handler. -
removeHandler
Removes an event handler. -
enableEvents
Called to register types for a listener. -
disableEvents
Called to unregister types for a listener. -
isEnabled
Returns whether given type is enabled. -
setEnabled
Sets whether a given type is enabled. -
clear
public void clear()Clears the adapter.
-