code: protected void setFlag(final int mask, final boolean flag) {
  		// Only store the flag value if it is not the default.
  		if (flag != isFlagSet(mask)) {
  			ComponentModel model = getOrCreateComponentModel();
  			model.setFlags(switchFlag(model.getFlags(), mask, flag));
  		}
  	}
docs: Sets or clears one or more component flags in the component model for the given context..
  
  @param mask the bit mask for the flags to set/clear.
  @param flag true to set the flag(s), false to clear.