Class UIMessage.ControlValues

All Implemented Interfaces:
Serializable, Cloneable, Map<String,Object>, Getter
Enclosing class:
UIMessage

public class UIMessage.ControlValues extends HashGetter
Acts as a wrapper for managing the control values, provides facilities and utilities for checking the pressure of the control keys (alt, ctr, shift, etc.) simultaneously with the sendEvent
See Also:
  • Constructor Details

    • ControlValues

      public ControlValues(HashMap<String,Object> m)
      Creates a ControlValues instance
      Parameters:
      m - The HashMap that contains the control parameters, such as "code", "__refed", "__keys" and in general all those who start with "__"
  • Method Details

    • isRangeKey

      public boolean isRangeKey()
      Indicates if the shift key was pressed
      Returns:
      true if at the same time as the action that triggered the event, the shift key was pressed; false otherwise
    • isPunctualKey

      public boolean isPunctualKey()
      Indicates if the control key was pressed
      Returns:
      true if at the same time as the action that triggered the event, the ctrl key (or the Command key on OSX) was pressed; false otherwise
    • getKeys

      public String getKeys()
      The string that contains the ordered list of pressed keys while the action triggering the event occurred
      Returns:
      The string composed in the following way:
      • a = Alt
      • c = Control
      • m = Command / Windows, depending on the OS
      • s = Shift
    • keyPressed

      public boolean keyPressed()
      Indicates if a function button was pressed while the action triggering the event occurred
      Returns:
      true if, while the action triggering the event (for example the click of the mouse) occurred, at the same time a function key was pressed (alt, ctrl, etc.); false otherwise