本文整理了Java中org.apache.poi.hssf.usermodel.HSSFFont.getUnderline()
方法的一些代码示例,展示了HSSFFont.getUnderline()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HSSFFont.getUnderline()
方法的具体详情如下:
包路径:org.apache.poi.hssf.usermodel.HSSFFont
类名称:HSSFFont
方法名:getUnderline
[英]get type of text underlining to use
[中]获取要使用的文本下划线类型
代码示例来源: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: QihooTest/Leo
byte underline = cell.getCellStyle().getFont(workbook).getUnderline();
if (underline == 1) {
primaryKeyList.add(columnName);
代码示例来源: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: 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.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.setStrikeout(fontOld.getStrikeout());
fontNew.setTypeOffset(fontOld.getTypeOffset());
fontNew.setUnderline(fontOld.getUnderline());
return fontNew;
代码示例来源:origin: jasperreports/jasperreports
(cf.getColor() == forecolor) &&
(cf.getFontHeightInPoints() == fontSize) &&
((cf.getUnderline() == HSSFFont.U_SINGLE)?(font.isUnderline()):(!font.isUnderline())) &&
(cf.getStrikeout() == font.isStrikeThrough()) &&
((cf.getBoldweight() == HSSFFont.BOLDWEIGHT_BOLD)?(font.isBold()):(!font.isBold())) &&
代码示例来源:origin: cuba-platform/yarg
newFont.setCharSet(cellFont.getCharSet());
newFont.setColor(cellFont.getColor());
newFont.setUnderline(cellFont.getUnderline());
newFont.setFontHeight(cellFont.getFontHeight());
newFont.setFontHeightInPoints(cellFont.getFontHeightInPoints());
代码示例来源:origin: com.haulmont.yarg/yarg
newFont.setCharSet(cellFont.getCharSet());
newFont.setColor(cellFont.getColor());
newFont.setUnderline(cellFont.getUnderline());
newFont.setFontHeight(cellFont.getFontHeight());
newFont.setFontHeightInPoints(cellFont.getFontHeightInPoints());
代码示例来源:origin: com.bstek.ureport/ureport2-console
style.setItalic(true);
if(font.getUnderline()!=Font.U_NONE){
style.setUnderline(true);
内容来源于网络,如有侵权,请联系作者删除!