Updates the text style according to a new text position
@param bstyle the style to be updated
@param text the text position
348243
protected void updateStyle(BoxStyle bstyle, TextPosition text)
    {
        String font = text.getFont().getName();
        String family = null;
        String weight = null;
        String fstyle = null;

        bstyle.setFontSize(text.getFontSizeInPt());
        bstyle.setLineHeight(text.getHeight());

        if (font != null)
        {
        	//font style and weight
            for (int i = 0; i < pdFontType.length; i++)
            {
                if (font.toLowerCase().lastIndexOf(pdFontType[i]) >= 0)
                {
                    weight = cssFontWeight[i];
                    fstyle = cssFontStyle[i];
                    break;
                }
            }
            if (weight != null)
            	bstyle.setFontWeight(weight);
            else
            	bstyle.setFontWeight(cssFontWeight[0]);
            if (fstyle != null)
            	bstyle.setFontStyle(fstyle);
            else
            	bstyle.setFontStyle(cssFontStyle[0]);

            //font family
            //If it's a known common font don't embed in html output to save space
            String knownFontFamily = findKnownFontFamily(font);
            if (!knownFontFamily.equals(""))
                family = knownFontFamily;
            else
            {
                family = fontTable.getUsedName(text.getFont());
                if (family == null)
                    family = font;
            }

            if (family != null)
            	bstyle.setFontFamily(family);
        }

        updateStyleForRenderingMode();
    }
1372616
public void setInfo(String text)
  {
    if (text != null && text.length() > 0)
    {
      String prefix = "Result for: <span class=\"" + Helper.CORPUS_FONT_FORCE + "\">";
      lblInfo.setDescription(prefix + text.replaceAll("\n", " ") + "</span>");
      lblInfo.setValue(text.length() < 50 ? prefix + StringEscapeUtils.
        escapeHtml4(text.substring(0, text.length())) : prefix + StringEscapeUtils.
        escapeHtml4(text.substring(0, 50)) + " ... </span>");
    }
  }
1207148
protected void applyStyle(TextFormatting format)
	{
		if (format == TextFormatting.RESET)
		{
			FontOptions fontOptions = styles.getFirst();
			styles.clear();
			styles.add(fontOptions);
			return;
		}

		FontOptionsBuilder builder = currentStyle().toBuilder();
		builder.styles(format);
		styles.add(builder.build());
	}
597025
public final void setNextButtonText(@NonNull final CharSequence text) {
        Condition.INSTANCE.ensureNotNull(text, "The text may not be null");
        Condition.INSTANCE.ensureNotEmpty(text, "The text may not be empty");
        this.nextButtonText = text;
        adaptNextButtonText();
    }
225957
@Override
    public void setText(String text) {
        if (text == null) {
            if (headerElem != null) {
                removeChild(headerElem);
                headerElem = null;
            }
            return;
        }

        if (headerElem == null) {
            headerElem = Document.get().createHElement(3);
            attachChild(headerElem);
        }
        headerElem.setInnerText(text);
    }
753930
public void setValue(String text) {
        Token[] tokens = TokenParser.makeTokens(text, isTokenize());
        setValue(tokens);
    }
1124822
public void setAsText(String text) throws IllegalArgumentException {
        if (text == null || text.equals("")) {
            setValue(null);
            return;
        }
        Enum<?> value = Enum.valueOf(enumClass, text);
        setValue(value);
    }
585179
public void setText(String text) {

        m_label.setText(text);
        m_label.setTitle(text);
        m_text = text;
        if (m_textMetricsKey != null) {
            truncate(m_textMetricsKey, m_labelWidth);
        }
    }
510688
public final void setPlaceholder(String text,
                                     @ColorInt int backgroundColor,
                                     @ColorInt int textColor) {
        boolean invalidate = false;
        // Set the placeholder background color
        if (backgroundColor != mBackgroundColor) {
            mBackgroundColor = backgroundColor;
            if (null != mBackgroundPaint) {
                mBackgroundPaint.setColor(backgroundColor);
                invalidate = true;
            }
        }
        // Set the placeholder text color
        if (!text.equalsIgnoreCase(mText) ||
            (backgroundColor != mBackgroundColor) ||
            (textColor != mTextColor)) {
            setPlaceholderTextInternal(text, textColor, mTextSize, false);
            invalidate = true;
        }

        if (invalidate) {
            invalidate();
        }
    }
871969
public void setText (String text) {
		if (content instanceof VisLabel) {
			((VisLabel) content).setText(text);
		} else {
			setContent(new VisLabel(text));
		}
		pack();
	}
1112353
public void showText (final String text) throws IOException
  {
    if (!inTextMode)
    {
      throw new IllegalStateException ("Must call beginText() before showText()");
    }

    if (fontStack.isEmpty ())
    {
      throw new IllegalStateException ("Must call setFont() before showText()");
    }

    final PDFont font = fontStack.peek ();

    // Unicode code points to keep when subsetting
    if (font.willBeSubset ())
    {
      for (int offset = 0; offset < text.length ();)
      {
        final int codePoint = text.codePointAt (offset);
        font.addToSubset (codePoint);
        offset += Character.charCount (codePoint);
      }
    }

    COSWriter.writeString (font.encode (text), m_aOS);
    write ((byte) ' ');
    writeOperator ((byte) 'T', (byte) 'j');
  }
7235
public void setText(String text) {
        // Only change if different
        if (!ValueUtils.areEqual(text, toolTip.getTipText())) {

            boolean wasVisible = isVisible();
            if (wasVisible) {
                setVisible(false);
            }

            toolTip.setTipText(text);

            if (wasVisible) {
                setVisible(true);
            }
        }
    }
166306
public final void setStyle(@NonNull final Style style) {
        Condition.INSTANCE.ensureNotNull(style, "The style may not be null");
        adapter.setStyle(style);
        adaptRootView();
        adaptTitleView();
        adaptContentView();
        adaptGridViewHeight();
    }
226936
public final void setSourceText(final String text) {
        if (SwingUtilities.isEventDispatchThread()) {
            setSourceTextIntern(text);
        } else {
            try {
                SwingUtilities.invokeLater(new Runnable() {
                    public void run() {
                        setSourceTextIntern(text);
                    }
                });
            } catch (final Exception ex) {
                ignore();
            }
        }
    }
1006647
public void setToolTipText(String text) {
        this.toolTipText = text;
        if (toolTipDialog != null) {
            toolTipDialog.setText(text);
        }
    }
845955
public void setText(String text) {

        m_text = text;
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(text)) {
            setQuery(createTextQuery(text));
        }
    }
923141
public void addText(String text) {
        try {
            writer.append(text);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }