code: protected int getUnits(String pUnitStr) {
          if (StringUtil.isEmpty(pUnitStr)
                  || pUnitStr.equalsIgnoreCase("PIXELS")) {
              return UNITS_PIXELS;
          }
          else if (pUnitStr.equalsIgnoreCase("PERCENT")) {
              return UNITS_PERCENT;
          }
          else {
              return UNITS_UNKNOWN;
          }
      }
docs: Gets the units constant for the width and height arguments, from the
  given string argument.
  
  @param pUnitStr The string representation of the units constant,
  can be one of "PIXELS" or "PERCENT".
  @return The mathcing units constant, or UNITS_UNKNOWN if none was found.