Enum Class TInputContext.InputDiscoveryPhase
java.lang.Object
java.lang.Enum<TInputContext.InputDiscoveryPhase>
io.github.thecsdev.tcdcommons.api.client.gui.util.TInputContext.InputDiscoveryPhase
- All Implemented Interfaces:
Serializable
,Comparable<TInputContext.InputDiscoveryPhase>
,Constable
- Enclosing class:
- TInputContext
public static enum TInputContext.InputDiscoveryPhase
extends Enum<TInputContext.InputDiscoveryPhase>
This refers to the current "phase" at which an input is being handled.
Each input phase has its own unique behaviors.
Each input phase has its own unique behaviors.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionDuring this input phase, the input is forwarded to all elements, sequentially, starting from the root parent.During this input phase, the input is forwarded to the currently focused or hovered element (depending on the input type), after which the input "bubbles" towards the root parent element, until the input gets handled by the target element or one of its parents.This phase is similar toBROADCAST
, except elements are able to stop the input propagation by handling the input. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static TInputContext.InputDiscoveryPhase[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BROADCAST
During this input phase, the input is forwarded to all elements, sequentially, starting from the root parent.This phase is solely for the purpose of elements being able to know an input took place. Any elements handling the input on this phase will have no effect on the input propagation, and will not be able to prevent the
TInputContext.InputDiscoveryPhase
s that follow. -
PREEMPT
-
MAIN
During this input phase, the input is forwarded to the currently focused or hovered element (depending on the input type), after which the input "bubbles" towards the root parent element, until the input gets handled by the target element or one of its parents.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-