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

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

本文整理了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

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

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

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

相关文章