本文整理了Java中org.apache.poi.hssf.usermodel.HSSFFont.getFontHeight()
方法的一些代码示例,展示了HSSFFont.getFontHeight()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFFont.getFontHeight()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFFont
类名称:HSSFFont
方法名:getFontHeight
[英]get the font height in unit's of 1/20th of a point. Maybe you might want to use the getFontHeightInPoints which matches to the familiar 10, 12, 14 etc..
[中]以1/20点为单位获取字体高度。也许您需要使用与熟悉的10、12、14等匹配的getFontHeightInPoints。。
代码示例来源:origin: org.apache.poi/poi
/**
* Finds a font that matches the one with the supplied attributes
*/
@Override
public HSSFFont findFont(boolean bold, short color, short fontHeight,
String name, boolean italic, boolean strikeout,
short typeOffset, byte underline)
{
int numberOfFonts = getNumberOfFontsAsInt();
for (int i = 0; i <= numberOfFonts; i++) {
// Remember - there is no 4!
if(i == 4) {
continue;
}
HSSFFont hssfFont = getFontAt(i);
if (hssfFont.getBold() == bold
&& hssfFont.getColor() == color
&& hssfFont.getFontHeight() == fontHeight
&& hssfFont.getFontName().equals(name)
&& hssfFont.getItalic() == italic
&& hssfFont.getStrikeout() == strikeout
&& hssfFont.getTypeOffset() == typeOffset
&& hssfFont.getUnderline() == underline)
{
return hssfFont;
}
}
return null;
}
代码示例来源:origin: cuba-platform/yarg
newFont.setColor(cellFont.getColor());
newFont.setUnderline(cellFont.getUnderline());
newFont.setFontHeight(cellFont.getFontHeight());
newFont.setFontHeightInPoints(cellFont.getFontHeightInPoints());
fontCache.addCachedFont(cellFont, newFont);
代码示例来源:origin: com.haulmont.yarg/yarg
newFont.setColor(cellFont.getColor());
newFont.setUnderline(cellFont.getUnderline());
newFont.setFontHeight(cellFont.getFontHeight());
newFont.setFontHeightInPoints(cellFont.getFontHeightInPoints());
fontCache.addCachedFont(cellFont, newFont);
代码示例来源:origin: com.haulmont.thirdparty/poi
/**
* Finds a font that matches the one with the supplied attributes
*/
public HSSFFont findFont(short boldWeight, short color, short fontHeight,
String name, boolean italic, boolean strikeout,
short typeOffset, byte underline)
{
for (short i=0; i<=getNumberOfFonts(); i++) {
// Remember - there is no 4!
if(i == 4) continue;
HSSFFont hssfFont = getFontAt(i);
if (hssfFont.getBoldweight() == boldWeight
&& hssfFont.getColor() == color
&& hssfFont.getFontHeight() == fontHeight
&& hssfFont.getFontName().equals(name)
&& hssfFont.getItalic() == italic
&& hssfFont.getStrikeout() == strikeout
&& hssfFont.getTypeOffset() == typeOffset
&& hssfFont.getUnderline() == underline)
{
return hssfFont;
}
}
return null;
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Finds a font that matches the one with the supplied attributes
*/
public HSSFFont findFont(short boldWeight, short color, short fontHeight,
String name, boolean italic, boolean strikeout,
short typeOffset, byte underline)
{
for (short i=0; i<=getNumberOfFonts(); i++) {
// Remember - there is no 4!
if(i == 4) continue;
HSSFFont hssfFont = getFontAt(i);
if (hssfFont.getBoldweight() == boldWeight
&& hssfFont.getColor() == color
&& hssfFont.getFontHeight() == fontHeight
&& hssfFont.getFontName().equals(name)
&& hssfFont.getItalic() == italic
&& hssfFont.getStrikeout() == strikeout
&& hssfFont.getTypeOffset() == typeOffset
&& hssfFont.getUnderline() == underline)
{
return hssfFont;
}
}
return null;
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Finds a font that matches the one with the supplied attributes
*/
@Override
public HSSFFont findFont(boolean bold, short color, short fontHeight,
String name, boolean italic, boolean strikeout,
short typeOffset, byte underline)
{
int numberOfFonts = getNumberOfFontsAsInt();
for (int i = 0; i <= numberOfFonts; i++) {
// Remember - there is no 4!
if(i == 4) {
continue;
}
HSSFFont hssfFont = getFontAt(i);
if (hssfFont.getBold() == bold
&& hssfFont.getColor() == color
&& hssfFont.getFontHeight() == fontHeight
&& hssfFont.getFontName().equals(name)
&& hssfFont.getItalic() == italic
&& hssfFont.getStrikeout() == strikeout
&& hssfFont.getTypeOffset() == typeOffset
&& hssfFont.getUnderline() == underline)
{
return hssfFont;
}
}
return null;
}
代码示例来源:origin: stackoverflow.com
fontNew.setColor(fontOld.getColor());
fontNew.setFontName(fontOld.getFontName());
fontNew.setFontHeight(fontOld.getFontHeight());
fontNew.setItalic(fontOld.getItalic());
fontNew.setStrikeout(fontOld.getStrikeout());
代码示例来源:origin: com.bstek.ureport/ureport2-console
int fontSize=font.getFontHeight()/20;
style.setFontSize(fontSize);
BorderStyle borderStyle=cellStyle.getBorderLeftEnum();
内容来源于网络,如有侵权,请联系作者删除!