org.geotools.styling.Font.setFontStyle()方法的使用及代码示例

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

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

Font.setFontStyle介绍

暂无

代码示例

代码示例来源:origin: geotools/geotools

  1. public Font createFont(
  2. Expression fontFamily,
  3. Expression fontStyle,
  4. Expression fontWeight,
  5. Expression fontSize) {
  6. Font font = new FontImpl();
  7. if (fontFamily == null) {
  8. throw new IllegalArgumentException("Null font family specified");
  9. }
  10. font.setFontFamily(fontFamily);
  11. if (fontSize == null) {
  12. throw new IllegalArgumentException("Null font size specified");
  13. }
  14. font.setFontSize(fontSize);
  15. if (fontStyle == null) {
  16. throw new IllegalArgumentException("Null font Style specified");
  17. }
  18. font.setFontStyle(fontStyle);
  19. if (fontWeight == null) {
  20. throw new IllegalArgumentException("Null font weight specified");
  21. }
  22. font.setFontWeight(fontWeight);
  23. return font;
  24. }

代码示例来源:origin: geotools/geotools

  1. font.setFontStyle(parseCssParameter(child));
  2. } else if (res.equalsIgnoreCase("font-size")) {
  3. font.setFontSize(parseCssParameter(child));

代码示例来源:origin: org.geotools/gt2-main

  1. public Font createFont(Expression fontFamily, Expression fontStyle,
  2. Expression fontWeight, Expression fontSize) {
  3. Font font = new FontImpl();
  4. if (fontFamily == null) {
  5. throw new IllegalArgumentException("Null font family specified");
  6. }
  7. font.setFontFamily(fontFamily);
  8. if (fontSize == null) {
  9. throw new IllegalArgumentException("Null font size specified");
  10. }
  11. font.setFontSize(fontSize);
  12. if (fontStyle == null) {
  13. throw new IllegalArgumentException("Null font Style specified");
  14. }
  15. font.setFontStyle(fontStyle);
  16. if (fontWeight == null) {
  17. throw new IllegalArgumentException("Null font weight specified");
  18. }
  19. font.setFontWeight(fontWeight);
  20. return font;
  21. }

代码示例来源:origin: org.geotools/gt-main

  1. public Font createFont(Expression fontFamily, Expression fontStyle,
  2. Expression fontWeight, Expression fontSize) {
  3. Font font = new FontImpl();
  4. if (fontFamily == null) {
  5. throw new IllegalArgumentException("Null font family specified");
  6. }
  7. font.setFontFamily(fontFamily);
  8. if (fontSize == null) {
  9. throw new IllegalArgumentException("Null font size specified");
  10. }
  11. font.setFontSize(fontSize);
  12. if (fontStyle == null) {
  13. throw new IllegalArgumentException("Null font Style specified");
  14. }
  15. font.setFontStyle(fontStyle);
  16. if (fontWeight == null) {
  17. throw new IllegalArgumentException("Null font weight specified");
  18. }
  19. font.setFontWeight(fontWeight);
  20. return font;
  21. }

代码示例来源:origin: org.geotools/gt2-main

  1. font.setFontStyle(parseCssParameter(child));

代码示例来源:origin: org.geotools/gt-main

  1. font.setFontFamily(parseCssParameter(child));
  2. } else if (res.equalsIgnoreCase("font-style")) {
  3. font.setFontStyle(parseCssParameter(child));
  4. } else if (res.equalsIgnoreCase("font-size")) {
  5. font.setFontSize(parseCssParameter(child));

代码示例来源:origin: org.geotools/gt2-main

  1. /**
  2. * Creates a defaultFont which is valid on all machines. The font is of
  3. * size 10, Style and Weight normal and uses a serif font.
  4. *
  5. * @return the default Font
  6. *
  7. * @throws RuntimeException DOCUMENT ME!
  8. */
  9. public Font getDefaultFont() {
  10. Font font = new FontImpl();
  11. try {
  12. font.setFontSize(filterFactory.literal(
  13. new Integer(10)));
  14. font.setFontStyle(filterFactory.literal("normal"));
  15. font.setFontWeight(filterFactory.literal("normal"));
  16. font.setFontFamily(filterFactory.literal("Serif"));
  17. } catch (org.geotools.filter.IllegalFilterException ife) {
  18. throw new RuntimeException("Error creating font", ife);
  19. }
  20. return font;
  21. }

代码示例来源:origin: org.geotools/gt-widgets-swing-pending

  1. public void apply(){
  2. if(font != null){
  3. font.setFontFamily(guiFamily.getExpression());
  4. font.setFontSize(guiSize.getExpression());
  5. font.setFontStyle(guiStyle.getExpression());
  6. font.setFontWeight(guiWeight.getExpression());
  7. }
  8. }

相关文章