コード例 #1
0
 /**
  * Sets the specified border for this format
  *
  * @param b the border
  * @param ls the border line style
  * @param c the colour of the specified border
  * @exception jxl.write.WriteException
  */
 public override void setBorder(Border b, BorderLineStyle ls, Colour c)
 {
     base.setBorder(b, ls, c);
 }
コード例 #2
0
 /**
  * Dummy override
  * @param line dummy
  * @param border dummy
  */
 public void setBorder(Border border,BorderLineStyle line)
 {
 }
コード例 #3
0
 /**
  * Sets the specified border for this format
  *
  * @param b the border
  * @param ls the border line style
  * @exception jxl.write.WriteException
  */
 public void setBorder(Border b, BorderLineStyle ls)
 {
     base.setBorder(b, ls, Colour.BLACK);
 }
コード例 #4
0
        /**
         * Sets the border style for cells with this format
         *
         * @exception WriteException
         * @param b the border
         * @param ls the line for the specified border
         */
        public virtual void setBorder(Border b, BorderLineStyle ls, Colour c)
        {
            if (isInitialized())
                {
                throw new JxlWriteException(JxlWriteException.formatInitialized);
                }

            if (b == Border.ALL)
                {
                // Apply to all
                base.setXFBorder(Border.LEFT, ls, c);
                base.setXFBorder(Border.RIGHT, ls, c);
                base.setXFBorder(Border.TOP, ls, c);
                base.setXFBorder(Border.BOTTOM, ls, c);
                return;
                }

            if (b == Border.NONE)
                {
                // Apply to all
                base.setXFBorder(Border.LEFT, BorderLineStyle.NONE, Colour.BLACK);
                base.setXFBorder(Border.RIGHT, BorderLineStyle.NONE, Colour.BLACK);
                base.setXFBorder(Border.TOP, BorderLineStyle.NONE, Colour.BLACK);
                base.setXFBorder(Border.BOTTOM, BorderLineStyle.NONE, Colour.BLACK);
                return;
                }

            base.setXFBorder(b, ls, c);
        }
コード例 #5
0
        /**
         * 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;
        }
コード例 #6
0
        /**
         * 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;
        }
コード例 #7
0
 /**
  * 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 getBorder(Border border)
 {
     return getBorderLine(border);
 }
コード例 #8
0
        /**
         * Sets the border for this cell
         * This method should only be called from its writable subclass
         * CellXFRecord
         *
         * @param b the border
         * @param ls the border line style
         */
        protected void setXFBorder(Border b,BorderLineStyle ls,Colour c)
        {
            Assert.verify(!initialized);

            if (c == Colour.BLACK || c == Colour.UNKNOWN)
                {
                c = Colour.PALETTE_BLACK;
                }

            if (b == Border.LEFT)
                {
                leftBorder = ls;
                leftBorderColour = c;
                }
            else if (b == Border.RIGHT)
                {
                rightBorder = ls;
                rightBorderColour = c;
                }
            else if (b == Border.TOP)
                {
                topBorder = ls;
                topBorderColour = c;
                }
            else if (b == Border.BOTTOM)
                {
                bottomBorder = ls;
                bottomBorderColour = c;
                }

            usedAttributes |= USE_BORDER;

            return;
        }