当前位置: 首页>>代码示例>>Java>>正文


Java Border.ALL属性代码示例

本文整理汇总了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;
}
 
开发者ID:loginus,项目名称:jexcelapi,代码行数:41,代码来源:XFRecord.java

示例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;  	
}
 
开发者ID:loginus,项目名称:jexcelapi,代码行数:41,代码来源:XFRecord.java

示例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);
}
 
开发者ID:loginus,项目名称:jexcelapi,代码行数:37,代码来源:CellXFRecord.java


注:本文中的jxl.format.Border.ALL属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。