code: private void disable(IDisable comp, boolean disabled) {
          if (comp != null) {
              comp.setDisabled(disabled);
  
              if (comp instanceof BaseUIComponent) {
                  ((BaseUIComponent) comp).addStyle("opacity", disabled ? ".2" : "1");
              }
          }
      }
docs: Sets the disabled state of the specified component.
  
  @param comp The component.
  @param disabled The disabled state.