Logo Search packages:      
Sourcecode: jexcelapi version File versions  Download package

Colour jxl::biff::XFRecord::getBorderColour ( Border  border  )  [inline, inherited]

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

Parameters:
border the cell border we are interested in
Returns:
the line style of the specified border

Implements jxl::format::CellFormat.

Definition at line 1155 of file XFRecord.java.

References jxl::format::Border::ALL, jxl::format::Colour::BLACK, jxl::format::Border::BOTTOM, jxl::biff::XFRecord::bottomBorderColour, jxl::biff::XFRecord::formatInfoInitialized, jxl::biff::XFRecord::initializeFormatInformation(), jxl::format::Border::LEFT, jxl::biff::XFRecord::leftBorderColour, jxl::format::Border::NONE, jxl::format::Colour::PALETTE_BLACK, jxl::format::Border::RIGHT, jxl::biff::XFRecord::rightBorderColour, jxl::format::Border::TOP, and jxl::biff::XFRecord::topBorderColour.

Referenced by jxl::write::biff::SheetWriter::checkMergedBorders().

  {
    // 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;      
  }


Generated by  Doxygen 1.6.0   Back to index