code: public void update() {
          boolean shouldShow = shouldShow();
  
          if (visible != shouldShow) {
              visible = shouldShow;
              BaseUIComponent target = element.getMaskTarget();
  
              if (visible) {
                  Menupopup contextMenu = ElementUI.getDesignContextMenu(target);
                  String displayName = element.getDisplayName();
                  target.addMask(displayName, contextMenu);
              } else {
                  target.removeMask();
              }
          }
      }
docs: Show or hide the design mode mask.