com.itextpdf.text.Font.getStyleValue()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中com.itextpdf.text.Font.getStyleValue()方法的一些代码示例,展示了Font.getStyleValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Font.getStyleValue()方法的具体详情如下:
包路径:com.itextpdf.text.Font
类名称:Font
方法名:getStyleValue

Font.getStyleValue介绍

[英]Translates a String -value of a certain style into the index value is used for this style in this class. Supported styles are in FontStyle values are checked on FontStyle#getValue()
[中]将某个样式的String值转换为该类中该样式的索引值。支持的样式在FontStyle中。在FontStyle#getValue()上检查样式值

代码示例

代码示例来源:origin: com.itextpdf/itextg

/**
 * Sets the style using a <CODE>String</CODE> containing one or more of the
 * following values: normal, bold, italic, oblique, underline, line-through
 *
 * @param style
 *            A <CODE>String</CODE> representing a certain style.
 */
public void setStyle(final String style) {
  if (this.style == UNDEFINED)
    this.style = NORMAL;
  this.style |= getStyleValue(style);
}

代码示例来源:origin: com.itextpdf/itextpdf

/**
 * Sets the style using a <CODE>String</CODE> containing one or more of the
 * following values: normal, bold, italic, oblique, underline, line-through
 *
 * @param style
 *            A <CODE>String</CODE> representing a certain style.
 */
public void setStyle(final String style) {
  if (this.style == UNDEFINED)
    this.style = NORMAL;
  this.style |= getStyleValue(style);
}

相关文章