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

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

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

Font.setFontSize介绍

暂无

代码示例

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

public Font createFont(
    Expression fontFamily,
    Expression fontStyle,
    Expression fontWeight,
    Expression fontSize) {
  Font font = new FontImpl();
  if (fontFamily == null) {
    throw new IllegalArgumentException("Null font family specified");
  }
  font.setFontFamily(fontFamily);
  if (fontSize == null) {
    throw new IllegalArgumentException("Null font size specified");
  }
  font.setFontSize(fontSize);
  if (fontStyle == null) {
    throw new IllegalArgumentException("Null font Style specified");
  }
  font.setFontStyle(fontStyle);
  if (fontWeight == null) {
    throw new IllegalArgumentException("Null font weight specified");
  }
  font.setFontWeight(fontWeight);
  return font;
}

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

font.setFontStyle(parseCssParameter(child));
} else if (res.equalsIgnoreCase("font-size")) {
  font.setFontSize(parseCssParameter(child));
} else if (res.equalsIgnoreCase("font-weight")) {
  font.setFontWeight(parseCssParameter(child));

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

public Font createFont(Expression fontFamily, Expression fontStyle,
  Expression fontWeight, Expression fontSize) {
  Font font = new FontImpl();
  if (fontFamily == null) {
    throw new IllegalArgumentException("Null font family specified");	
  }
  font.setFontFamily(fontFamily);
  if (fontSize == null) {
    throw new IllegalArgumentException("Null font size specified");
  }
  font.setFontSize(fontSize);
  if (fontStyle == null) {
    throw new IllegalArgumentException("Null font Style specified");
  }
  font.setFontStyle(fontStyle);
  if (fontWeight == null) {
    throw new IllegalArgumentException("Null font weight specified");
  }
  font.setFontWeight(fontWeight);
  return font;
}

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

public Font createFont(Expression fontFamily, Expression fontStyle,
  Expression fontWeight, Expression fontSize) {
  Font font = new FontImpl();
  if (fontFamily == null) {
    throw new IllegalArgumentException("Null font family specified");	
  }
  font.setFontFamily(fontFamily);
  if (fontSize == null) {
    throw new IllegalArgumentException("Null font size specified");
  }
  font.setFontSize(fontSize);
  if (fontStyle == null) {
    throw new IllegalArgumentException("Null font Style specified");
  }
  font.setFontStyle(fontStyle);
  if (fontWeight == null) {
    throw new IllegalArgumentException("Null font weight specified");
  }
  font.setFontWeight(fontWeight);
  return font;
}

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

font.setFontSize(parseCssParameter(child));

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

font.setFontStyle(parseCssParameter(child));
} else if (res.equalsIgnoreCase("font-size")) {
  font.setFontSize(parseCssParameter(child));
} else if (res.equalsIgnoreCase("font-weight")) {
  font.setFontWeight(parseCssParameter(child));

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

/**
 * Creates a defaultFont which is valid on all machines. The font is of
 * size 10, Style and Weight normal and uses a serif font.
 *
 * @return the default Font
 *
 * @throws RuntimeException DOCUMENT ME!
 */
public Font getDefaultFont() {
  Font font = new FontImpl();
  try {
    font.setFontSize(filterFactory.literal(
        new Integer(10)));
    font.setFontStyle(filterFactory.literal("normal"));
    font.setFontWeight(filterFactory.literal("normal"));
    font.setFontFamily(filterFactory.literal("Serif"));
  } catch (org.geotools.filter.IllegalFilterException ife) {
    throw new RuntimeException("Error creating font", ife);
  }
  return font;
}

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

public void apply(){
  if(font != null){
    font.setFontFamily(guiFamily.getExpression());
    font.setFontSize(guiSize.getExpression());
    font.setFontStyle(guiStyle.getExpression());
    font.setFontWeight(guiWeight.getExpression());
  }
}

相关文章