Skins whose behavior encapsulates state information must use a Stateful variant obtained with
the create() factory method.
Skins whose behavior requires no state, or when state is fully encapsulated by the Control itself,
could use a Stateless variant obtained with the createStateless() method.
| Modifier and Type | Class and Description |
|---|---|
| public static class | SkinInputMap.
SkinInputMap for skins that maintain stateful behaviors |
| public static class | SkinInputMap.
the type of Control C extends Control>SkinInputMap for skins that either encapsulate the state fully in their Controls, or don't require a state at all. |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| public final KeyEventMapper | |
| pack-priv final HashMap | map
KeyBinding -> FunctionTag FunctionTag -> Runnable or FunctionHandler EventType -> PHList |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final < the actual event type T extends Event> void | addHandler(EventType<T>
the event type type, EventHandler<T> the event handler handler)Adds an event handler for the specified event type, in the context of this skin. |
| public final < the actual event type T extends Event> void | addHandler(EventCriteria<T>
the matching criteria criteria, EventHandler<T> the event handler handler)Adds an event handler for the specific event criteria, in the context of this skin. |
| public Set | |
| public static SkinInputMap. | |
| public static < the type of Control C extends Control> SkinInputMap. | |
| public final void | duplicateMapping(KeyBinding
the existing key binding existing, KeyBinding the new key binding newk)This convenience method registers a copy of the behavior-specific mappings from one key binding to another. |
| public final boolean | |
| public void | |
| public final Set | |
| public final Set | Returns: the set of KeyBindingsthe function tag tag)Returns the set of key bindings mapped to the specified function tag. |
| private <T extends Event> void | |
| public final void | registerKey(KeyBinding
the key binding k, FunctionTag the function tag tag)Maps a key binding to the specified function tag. |
| public final void | registerKey(KeyCode
the key code to construct a code, FunctionTag KeyBindingthe function tag tag)Maps a key binding to the specified function tag. |
| public Object | |
| public void |
| kmapper | back to summary |
|---|---|
| public final KeyEventMapper kmapper | |
| map | back to summary |
|---|---|
pack-priv final HashMap<Object, Object> mapKeyBinding -> FunctionTag FunctionTag -> Runnable or FunctionHandler EventType -> PHList | |
| SkinInputMap | back to summary |
|---|---|
| public SkinInputMap() Creates a skin input map. | |
| addHandler | back to summary |
|---|---|
| public final <T extends Event> void addHandler(EventType<T> type, EventHandler<T> handler) Adds an event handler for the specified event type, in the context of this skin.
| |
| addHandler | back to summary |
|---|---|
| public final <T extends Event> void addHandler(EventCriteria<T> criteria, EventHandler<T> handler) Adds an event handler for the specific event criteria, in the context of this skin.
This is a more specific version of
| |
| collectKeyBindings | back to summary |
|---|---|
| public Set | |
| create | back to summary |
|---|---|
| public static SkinInputMap. Creates the stateful SkinInputMap.
| |
| createStateless | back to summary |
|---|---|
| public static <C extends Control> SkinInputMap. Creates the stateless SkinInputMap.
| |
| duplicateMapping | back to summary |
|---|---|
| public final void duplicateMapping(KeyBinding existing, KeyBinding newk) This convenience method registers a copy of the behavior-specific mappings from one key binding to another. The method does nothing if no behavior specific mapping can be found.
| |
| execute | back to summary |
|---|---|
| public final boolean execute(Object source, FunctionTag tag) | |
| forEach | back to summary |
|---|---|
| public void forEach(SkinInputMap. | |
| getKeyBindings | back to summary |
|---|---|
| public final Set Collects the key bindings mapped by the skin.
| |
| getKeyBindingsFor | back to summary |
|---|---|
| public final Set Returns the set of key bindings mapped to the specified function tag.
| |
| putHandler | back to summary |
|---|---|
| private <T extends Event> void putHandler(EventType<T> type, EventHandlerPriority pri, EventHandler<T> handler) | |
| registerKey | back to summary |
|---|---|
| public final void registerKey(KeyBinding k, FunctionTag tag) Maps a key binding to the specified function tag.
| |
| registerKey | back to summary |
|---|---|
| public final void registerKey(KeyCode code, FunctionTag tag) Maps a key binding to the specified function tag.
| |
| resolve | back to summary |
|---|---|
| public Object resolve(KeyBinding k) | |
| unbind | back to summary |
|---|---|
| public void unbind(FunctionTag tag) | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final void | register(FunctionTag
the function tag tag, KeyBinding the key binding k, Runnable the function func)This convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag. |
| public final void | register(FunctionTag
the function tag tag, KeyCode the key code code, Runnable the function func)This convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag. |
| public final void | registerFunction(FunctionTag
the function tag tag, Runnable the function function)Maps a function to the specified function tag. |
| public final void | registerFunction(FunctionTag
the function tag tag, BooleanSupplier the function function)Maps a function to the specified function tag. |
| Stateful | back to summary |
|---|---|
| pack-priv Stateful() | |
| register | back to summary |
|---|---|
| public final void register(FunctionTag tag, KeyBinding k, Runnable func) This convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag.
| |
| register | back to summary |
|---|---|
| public final void register(FunctionTag tag, KeyCode code, Runnable func) This convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag.
| |
| registerFunction | back to summary |
|---|---|
| public final void registerFunction(FunctionTag tag, Runnable function) Maps a function to the specified function tag.
| |
| registerFunction | back to summary |
|---|---|
| public final void registerFunction(FunctionTag tag, BooleanSupplier function) Maps a function to the specified function tag.
The event which triggered execution of the function will be consumed if the function returns
| |
| Modifier and Type | Class and Description |
|---|---|
| public static interface | SkinInputMap.
the type of Control C>The function handler that always consumes the corresponding event. |
| public static interface | SkinInputMap.
the type of Control C>The function handler that allows to control whether the corresponding event will get consumed. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public final void | register(FunctionTag
the function tag tag, KeyBinding the key binding k, SkinInputMap.the function funcThis convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag. |
| public final void | register(FunctionTag
the function tag tag, KeyCode the key code code, SkinInputMap.the function funcThis convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag. |
| public final void | registerFunction(FunctionTag
the function tag tag, SkinInputMap.the function functionMaps a function to the specified function tag. |
| public final void | registerFunction(FunctionTag
the function tag tag, SkinInputMap.the function functionMaps a function to the specified function tag. |
| Stateless | back to summary |
|---|---|
| pack-priv Stateless() | |
| register | back to summary |
|---|---|
| public final void register(FunctionTag tag, KeyBinding k, SkinInputMap. This convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag.
| |
| register | back to summary |
|---|---|
| public final void register(FunctionTag tag, KeyCode code, SkinInputMap. This convenience method maps the function tag to the specified function, and at the same time maps the specified key binding to that function tag.
| |
| registerFunction | back to summary |
|---|---|
| public final void registerFunction(FunctionTag tag, SkinInputMap. Maps a function to the specified function tag.
| |
| registerFunction | back to summary |
|---|---|
| public final void registerFunction(FunctionTag tag, SkinInputMap. Maps a function to the specified function tag. This method allows for controlling whether the matching event will be consumed or not.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| handleFunction | back to summary |
|---|---|
| public void handleFunction(C control) The function mapped to a key binding.
| |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true to consume the event, false otherwisethe instance of Control control)The function mapped to a key binding. |
| handleFunction | back to summary |
|---|---|
| public boolean handleFunction(C control) The function mapped to a key binding. The return value instructs the owning InputMap to consume the triggering event or not.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| accept | back to summary |
|---|---|
| public void accept(EventType<T> type, EventHandlerPriority pri, EventHandler<T> h) | |