code: public void activate(boolean activate) {
          activateChildren(activate);
          activated = activate;
          updateVisibility();
          getEventManager().fireLocalEvent(activate ? EVENT_ELEMENT_ACTIVATE : EVENT_ELEMENT_INACTIVATE, this);
          
          if (activate) {
              mask.update();
          }
      }
docs: Activates or inactivates a UI element. In general, this method should not be overridden to
  introduce new behavior. Rather, if a UI element must change its visual state in response to a
  change in activation state, it should override the updateVisibility method. If a UI element
  requires special activation logic for its children (e.g., if it allows only one child to be
  active at a time), it should override the activateChildren method.
  
  @param activate The activate status.