本文整理汇总了Java中jxl.format.Border.ALL属性的典型用法代码示例。如果您正苦于以下问题:Java Border.ALL属性的具体用法?Java Border.ALL怎么用?Java Border.ALL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类jxl.format.Border
的用法示例。
在下文中一共展示了Border.ALL属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBorderLine
/**
* Gets the line style for the given cell border
* If a border type of ALL or NONE is specified, then a line style of
* NONE is returned
*
* @param border the cell border we are interested in
* @return the line style of the specified border
*/
public BorderLineStyle getBorderLine(Border border)
{
// Don't bother with the short cut records
if (border == Border.NONE ||
border == Border.ALL)
{
return BorderLineStyle.NONE;
}
if (!formatInfoInitialized)
{
initializeFormatInformation();
}
if (border == Border.LEFT)
{
return leftBorder;
}
else if (border == Border.RIGHT)
{
return rightBorder;
}
else if (border == Border.TOP)
{
return topBorder;
}
else if (border == Border.BOTTOM)
{
return bottomBorder;
}
return BorderLineStyle.NONE;
}
示例2: getBorderColour
/**
* Gets the line style for the given cell border
* If a border type of ALL or NONE is specified, then a line style of
* NONE is returned
*
* @param border the cell border we are interested in
* @return the line style of the specified border
*/
public Colour getBorderColour(Border border)
{
// Don't bother with the short cut records
if (border == Border.NONE ||
border == Border.ALL)
{
return Colour.PALETTE_BLACK;
}
if (!formatInfoInitialized)
{
initializeFormatInformation();
}
if (border == Border.LEFT)
{
return leftBorderColour;
}
else if (border == Border.RIGHT)
{
return rightBorderColour;
}
else if (border == Border.TOP)
{
return topBorderColour;
}
else if (border == Border.BOTTOM)
{
return bottomBorderColour;
}
return Colour.BLACK;
}
示例3: setBorder
/**
* Sets the border style for cells with this format
*
* @exception WriteException
* @param b the border
* @param ls the line for the specified border
*/
public void setBorder(Border b, BorderLineStyle ls, Colour c)
throws WriteException
{
if (isInitialized())
{
throw new JxlWriteException(JxlWriteException.formatInitialized);
}
if (b == Border.ALL)
{
// Apply to all
super.setXFBorder(Border.LEFT, ls, c);
super.setXFBorder(Border.RIGHT, ls, c);
super.setXFBorder(Border.TOP, ls, c);
super.setXFBorder(Border.BOTTOM, ls, c);
return;
}
if (b == Border.NONE)
{
// Apply to all
super.setXFBorder(Border.LEFT, BorderLineStyle.NONE, Colour.BLACK);
super.setXFBorder(Border.RIGHT, BorderLineStyle.NONE, Colour.BLACK);
super.setXFBorder(Border.TOP, BorderLineStyle.NONE, Colour.BLACK);
super.setXFBorder(Border.BOTTOM, BorderLineStyle.NONE, Colour.BLACK);
return;
}
super.setXFBorder(b, ls, c);
}