Sets the widget type.<p>

@param type the widget type
345735
public void setWidgetType(WidgetType type) {

        m_widgetType = type;
        m_principalTypeSelect.setVisible(m_widgetType.equals(WidgetType.principalwidget));
        m_principalTypeSelect.setValue(
            m_widgetType.equals(WidgetType.groupwidget)
            ? I_CmsPrincipal.PRINCIPAL_GROUP
            : I_CmsPrincipal.PRINCIPAL_USER);
    }
763244
public void setType(final Type type) {
		getOrCreateComponentModel().type = type == null ? Type.TABLE : type;
	}
687257
public JWTHeader setType(String type) {
        this.type = type;
        this.put(HeaderConstants.TYPE, type);
        return this;
    }
109316
@NonNull
    public SourceParams setType(@Source.SourceType String type) {
        mType = type;
        mTypeRaw = type;
        return this;
    }
364712
@Deprecated
	public void setType(final DropdownType type) {
		super.setEditable(DropdownType.COMBO.equals(type));
		getOrCreateComponentModel().type = type;
	}
1367781
public void setLedType(final LedType LED_TYPE) {
        if (ledType == LED_TYPE) {return;}

        ledType = LED_TYPE;
        final boolean LED_WAS_ON = currentLedImage.equals(ledImageOn) ? true : false;
        flushImages();
        ledImageOff = create_LED_Image(getWidth(), 0, ledColor, ledType);
        ledImageOn = create_LED_Image(getWidth(), 1, ledColor, ledType);

        currentLedImage = LED_WAS_ON == true ? ledImageOn : ledImageOff;

        repaint();
    }
526899
public void setType(String type) throws ApplicationException {
	type = type.toLowerCase().trim();
	if (type.equals("string")) this.type = RegistryEntry.TYPE_STRING;
	else if (type.equals("dword")) this.type = RegistryEntry.TYPE_DWORD;
	else if (type.equals("key")) this.type = RegistryEntry.TYPE_KEY;
	else if (type.equals("any")) this.type = RegistryEntry.TYPE_ANY;
	else throw new ApplicationException("attribute type of the tag registry has an invalid value [" + type + "], valid values are [string, dword]");
    }
463720
public void setType(String type) {
    if(StringUtils.isBlank(type)) {
      setType(TYPE.UNSET);
    }
    else {
      if(TYPE.NEGATIVE.toString().equalsIgnoreCase(type.trim())) {
        setType(TYPE.NEGATIVE);
      }
      if(TYPE.NEUTRAL.toString().equalsIgnoreCase(type.trim())) {
        setType(TYPE.NEUTRAL);
      }
      if(TYPE.POSITIVE.toString().equalsIgnoreCase(type.trim())) {
        setType(TYPE.POSITIVE);
      }
      if(TYPE.UNSET.toString().equalsIgnoreCase(type.trim())) {
        setType(TYPE.UNSET);
      }
    }
  }
831662
public Series setType(SeriesType type) {
        if(type != null) {
            this.type = type.name().toLowerCase();
        } else {
            this.type = null;
        }
        return this;
    }
1051448
public void setLedType(final LedType TYPE) {
        if (null == ledType) {
            _ledType = null == TYPE ? LedType.STANDARD : TYPE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            ledType.set(TYPE);
        }
    }
907232
public final void setType(final NotifyType type) {
        setType((type != null) ? type.getCssName() : NotifyType.INFO.getCssName());
    }
727362
public void setType(String type) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(type)) {
            m_type = Type.parse(type.trim());
        }
    }
686817
public void setMajorTickMarkType(final TickMarkType TYPE) {
        if (null == majorTickMarkType) {
            _majorTickMarkType = null == TYPE ? TickMarkType.LINE : TYPE;
            fireUpdateEvent(REDRAW_EVENT);
        } else {
            majorTickMarkType.set(TYPE);
        }
    }
699852
void initTable(WidgetType type) {

        IndexedContainer data;
        try {
            data = getContainerForType(type, m_realOnly, (String)m_ouCombo.getValue());
            m_table.updateContainer(data);
            m_tableFilter.setValue("");
        } catch (CmsException e) {
            LOG.error("Can't read principals", e);
        }
    }
692434
public void setNodeType(NodeType type) {
        addField(ConfigureNodeFields.node_type, FormField.Type.list_single);
        setAnswer(ConfigureNodeFields.node_type.getFieldName(), getListSingle(type.toString()));
    }
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
        }

    }
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);
    }