⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rtfborder.java

📁 iText是一个能够快速产生PDF文件的java类库。iText的java类对于那些要产生包含文本
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/*
 * $Id: RtfBorder.java 2776 2007-05-23 20:01:40Z hallm $
 * $Name$
 *
 * Copyright 2001, 2002, 2003, 2004 by Mark Hall
 *
 * The contents of this file are subject to the Mozilla Public License Version 1.1
 * (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the License.
 *
 * The Original Code is 'iText, a free JAVA-PDF library'.
 *
 * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by
 * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.
 * All Rights Reserved.
 * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer
 * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.
 *
 * Contributor(s): all the names of the contributors are added in the source code
 * where applicable.
 *
 * Alternatively, the contents of this file may be used under the terms of the
 * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the
 * provisions of LGPL are applicable instead of those above.  If you wish to
 * allow use of your version of this file only under the terms of the LGPL
 * License and not to allow others to use your version of this file under
 * the MPL, indicate your decision by deleting the provisions above and
 * replace them with the notice and other provisions required by the LGPL.
 * If you do not delete the provisions above, a recipient may use your version
 * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.
 *
 * This library is free software; you can redistribute it and/or modify it
 * under the terms of the MPL as stated above or under the terms of the GNU
 * Library General Public License as published by the Free Software Foundation;
 * either version 2 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more
 * details.
 *
 * If you didn't download this code from the following link, you should check if
 * you aren't using an obsolete version:
 * http://www.lowagie.com/iText/
 */

package com.lowagie.text.rtf.table;

import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.OutputStream;

import com.lowagie.text.rtf.RtfElement;
import com.lowagie.text.rtf.document.RtfDocument;
import com.lowagie.text.rtf.style.RtfColor;


/**
 * The RtfBorder handle one row or cell border.
 * INTERNAL USE ONLY
 * 
 * @version $Id: RtfBorder.java 2776 2007-05-23 20:01:40Z hallm $
 * @author Mark Hall (mhall@edu.uni-klu.ac.at)
 * @author Thomas Bickel (tmb99@inode.at)
 */
public class RtfBorder extends RtfElement {

    /**
     * Constant for the left row border
     */
    protected static final byte[] ROW_BORDER_LEFT = "\\trbrdrl".getBytes();
    /**
     * Constant for the top row border
     */
    protected static final byte[] ROW_BORDER_TOP = "\\trbrdrt".getBytes();
    /**
     * Constant for the right row border
     */
    protected static final byte[] ROW_BORDER_RIGHT = "\\trbrdrr".getBytes();
    /**
     * Constant for the bottom row border
     */
    protected static final byte[] ROW_BORDER_BOTTOM = "\\trbrdrb".getBytes();
    /**
     * Constant for the horizontal line
     */
    protected static final byte[] ROW_BORDER_HORIZONTAL = "\\trbrdrh".getBytes();
    /**
     * Constant for the vertical line
     */
    protected static final byte[] ROW_BORDER_VERTICAL = "\\trbrdrv".getBytes();
    /**
     * Constant for the left cell border
     */
    protected static final byte[] CELL_BORDER_LEFT = "\\clbrdrl".getBytes();
    /**
     * Constant for the top cell border
     */
    protected static final byte[] CELL_BORDER_TOP = "\\clbrdrt".getBytes();
    /**
     * Constant for the right cell border
     */
    protected static final byte[] CELL_BORDER_RIGHT = "\\clbrdrr".getBytes();
    /**
     * Constant for the bottom cell border
     */
    protected static final byte[] CELL_BORDER_BOTTOM = "\\clbrdrb".getBytes();
    /**
     * Constant for the border width
     */
    protected static final byte[] BORDER_WIDTH = "\\brdrw".getBytes();
    /**
     * Constant for the border colour number
     */
    protected static final byte[] BORDER_COLOR_NUMBER = "\\brdrcf".getBytes();
    /**
     * Constant for the single border style
     */
    protected static final byte[] BORDER_STYLE_SINGLE = "\\brdrs".getBytes();
    /**
     * Constant for the double thick border style
     */
    protected static final byte[] BORDER_STYLE_DOUBLE_THICK	= "\\brdrth".getBytes();
    /**
     * Constant for the shadowed border style
     */
    protected static final byte[] BORDER_STYLE_SHADOWED = "\\brdrsh".getBytes();
    /**
     * Constant for the dotted border style
     */
    protected static final byte[] BORDER_STYLE_DOTTED = "\\brdrdot".getBytes();
    /**
     * Constant for the dashed border style
     */
    protected static final byte[] BORDER_STYLE_DASHED = "\\brdrdash".getBytes();
    /**
     * Constant for the hairline border style
     */
    protected static final byte[] BORDER_STYLE_HAIRLINE = "\\brdrhair".getBytes();
    /**
     * Constant for the double border style
     */
    protected static final byte[] BORDER_STYLE_DOUBLE = "\\brdrdb".getBytes();
    /**
     * Constant for the dot dash border style
     */
    protected static final byte[] BORDER_STYLE_DOT_DASH = "\\brdrdashd".getBytes();
    /**
     * Constant for the dot dot dash border style
     */
    protected static final byte[] BORDER_STYLE_DOT_DOT_DASH	= "\\brdrdashdd".getBytes();
    /**
     * Constant for the triple border style
     */
    protected static final byte[] BORDER_STYLE_TRIPLE = "\\brdrtriple".getBytes();
    /**
     * Constant for the thick thin border style
     */
    protected static final byte[] BORDER_STYLE_THICK_THIN = "\\brdrtnthsg".getBytes();
    /**
     * Constant for the thin thick border style
     */
    protected static final byte[] BORDER_STYLE_THIN_THICK = "\\brdrthtnsg".getBytes();
    /**
     * Constant for the thin thick thin border style
     */
    protected static final byte[] BORDER_STYLE_THIN_THICK_THIN = "\\brdrtnthtnsg".getBytes();
    /**
     * Constant for the thick thin medium border style
     */
    protected static final byte[] BORDER_STYLE_THICK_THIN_MED = "\\brdrtnthmg".getBytes();
    /**
     * Constant for the thin thick medium border style
     */
    protected static final byte[] BORDER_STYLE_THIN_THICK_MED = "\\brdrthtnmg".getBytes();
    /**
     * Constant for the thin thick thin medium border style
     */
    protected static final byte[] BORDER_STYLE_THIN_THICK_THIN_MED = "\\brdrtnthtnmg".getBytes();
    /**
     * Constant for the thick thin large border style
     */
    protected static final byte[] BORDER_STYLE_THICK_THIN_LARGE = "\\brdrtnthlg".getBytes();
    /**
     * Constant for the thin thick large border style
     */
    protected static final byte[] BORDER_STYLE_THIN_THICK_LARGE	= "\\brdrthtnlg".getBytes();
    /**
     * Constant for the thin thick thin large border style
     */
    protected static final byte[] BORDER_STYLE_THIN_THICK_THIN_LARGE = "\\brdrtnthtnlg".getBytes();
    /**
     * Constant for the wavy border style
     */
    protected static final byte[] BORDER_STYLE_WAVY = "\\brdrwavy".getBytes();
    /**
     * Constant for the double wavy border style
     */
    protected static final byte[] BORDER_STYLE_DOUBLE_WAVY = "\\brdrwavydb".getBytes();
    /**
     * Constant for the striped border style
     */
    protected static final byte[] BORDER_STYLE_STRIPED = "\\brdrdashdotstr".getBytes();
    /**
     * Constant for the embossed border style
     */
    protected static final byte[] BORDER_STYLE_EMBOSS = "\\brdremboss".getBytes();
    /**
     * Constant for the engraved border style
     */
    protected static final byte[] BORDER_STYLE_ENGRAVE = "\\brdrengrave".getBytes();

    /**
     * Constant for a row border
     */
    protected static final int ROW_BORDER = 1;
    /**
     * Constant for a cell border
     */
    protected static final int CELL_BORDER = 2;
    
    /**
     * This border is no border :-)
     */
    protected static final int NO_BORDER = 0;
    /**
     * Constant for a left border
     */
    protected static final int LEFT_BORDER = 1;
    /**
     * Constant for a top border
     */
    protected static final int TOP_BORDER = 2;
    /**
     * Constant for a right border
     */
    protected static final int RIGHT_BORDER = 4;
    /**
     * Constant for a bottom border
     */
    protected static final int BOTTOM_BORDER = 8;
    /**
     * Constant for a box (left, top, right, bottom) border 
     */
    protected static final int BOX_BORDER = 15;
    /**
     * Constant for a vertical line
     */
    protected static final int VERTICAL_BORDER = 16;
    /**
     * Constant for a horizontal line
     */
    protected static final int HORIZONTAL_BORDER = 32;
    
    /**
     * Constant for a border with no border
     */
    public static final int BORDER_NONE = 0;
    /**
     * Constant for a single border
     */
    public static final int BORDER_SINGLE = 1;
    /**
     * Constant for a double thick border
     */
    public static final int BORDER_DOUBLE_THICK = 2;
    /**
     * Constant for a shadowed border
     */
    public static final int BORDER_SHADOWED = 3;
    /**
     * Constant for a dotted border
     */
    public static final int BORDER_DOTTED = 4;
    /**
     * Constant for a dashed border
     */
    public static final int BORDER_DASHED = 5;
    /**
     * Constant for a hairline border
     */
    public static final int BORDER_HAIRLINE = 6;
    /**
     * Constant for a double border
     */
    public static final int BORDER_DOUBLE = 7;
    /**
     * Constant for a dot dash border
     */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -