public static void addInternalEventListenerJoystick(
      ItsNatCompNormalEventListenersJoystick listeners,
      ClientDocumentImpl clientDoc,
      Element contentElem,
      String type) {
    if (contentElem == null) return;

    ItsNatCompNormalEventListenersImpl listenersBase =
        (ItsNatCompNormalEventListenersImpl) listeners;

    EventListenerParamsImpl params = listenersBase.getEventListenerParams(type);

    boolean useCapture = listenersBase.isUseCapture(params);
    int commMode = listenersBase.getCommModeDeclared(params);
    String preSendCode = listenersBase.getPreSendCode(params);
    long eventTimeout = listenersBase.getEventTimeout(params);
    String bindToCustomFunc = listenersBase.getBindToCustomFunc(params);

    ParamTransport[] extraParams = listenersBase.getParamTransports(type, params, clientDoc);

    clientDoc.addEventListener(
        (EventTarget) contentElem,
        type,
        listenersBase.getItsNatComponent(),
        useCapture,
        commMode,
        extraParams,
        preSendCode,
        eventTimeout,
        bindToCustomFunc);
  }
  public static void removeEventListenerJoystick(
      ItsNatCompNormalEventListenersJoystick listeners, Element contentElem) {
    ItsNatCompNormalEventListenersImpl listenersBase =
        (ItsNatCompNormalEventListenersImpl) listeners;

    if (listenersBase.hasEnabledNormalEvents()) {
      for (String type : listenersBase.getEnabledNormalEvents()) {
        removeInternalEventListenerJoystick(listeners, contentElem, type);
      }
    }
  }
  public static void removeInternalEventListenerJoystick(
      ItsNatCompNormalEventListenersJoystick listeners,
      ClientDocumentImpl clientDoc,
      Element contentElem,
      String type) {
    if (contentElem == null) return;

    ItsNatCompNormalEventListenersImpl listenersBase =
        (ItsNatCompNormalEventListenersImpl) listeners;

    EventListenerParamsImpl params = listenersBase.getEventListenerParams(type);
    boolean useCapture = listenersBase.isUseCapture(params);

    clientDoc.removeEventListener(
        (EventTarget) contentElem, type, listenersBase.getItsNatComponent(), useCapture);
  }