code: @Override
      public void mousePressed(MouseEvent event)
      {
          lastClick = event.getButton();
          clicks[lastClick] = true;
  
          final Integer key = Integer.valueOf(lastClick);
          if (actionsPressed.containsKey(key))
          {
              final List<EventAction> actions = actionsPressed.get(key);
              for (final EventAction current : actions)
              {
                  current.action();
              }
          }
      }
docs: /*
  MouseListener