Top Description Inners Methods
org.fxmisc.wellbehaved.event

public Interface InputHandler<T extends Event>

extends EventHandler<T extends Event>
Annotations
@FunctionalInterface
Type Parameters
<T>
the type of the event that will be passed into process(Event)
Imports
javafx.event.Event, .EventHandler

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)

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
InputHandler.Result

Signifies what to do after handling some input:

  • continue trying to match the event type with the next given EventPattern (PROCEED)
  • stop trying to match the event type and consume the event (CONSUME)
  • stop trying to match the event type and do not consume it (IGNORE)

Method Summary

Modifier and TypeMethod and Description
public default void
handle(T event)

Implements javafx.event.EventHandler.handle.

Invoked when a specific event of the type for which this handler is registered happens.

public InputHandler.Result
process(T event)

When the corresponding EventPattern matches an event type, this method is called.

Method Detail

handleback to summary
public default void handle(T event)

Implements javafx.event.EventHandler.handle.

Doc from javafx.event.EventHandler.handle.

Invoked when a specific event of the type for which this handler is registered happens.

Annotations
@Override
processback to summary
public InputHandler.Result process(T event)

When the corresponding EventPattern matches an event type, this method is called. The implementation does not need to consume the event.

org.fxmisc.wellbehaved.event back to summary

public final Enum InputHandler.Result

extends Enum<InputHandler.Result>
Class Inheritance

Signifies what to do after handling some input:

Field Summary

Modifier and TypeField and Description
public static final InputHandler.Result
CONSUME

Stop trying to match the event type with the next given EventPattern and consume the event

public static final InputHandler.Result
IGNORE

Stop trying to match the event type with the next given EventPattern and do not consume it

public static final InputHandler.Result
PROCEED

Try to continue to match the event type with the next given EventPattern.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static InputHandler.Result
public static InputHandler.Result[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CONSUMEback to summary
public static final InputHandler.Result CONSUME

Stop trying to match the event type with the next given EventPattern and consume the event

IGNOREback to summary
public static final InputHandler.Result IGNORE

Stop trying to match the event type with the next given EventPattern and do not consume it

PROCEEDback to summary
public static final InputHandler.Result PROCEED

Try to continue to match the event type with the next given EventPattern. This can be used to run some code before an InputHandler that consumes the event.

Constructor Detail

Resultback to summary
private Result()

Method Detail

valueOfback to summary
public static InputHandler.Result valueOf(String name)
valuesback to summary
public static InputHandler.Result[] values()