code: public static void setDefaultUnit(Unit unit) {
          if ((unit == ConstantSize.DLUX) || (unit == ConstantSize.DLUY)) {
              throw new IllegalArgumentException(
                      "The unit must not be DLUX or DLUY. "
                      + "To use DLU as default unit, invoke this method with null.");
          }
          defaultUnit = unit;
      }
docs: Sets the Unit that shall be used if an encoded ConstantSize provides no unit string.
  
  @param unit the new default Unit, {@code null} for dialog units
  
  @throws IllegalArgumentException if {@code unit} is {@link ConstantSize#DLUX} or
  {@link ConstantSize#DLUY}.
  
  @since 1.2