Top Description Interfaces Classes
[default module]

Package org.fxmisc.wellbehaved.event


Allows one to use pattern matching (think, "a switch statement with more power") to map one or more input event(s) (e.g. key event, mouse event, etc.) to a given behavior (a block of code to execute) in a declarative style with self-documenting code. To understand how to use this library well, read through the javadoc of org.fxmisc.wellbehaved.event.EventPattern, org.fxmisc.wellbehaved.event.InputHandler and then org.fxmisc.wellbehaved.event.InputMap in that order. Once these are understood, one should read the javadoc of org.fxmisc.wellbehaved.event.template.InputMapTemplate.

Interface Summary

Modifier and TypeInterface and Description
public interface
EventPattern<T extends Event, U extends T>

Helper class for pattern-matching one or more EventTypes (e.g. the "case" line in a powerful switch statement).

public interface
InputHandler<
the type of the event that will be passed into process(Event)
T extends Event
>

Runs a block of code when its corresponding EventPattern matches a given event type (e.g. the block of code to run in a more powerful switch statement)

public interface
InputMap<
type of events that this InputMap may handle. That is, InputMap<E> certainly does not handle any events that are not of type E; it does not mean it handles any event of type E.
E extends Event
>

Pattern matching for Events.

Class Summary

Modifier and TypeClass and Description
pack-priv class
GenericKeyCombination

A generic helper class for pattern-matching a KeyEvent's modifiers along with the key event itself.

pack-priv class
pack-priv class
InputMapChain<E extends Event>

public class
Nodes

Helper class for "installing/uninstalling" an InputMap into a Node.

pack-priv class
PatternActionMap<T extends Event, U extends T>