Data-binding method for custom attribute bind:tv_typeface to be set
@param editText The instance of the object to set value on
@param type The string name of the typeface, same as in xml
775172
@BindingAdapter("bind:tv_typeface")
    public static void setCustomTypeface(TypefaceEditText editText, String type) {
        editText.mCurrentTypeface = TypefaceType.getTypeface(type != null ? type : "");
        Typeface typeface = getFont(editText.getContext(), editText.mCurrentTypeface.getAssetFileName());
        editText.setTypeface(typeface);
    }
429588
public void setType(java.lang.String type) {
        getStateHelper().put(PropertyKeys.type, type);
        handleAttribute("type", type);
    }
587621
public void setType(String type) throws ApplicationException {
	type = type.toLowerCase().trim();
	if (type.equals("page")) this.type = lucee.runtime.exp.Abort.SCOPE_PAGE;
	else if (type.equals("request")) this.type = lucee.runtime.exp.Abort.SCOPE_REQUEST;
	else throw new ApplicationException("attribute type has an invalid value [" + type + "], valid values are [page,request]");
    }
535069
private void setType(UIComponent component, String type) {
		Method method;
		try {
			method = component.getClass().getMethod("getType");
			if (null != method) {
				Object invoke = method.invoke(component);
				if (invoke != null) {
					// is it an PrimeFaces component?
					if (component.getClass().getName().equals("org.primefaces.component.inputtext.InputText")) {
						if (!"text".equals(invoke)) {
							// the programmer has explicitly assigned a type
							return;
						}
					}
					else return;
				}
			}
			
			method = component.getClass().getMethod("setType", String.class);
			if (null != method) {
				method.invoke(component, type);
				return;
			}
		} catch (ReflectiveOperationException e) {
			// catch block required by compiler, can't happen in reality
		}
		if (null == component.getAttributes().get("type") && null == component.getPassThroughAttributes().get("type")) {
			component.getPassThroughAttributes().put("type", type);
		}
	}
407461
public void setType(String type) throws ApplicationException {
	if (StringUtil.isEmpty(type, true)) return;
	type = type.toLowerCase().trim();

	if (type.equals("url")) param.setType(HttpParamBean.TYPE_URL);
	else if (type.equals("formfield") || type.equals("form")) param.setType(HttpParamBean.TYPE_FORM);
	else if (type.equals("cgi")) param.setType(HttpParamBean.TYPE_CGI);
	else if (type.startsWith("head") || type.startsWith("header")) param.setType(HttpParamBean.TYPE_HEADER);
	else if (type.equals("cookie")) param.setType(HttpParamBean.TYPE_COOKIE);
	else if (type.equals("file")) param.setType(HttpParamBean.TYPE_FILE);
	else if (type.equals("xml")) param.setType(HttpParamBean.TYPE_XML);
	else if (type.equals("body")) param.setType(HttpParamBean.TYPE_BODY);
	else throw new ApplicationException("invalid type [" + type + "], valid types are [body,cgi,cookie,file,form,head,url,xml]");
    }
891542
private EditType getEditType(String typeName) {
    for (EditType type : EditType.values()) {
      if (type.toString().equals(typeName)) {
        return type;
      }
    }
    return null;
  }
1345572
public static void typeface(Activity activity) {
		if (sDefaultTypefaceCollection == null) {
			throw new IllegalStateException("Default typeface collection not initialized. Forgot to call init()?");
		}
		typeface(activity.findViewById(android.R.id.content), sDefaultTypefaceCollection);
	}
283892
public boolean setTypeface(GVRContext gvrContext, String font) {
        return setTypeface(gvrContext, font, fontStyleTypes.PLAIN);
    }
68372
public T typeface(Typeface tf) {

        if (view instanceof TextView) {
            TextView tv = (TextView) view;
            tv.setTypeface(tf);
        }
        return self();
    }
983888
public void setType(String type) throws PageException {
	if (type == null) return;
	try {
	    this.type = toType(type);
	}
	catch (SearchException e) {
	    throw Caster.toPageException(e);
	}
    }
324014
public void setContentType(String type) {
        final boolean isTraceOn = com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled();
        // 311717
        if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.entering(CLASS_NAME,"setContentType", " type --> " + type+ " ["+this+"]");
        }
        //PM50313
        if (type == null){
            if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.exiting(CLASS_NAME,"setContentType","not set - type is NULL");
            }  
            return;
        }
        //PM50313

        // d151464 - check the include flag
        WebAppDispatcherContext dispatchContext = (WebAppDispatcherContext) getRequest().getWebAppDispatcherContext();
        if (dispatchContext.isInclude() == true) {
            if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.exiting(CLASS_NAME,"setContentType", nls.getString("Illegal.from.included.servlet", "Illegal from included servlet"));  //311717
            }
            return;
        }


        if (isCommitted()){
            if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.exiting(CLASS_NAME,"setContentType","not set - response isCommitted");  //311717
            }
            return;
        }

        int equalsIndex = type.indexOf('=');
        boolean containsCharset = false;
        int beginCharsetStrIndex = equalsIndex - 7;
        int startCharsetValIndex = equalsIndex + 1;
        boolean isPreV7 = false;
        if (contentTypeCompatibility!=null && (contentTypeCompatibility.equalsIgnoreCase("V4")||
                        contentTypeCompatibility.equalsIgnoreCase("V5")||contentTypeCompatibility.equalsIgnoreCase("V6"))){
            isPreV7 = true;
        }

        boolean addEncoding = false;

        if (beginCharsetStrIndex > -1){
            containsCharset = type.regionMatches(true, beginCharsetStrIndex, "charset", 0, 7);
        }
        if (containsCharset){
            if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                logger.logp(Level.FINE, CLASS_NAME,"setContentType", " isPreV7 --> " + isPreV7);
            }
            if (!_gotWriter) {  // 249506, part 2
                // Example:
                // setContentType("text/html;charset=UTF-8")
                // getWriter();
                // result = text/html;charset=UTF-8
                // we can change the character encoding because we haven't gotten the writer or committed
                // Begin 287829, Fix setContentType when qoutes are a part of the charset

                int endIndex = type.length() - 1;
                if (startCharsetValIndex<=endIndex){
                    isCharEncodingExplicit = true;
                    boolean startsWithQoute = type.charAt(startCharsetValIndex) == '"' || type.charAt(startCharsetValIndex) == '\'';
                    boolean endsWithQoute = type.charAt(endIndex) == '"' || type.charAt(endIndex) == '\'';
                    if (startsWithQoute && endsWithQoute){
                        _encoding = type.substring(startCharsetValIndex + 1, endIndex);
                        addEncoding = true;
                        // remove the qoutes from the encoding and add later
                    }
                    else {
                        _encoding = type.substring(startCharsetValIndex);
                        // type is perfectly formed and can be set as is.
                    }

                }
                // End 287829, Fix setContentType when qoutes are a part of the charset
            }
            else {
                if (isPreV7){
                    // Before v7, strip the charset
                    // Example:
                    // setContentType("text/html");
                    // getWriter();
                    // setContentType("text/xml;charset=UTF-8");
                    // result = text/xml
                    if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                        logger.logp(Level.FINE, CLASS_NAME,"setContentType", " isPreV7, strip charset ");
                    }
                    type = type.substring(0, beginCharsetStrIndex).trim();
                    // if (type.endsWith(";")) { //wasteful??? It has to end with ;
                    type = type.substring(0, type.length() - 1);
                    // }
                }
            }
        }
        if (!isPreV7){
            if (_gotWriter){
                //we've gotten the writer, but not committed, so we can change the mime type,
                //but not the charset. Still we have to add the default encoding or the previous
                // charset
                // setContentType("text/html;charset=ISO-8859-7");
                // getWriter();
                // setContentType("text/xml;charset=UTF-8");
                // result = text/xml;charset=ISO-8859-7
                if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                    logger.logp(Level.FINE, CLASS_NAME,"setContentType", " add encoding because we retrieved a writer");
                }
                addEncoding = true;
            }
            else {
                //we haven't gotten the writer, and the current contentType argument has no
                //charset included. Therefore check to see if the old content type has a charset
                // and append it *** if the new type is some form of text ***
                // setContentType("text/html;charset=UTF-8");
                // setContentType("text/xml");
                // result = text/xml;charset=UTF-8
                if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                    logger.logp(Level.FINE, CLASS_NAME,"setContentType", " did not get writer, check to see if charset already exists");
                }
                if (isCharEncodingExplicit&&type.startsWith(WebContainerConstants.TEXT)){ //506208.1
                    if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
                        logger.logp(Level.FINE, CLASS_NAME,"setContentType", " add encoding because the content type already had a charset");
                    }
                    addEncoding = true;
                }
            }
        }

        if (addEncoding)
        {
            if (containsCharset){
                type = type.substring(0, startCharsetValIndex) + _encoding;
            }
            else
            {
                type = type + ";" + WebContainerConstants.CHARSET_EQUALS + _encoding;
            }
        }
        /* 252465: We do not want to do the autoResponseEncoding check here
         * because this sets the charset for binary data also.
         * Only use in the case of getWriter.
         */
        _contentType = type;
        if (_response != null)
            _response.setContentType(type);

        if (isTraceOn&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.exiting(CLASS_NAME,"setContentType","type="+_contentType);  //311717
        }

    }
87437
public void addInvalidAttributeError(final String type) throws ValidationException
    {
        addError(StringFormatter.format(MessageConstants.MESSAGES.attributeIsInvalidForType(), type));
    }
556907
public void setEditIcon(Icon editIcon, String text) {
        if (editIcon != null) {
            editButton.setIcon(editIcon);
            if (text != null) {
                editButton.setToolTipText(text);
            }
            editButton.setText("");
        } else {
            editButton.setIcon(null);
            if (text != null) {
                editButton.setText(text);
            }
        }
    }
732877
protected Attribute setAttributeFromRawValue(String name, AttributeType type, Object value) throws AttributeException {
		AttributeValue oldValue = extractValueForSafe(name);
		if (oldValue != null) {
			if (oldValue.equals(value)) {
				return null;
			}
			// Clone the value for avoid border effects.
			oldValue = new AttributeValueImpl(oldValue);
		}

		final Attribute attr = new AttributeImpl(name, type);
		attr.setValue(type.cast(value));

		saveValue(name, attr);

		this.cache.put(name, attr);

		if (oldValue != null) {
			fireAttributeChangedEvent(name, oldValue, attr);
		} else {
			fireAttributeAddedEvent(name, attr);
		}

		return attr;
	}
744841
public void setMonthTypeFace(String fontName) {
        mMonthTypeFace = Typeface.createFromAsset(mContext.getAssets(), "fonts/" + fontName);
        mMonthTypeFaceSet = true;
    }
663607
private void setStylePinBox(EditText editText) {
        editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(mNumberCharacters)});

        if (mMaskPassword) {
            editText.setTransformationMethod(PasswordTransformationMethod.getInstance());
        }
        else{
            editText.setTransformationMethod(HideReturnsTransformationMethod.getInstance());
        }

        if (mNativePinBox) {
            if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.JELLY_BEAN) {
                //noinspection deprecation
                editText.setBackgroundDrawable(new EditText(getContext()).getBackground());
            } else {
                editText.setBackground(new EditText(getContext()).getBackground());
            }
        } else {
            editText.setBackgroundResource(mCustomDrawablePinBox);
        }

        if (mColorTextPinBoxes != PinViewSettings.DEFAULT_TEXT_COLOR_PIN_BOX) {
            editText.setTextColor(mColorTextPinBoxes);
        }
        editText.setTextSize(PinViewUtils.convertPixelToDp(getContext(), mTextSizePinBoxes));
    }
926858
public void setContentType(String contentType) {
        if (contentType == null) {
            _properties.remove(AMQP_PROP_CONTENT_TYPE);
            return;
        }
        
        _properties.put(AMQP_PROP_CONTENT_TYPE, contentType);
    }