本文整理汇总了Java中org.apache.poi.ss.usermodel.BorderStyle.DASHED属性的典型用法代码示例。如果您正苦于以下问题:Java BorderStyle.DASHED属性的具体用法?Java BorderStyle.DASHED怎么用?Java BorderStyle.DASHED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.poi.ss.usermodel.BorderStyle
的用法示例。
在下文中一共展示了BorderStyle.DASHED属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBorderStyle
private BorderStyle getBorderStyle(Border border){
if(border.getStyle().equals(com.bstek.ureport.definition.BorderStyle.solid)){
return BorderStyle.THIN;
}else if(border.getStyle().equals(com.bstek.ureport.definition.BorderStyle.dashed)){
return BorderStyle.DASHED;
}else if(border.getStyle().equals(com.bstek.ureport.definition.BorderStyle.doublesolid)){
return BorderStyle.DOUBLE;
}
return null;
}
示例2: getBorderStyle
/**
*
*/
protected static BorderStyle getBorderStyle(JRPen pen) {
float lineWidth = pen.getLineWidth().floatValue();
if (lineWidth > 0f) {
switch (pen.getLineStyleValue()) {
case DOUBLE : {
return BorderStyle.DOUBLE;
}
case DOTTED : {
return BorderStyle.DOTTED;
}
case DASHED : {
if (lineWidth >= 1f) {
return BorderStyle.MEDIUM_DASHED;
}
return BorderStyle.DASHED;
}
case SOLID :
default : {
if (lineWidth >= 2f) {
return BorderStyle.THICK;
}
else if (lineWidth >= 1f) {
return BorderStyle.MEDIUM;
} else if (lineWidth >= 0.5f) {
return BorderStyle.THIN;
}
return BorderStyle.HAIR;
}
}
}
return BorderStyle.NONE;
}
示例3: getBorderStyle
/**
*
*/
protected static BorderStyle getBorderStyle(JRPen pen)
{
float lineWidth = pen.getLineWidth().floatValue();
if (lineWidth > 0f)
{
switch (pen.getLineStyleValue())
{
case DOUBLE :
{
return BorderStyle.DOUBLE;
}
case DOTTED :
{
return BorderStyle.DOTTED;
}
case DASHED :
{
if (lineWidth >= 1f)
{
return BorderStyle.MEDIUM_DASHED;
}
return BorderStyle.DASHED;
}
case SOLID :
default :
{
if (lineWidth >= 2f)
{
return BorderStyle.THICK;
}
else if (lineWidth >= 1f)
{
return BorderStyle.MEDIUM;
}
else if (lineWidth >= 0.5f)
{
return BorderStyle.THIN;
}
return BorderStyle.HAIR;
}
}
}
return BorderStyle.NONE;
}
示例4: poiBorderStyleFromBirt
/**
* Converts a BIRT border style into a POI BorderStyle.
* @param birtBorder
* The BIRT border style.
* @param width
* The width of the border as understood by BIRT.
* @return
* A POI BorderStyle object.
*/
private BorderStyle poiBorderStyleFromBirt( String birtBorder, String width ) {
if( "none".equals(birtBorder) ) {
return BorderStyle.NONE;
}
double pxWidth = 3.0;
if( CSSConstants.CSS_THIN_VALUE.equals( width ) ) {
pxWidth = 1.0;
} else if( CSSConstants.CSS_MEDIUM_VALUE.equals( width ) ) {
pxWidth = 3.0;
} else if( CSSConstants.CSS_THICK_VALUE.equals( width ) ) {
pxWidth = 4.0;
} else {
DimensionType dim = DimensionType.parserUnit( width );
if( dim != null ) {
if( "px".equals(dim.getUnits()) ) {
pxWidth = dim.getMeasure();
}
}
}
if( "solid".equals(birtBorder) ) {
if( pxWidth < 2.9 ) {
return BorderStyle.THIN;
} else if( pxWidth < 3.1 ) {
return BorderStyle.MEDIUM;
} else {
return BorderStyle.THICK;
}
} else if( "dashed".equals(birtBorder) ) {
if( pxWidth < 2.9 ) {
return BorderStyle.DASHED;
} else {
return BorderStyle.MEDIUM_DASHED;
}
} else if( "dotted".equals(birtBorder) ) {
return BorderStyle.DOTTED;
} else if( "double".equals(birtBorder) ) {
return BorderStyle.DOUBLE;
}
log.debug( "Border style \"", birtBorder, "\" is not recognised." );
return BorderStyle.NONE;
}