亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? columntext.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * $Id: ColumnText.java,v 1.28 2002/11/19 08:33:35 blowagie Exp $ * $Name:  $ * * Copyright 2001, 2002 by Paulo Soares. * * 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.pdf;import java.util.ArrayList;import java.util.Iterator;import com.lowagie.text.Phrase;import com.lowagie.text.Chunk;import com.lowagie.text.Element;import com.lowagie.text.DocumentException;/** * Formats text in a columnwise form. The text is bound * on the left and on the right by a sequence of lines. This allows the column * to have any shape, not only rectangular. * <P> * Several parameters can be set like the first paragraph line indent and * extra space between paragraphs. * <P> * A call to the method <CODE>go</CODE> will return one of the following * situations: the column ended or the text ended. * <P> * I the column ended, a new column definition can be loaded with the method * <CODE>setColumns</CODE> and the method <CODE>go</CODE> can be called again. * <P> * If the text ended, more text can be loaded with <CODE>addText</CODE> * and the method <CODE>go</CODE> can be called again.<BR> * The only limitation is that one or more complete paragraphs must be loaded * each time. * <P> * Full bidirectional reordering is supported. If the run direction is * <CODE>PdfWriter.RUN_DIRECTION_RTL</CODE> the meaning of the horizontal * alignments and margins is mirrored. * @author Paulo Soares (psoares@consiste.pt) */public class ColumnText {        protected int runDirection = PdfWriter.RUN_DIRECTION_DEFAULT;    public static final float GLOBAL_SPACE_CHAR_RATIO = 0;        /** Signals that there is no more text available. */    public static final int NO_MORE_TEXT = 1;        /** Signals that there is no more column. */    public static final int NO_MORE_COLUMN = 2;        /** The column is valid. */    protected static final int LINE_STATUS_OK = 0;        /** The line is out the column limits. */    protected static final int LINE_STATUS_OFFLIMITS = 1;        /** The line cannot fit this column position. */    protected static final int LINE_STATUS_NOLINE = 2;        /** Upper bound of the column. */    protected float maxY;        /** Lower bound of the column. */    protected float minY;        /** The column alignment. Default is left alignment. */    protected int alignment = Element.ALIGN_LEFT;        /** The left column bound. */    protected ArrayList leftWall;        /** The right column bound. */    protected ArrayList rightWall;        /** The chunks that form the text. *///    protected ArrayList chunks = new ArrayList();    protected BidiLine bidiLine = new BidiLine();        /** The current y line location. Text will be written at this line minus the leading. */    protected float yLine;        /** The leading for the current line. */    protected float currentLeading = 16;        /** The fixed text leading. */    protected float fixedLeading = 16;        /** The text leading that is multiplied by the biggest font size in the line. */    protected float multipliedLeading = 0;        /** The <CODE>PdfContent</CODE> where the text will be written to. */    protected PdfContentByte canvas;        /** The line status when trying to fit a line to a column. */    protected int lineStatus;        /** The first paragraph line indent. */    protected float indent = 0;        /** The following paragraph lines indent. */    protected float followingIndent = 0;        /** The right paragraph lines indent. */    protected float rightIndent = 0;        /** The extra space between paragraphs. */    protected float extraParagraphSpace = 0;        /** Marks the chunks to be eliminated when the line is written. */    protected int currentChunkMarker = -1;        /** The chunk created by the splitting. */    protected PdfChunk currentStandbyChunk;        /** The chunk created by the splitting. */    protected String splittedChunkText;        /** The width of the line when the column is defined as a simple rectangle. */    protected float rectangularWidth = -1;        /** Holds value of property spaceCharRatio. */    private float spaceCharRatio = GLOBAL_SPACE_CHAR_RATIO;    private boolean lastWasNewline = true;    /**     * Creates a <CODE>ColumnText</CODE>.     * @param canvas the place where the text will be written to. Can     * be a template.     */    public ColumnText(PdfContentByte canvas) {        this.canvas = canvas;    }        /**     * Adds a <CODE>Phrase</CODE> to the current text array.     * @param phrase the text     */    public void addText(Phrase phrase) {        for (Iterator j = phrase.getChunks().iterator(); j.hasNext();) {            bidiLine.addChunk(new PdfChunk((Chunk)j.next(), null));        }    }        /**     * Adds a <CODE>Chunk</CODE> to the current text array.     * @param chunk the text     */    public void addText(Chunk chunk) {        bidiLine.addChunk(new PdfChunk(chunk, null));    }        /**     * Converts a sequence of lines representing one of the column bounds into     * an internal format.     * <p>     * Each array element will contain a <CODE>float[4]</CODE> representing     * the line x = ax + b.     * @param cLine the column array     * @return the converted array     */    protected ArrayList convertColumn(float cLine[]) {        if (cLine.length < 4)            throw new RuntimeException("No valid column line found.");        ArrayList cc = new ArrayList();        for (int k = 0; k < cLine.length - 2; k += 2) {            float x1 = cLine[k];            float y1 = cLine[k + 1];            float x2 = cLine[k + 2];            float y2 = cLine[k + 3];            if (y1 == y2)                continue;            // x = ay + b            float a = (x1 - x2) / (y1 - y2);            float b = x1 - a * y1;            float r[] = new float[4];            r[0] = Math.min(y1, y2);            r[1] = Math.max(y1, y2);            r[2] = a;            r[3] = b;            cc.add(r);            maxY = Math.max(maxY, r[1]);            minY = Math.min(minY, r[0]);        }        if (cc.size() == 0)            throw new RuntimeException("No valid column line found.");        return cc;    }        /**     * Finds the intersection between the <CODE>yLine</CODE> and the column. It will     * set the <CODE>lineStatus</CODE> apropriatly.     * @param wall the column to intersect     * @return the x coordinate of the intersection     */    protected float findLimitsPoint(ArrayList wall) {        lineStatus = LINE_STATUS_OK;        if (yLine < minY || yLine > maxY) {            lineStatus = LINE_STATUS_OFFLIMITS;            return 0;        }        for (int k = 0; k < wall.size(); ++k) {            float r[] = (float[])wall.get(k);            if (yLine < r[0] || yLine > r[1])                continue;            return r[2] * yLine + r[3];        }        lineStatus = LINE_STATUS_NOLINE;        return 0;    }        /**     * Finds the intersection between the <CODE>yLine</CODE> and the two     * column bounds. It will set the <CODE>lineStatus</CODE> apropriatly.     * @return a <CODE>float[2]</CODE>with the x coordinates of the intersection     */    protected float[] findLimitsOneLine() {        for (;;) {            float x1 = findLimitsPoint(leftWall);            if (lineStatus == LINE_STATUS_OFFLIMITS || lineStatus == LINE_STATUS_NOLINE)                return null;            float x2 = findLimitsPoint(rightWall);            if (lineStatus == LINE_STATUS_NOLINE)                return null;            return new float[]{x1, x2};        }    }        /**     * Finds the intersection between the <CODE>yLine</CODE>,     * the <CODE>yLine-leading</CODE>and the two     * column bounds. It will set the <CODE>lineStatus</CODE> apropriatly.     * @return a <CODE>float[4]</CODE>with the x coordinates of the intersection     */    protected float[] findLimitsTwoLines() {        for (;;) {            float x1[] = findLimitsOneLine();            if (lineStatus == LINE_STATUS_OFFLIMITS)                return null;            yLine -= currentLeading;            if (lineStatus == LINE_STATUS_NOLINE) {                continue;            }            float x2[] = findLimitsOneLine();            if (lineStatus == LINE_STATUS_OFFLIMITS)                return null;            if (lineStatus == LINE_STATUS_NOLINE) {                yLine -= currentLeading;                continue;            }            if (x1[0] >= x2[1] || x2[0] >= x1[1])                continue;            return new float[]{x1[0], x1[1], x2[0], x2[1]};        }    }        /**     * Sets the columns bounds. Each column bound is described by a     * <CODE>float[]</CODE> with the line points [x1,y1,x2,y2,...].     * The array must have at least 4 elements.     * @param leftLine the left column bound     * @param rightLine the right column bound     */    public void setColumns(float leftLine[], float rightLine[]) {        rightWall = convertColumn(rightLine);        leftWall = convertColumn(leftLine);        rectangularWidth = -1;    }        /**     * Simplified method for rectangular columns.     * @param phrase a <CODE>Phrase</CODE>     * @param llx the lower left x corner     * @param lly the lower left y corner     * @param urx the upper right x corner     * @param ury the upper right y corner     * @param leading the leading     * @param alignment the column alignment     */    public void setSimpleColumn(Phrase phrase, float llx, float lly, float urx, float ury, float leading, int alignment) {        addText(phrase);        setSimpleColumn(llx, lly, urx, ury, leading, alignment);    }        /**     * Simplified method for rectangular columns.     * @param llx the lower left x corner     * @param lly the lower left y corner     * @param urx the upper right x corner     * @param ury the upper right y corner     * @param leading the leading     * @param alignment the column alignment     */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区视频| 欧美一级国产精品| 久久精品国产免费| 日韩美女久久久| 久久久国产一区二区三区四区小说| 一本色道久久综合精品竹菊| 紧缚捆绑精品一区二区| 一区二区三区四区在线| 国产亚洲综合性久久久影院| 欧美精品高清视频| 91麻豆swag| 国产aⅴ综合色| 国产乱人伦偷精品视频免下载 | 精品久久人人做人人爱| 色综合一区二区| 国产成人8x视频一区二区 | 亚洲丶国产丶欧美一区二区三区| 中文字幕欧美日韩一区| 欧美成人一区二区| 在线综合亚洲欧美在线视频| 色噜噜狠狠成人网p站| 成人亚洲一区二区一| 国产一级精品在线| 久久精品久久99精品久久| 午夜精品一区在线观看| 亚洲激情图片一区| 中文字幕一区二区在线观看 | 精品少妇一区二区三区| 欧美剧情片在线观看| 色系网站成人免费| 成人高清免费在线播放| 粉嫩aⅴ一区二区三区四区五区| 国产精品一线二线三线| 国产另类ts人妖一区二区| 国内精品写真在线观看| 韩国欧美国产一区| 国产精品一区二区男女羞羞无遮挡 | 亚洲欧美电影一区二区| 亚洲色图另类专区| 国产精品福利电影一区二区三区四区| 国产日韩影视精品| 国产蜜臀av在线一区二区三区| 国产色爱av资源综合区| 久久综合九色综合欧美就去吻| 精品粉嫩aⅴ一区二区三区四区| 欧美r级在线观看| 久久久蜜桃精品| 欧美国产综合一区二区| 国产精品美日韩| 亚洲人成7777| 五月综合激情日本mⅴ| 天堂一区二区在线| 精彩视频一区二区三区| 国产精品66部| 91麻豆精品秘密| 欧美午夜一区二区| 91精品国产综合久久福利| 日韩午夜精品电影| 久久久久久久综合日本| 欧美高清在线视频| 亚洲人成网站色在线观看| 亚洲综合偷拍欧美一区色| 日韩电影在线观看一区| 国产一区二区精品久久99| 岛国av在线一区| 91成人在线精品| 日韩三级.com| 国产精品久线观看视频| 亚洲电影一级片| 麻豆极品一区二区三区| 成人一道本在线| 欧美色图片你懂的| 日韩欧美一级二级三级| 亚洲国产精品传媒在线观看| 一区二区三区久久久| 日本va欧美va欧美va精品| 国产精品资源在线| 日本韩国欧美三级| 日韩精品在线一区| 1024国产精品| 久久精品99国产精品日本| 成人91在线观看| 99久免费精品视频在线观看| 欧美丝袜丝交足nylons| 久久久精品国产免大香伊| 亚洲精品成人精品456| 久久99这里只有精品| 色偷偷一区二区三区| 精品国产区一区| 亚洲一区在线视频观看| 国产一区二区影院| 欧美三区在线视频| 国产精品黄色在线观看| 日韩电影一二三区| 99久久99久久综合| 欧美成人一区二区三区| 亚洲人成电影网站色mp4| 精品亚洲国内自在自线福利| 色88888久久久久久影院野外| 日韩视频一区二区三区在线播放| 国产精品美女视频| 久久精品久久久精品美女| 欧美视频在线不卡| 国产精品免费久久久久| 日韩电影在线免费看| 色天使色偷偷av一区二区| 久久久不卡影院| 精品在线一区二区| 91麻豆精品国产无毒不卡在线观看| 国产精品国产三级国产三级人妇 | 日本欧美一区二区三区乱码| proumb性欧美在线观看| 精品国产免费一区二区三区四区| 亚洲最大色网站| 99re热这里只有精品视频| 国产三级精品视频| 韩日av一区二区| 欧美成人激情免费网| 午夜精品aaa| 欧美性生活大片视频| 中文字幕在线观看一区二区| 高清av一区二区| 国产网站一区二区三区| 精品影视av免费| 26uuu国产电影一区二区| 久久精品国产亚洲5555| 91麻豆精品国产综合久久久久久| 一级精品视频在线观看宜春院| 成人免费高清视频| 亚洲国产精品成人综合 | 亚洲欧美精品午睡沙发| 成人黄色免费短视频| 国产性天天综合网| 国产一区二区免费看| 26uuu久久天堂性欧美| 卡一卡二国产精品| 欧美电视剧在线观看完整版| 精一区二区三区| 久久久久国产精品人| 国产精品一二三四区| 久久久久久久久久电影| 国产黄色精品视频| 国产精品久久久久影院色老大| 成人综合激情网| 国产精品久久久久久户外露出| 成人av网在线| 亚洲男帅同性gay1069| 欧美性猛交xxxxxx富婆| 日韩av网站在线观看| 欧美成人艳星乳罩| 国内精品视频一区二区三区八戒| 久久精品人人爽人人爽| 成人网男人的天堂| 亚洲免费观看在线观看| 精品视频一区二区不卡| 日本麻豆一区二区三区视频| 精品久久国产老人久久综合| 国产精品一二三区在线| 国产精品福利一区二区三区| 欧美影视一区二区三区| 日韩av一二三| 亚洲国产精品成人久久综合一区| 91热门视频在线观看| 午夜精品久久久久影视| 亚洲精品一线二线三线| 国产成人午夜99999| 亚洲视频图片小说| 日韩一区国产二区欧美三区| 国产乱子轮精品视频| 最近中文字幕一区二区三区| 欧美日韩你懂的| 国产伦精品一区二区三区在线观看| 国产精品免费视频网站| 欧美人妇做爰xxxⅹ性高电影| 国模娜娜一区二区三区| 中文字幕日韩欧美一区二区三区| 欧美日韩高清一区| 国产一区不卡在线| 亚洲一区二区三区在线看| 欧美第一区第二区| 色婷婷狠狠综合| 国产在线一区二区| 亚洲午夜久久久久久久久电影网| 日韩天堂在线观看| 99久久夜色精品国产网站| 日韩电影在线免费| 亚洲人成在线播放网站岛国| 日韩欧美国产一区在线观看| 北条麻妃国产九九精品视频| 奇米色777欧美一区二区| 国产精品久久久99| 91精品国产综合久久福利 | 日韩小视频在线观看专区| 成人av一区二区三区| 奇米在线7777在线精品| 一区二区三区在线视频免费观看| 久久久久国产精品人| 制服丝袜成人动漫| 91啪亚洲精品| 国产99久久精品|