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

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

?? verticaltext.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
字號:
/* * * Copyright 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;import java.awt.Color;/** Writes text vertically. Note that the naming is done according * to horizontal text although it referrs to vertical text. * A line with the alignment Element.LEFT_ALIGN will actually * be top aligned. */public class VerticalText {/** Signals that there are 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 chunks that form the text. */        protected ArrayList chunks = new ArrayList();    /** The <CODE>PdfContent</CODE> where the text will be written to. */        protected PdfContentByte text;        /** The column alignment. Default is left alignment. */    protected int alignment = Element.ALIGN_LEFT;    /** 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 leading     */        protected float leading;        /** The X coordinate.     */        protected float startX;        /** The Y coordinate.     */        protected float startY;        /** The maximum number of vertical lines.     */        protected int maxLines;        /** The height of the text.     */        protected float height;        /** Creates new VerticalText     * @param text the place where the text will be written to. Can     * be a template.     */    public VerticalText(PdfContentByte text) {        this.text = text;    }        /**     * 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();) {            chunks.add(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) {        chunks.add(new PdfChunk(chunk, null));    }    /** Sets the layout.     * @param startX the top right X line position     * @param startY the top right Y line position     * @param height the height of the lines     * @param maxLines the maximum number of lines     * @param leading the separation between the lines     */        public void setVerticalLayout(float startX, float startY, float height, int maxLines, float leading) {        this.startX = startX;        this.startY = startY;        this.height = height;        this.maxLines = maxLines;        setLeading(leading);    }        /** Sets the separation between the vertical lines.     * @param leading the vertical line separation     */        public void setLeading(float leading) {        this.leading = leading;    }    /** Gets the separation between the vertical lines.     * @return the vertical line separation     */        public float getLeading() {        return leading;    }        /**     * Creates a line from the chunk array.     * @param width the width of the line     * @return the line or null if no more chunks     */    protected PdfLine createLine(float width) {        if (chunks.size() == 0)            return null;        splittedChunkText = null;        currentStandbyChunk = null;        PdfLine line = new PdfLine(0, width, alignment, 0);        String total;        for (currentChunkMarker = 0; currentChunkMarker < chunks.size(); ++currentChunkMarker) {            PdfChunk original = (PdfChunk)(chunks.get(currentChunkMarker));            total = original.toString();            currentStandbyChunk = line.add(original);            if (currentStandbyChunk != null) {                splittedChunkText = original.toString();                original.setValue(total);                return line;            }        }        return line;    }        /**     * Normalizes the list of chunks when the line is accepted.     */    protected void shortenChunkArray() {        if (currentChunkMarker < 0)            return;        if (currentChunkMarker >= chunks.size()) {            chunks.clear();            return;        }        PdfChunk split = (PdfChunk)(chunks.get(currentChunkMarker));        split.setValue(splittedChunkText);        chunks.set(currentChunkMarker, currentStandbyChunk);        for (int j = currentChunkMarker - 1; j >= 0; --j)            chunks.remove(j);    }    /**     * Outputs the lines to the document. It is equivalent to <CODE>go(false)</CODE>.     * @return returns the result of the operation. It can be <CODE>NO_MORE_TEXT</CODE>     * and/or <CODE>NO_MORE_COLUMN</CODE>     * @throws DocumentException on error     */    public int go() throws DocumentException {        return go(false);    }        /**     * Outputs the lines to the document. The output can be simulated.     * @param simulate <CODE>true</CODE> to simulate the writting to the document     * @return returns the result of the operation. It can be <CODE>NO_MORE_TEXT</CODE>     * and/or <CODE>NO_MORE_COLUMN</CODE>     * @throws DocumentException on error     */    public int go(boolean simulate) throws DocumentException {        boolean dirty = false;        PdfContentByte graphics = null;        if (text != null) {            graphics = text.getDuplicate();        }        else if (simulate == false)            throw new NullPointerException("VerticalText.go with simulate==false and text==null.");        int status = 0;        for (;;) {            if (maxLines <= 0) {                status = NO_MORE_COLUMN;                if (chunks.size() == 0)                    status |= NO_MORE_TEXT;                break;            }            if (chunks.size() == 0) {                status = NO_MORE_TEXT;                break;            }            PdfLine line = createLine(height);            if (!simulate && !dirty) {                text.beginText();                dirty = true;            }            shortenChunkArray();            if (!simulate) {                text.setTextMatrix(startX, startY - line.indentLeft());                writeLine(line, text, graphics);            }            --maxLines;            startX -= leading;        }        if (dirty) {            text.endText();            text.add(graphics);        }        return status;    }        void writeLine(PdfLine line, PdfContentByte text, PdfContentByte graphics)  throws DocumentException {        PdfFont currentFont = null;        PdfChunk chunk;        for (Iterator j = line.iterator(); j.hasNext(); ) {            chunk = (PdfChunk) j.next();                        if (chunk.font().compareTo(currentFont) != 0) {                currentFont = chunk.font();                text.setFontAndSize(currentFont.getFont(), currentFont.size());            }            Color color = chunk.color();            if (color != null)                text.setColorFill(color);            text.showText(chunk.toString());            if (color != null)                text.resetRGBColorFill();        }    }        /** Sets the new text origin.     * @param startX the X coordinate     * @param startY the Y coordinate     */        public void setOrigin(float startX, float startY) {        this.startX = startX;        this.startY = startY;    }        /** Gets the X coordinate where the next line will be writen. This value will change     * after each call to <code>go()</code>.     * @return  the X coordinate     */        public float getOriginX() {        return startX;    }    /** Gets the Y coordinate where the next line will be writen.     * @return  the Y coordinate     */        public float getOriginY() {        return startY;    }        /** Gets the maximum number of available lines. This value will change     * after each call to <code>go()</code>.     * @return Value of property maxLines.     */    public int getMaxLines() {        return maxLines;    }        /** Sets the maximum number of lines.     * @param maxLines the maximum number of lines     */    public void setMaxLines(int maxLines) {        this.maxLines = maxLines;    }        /** Gets the height of the line     * @return the height     */    public float getHeight() {        return height;    }        /** Sets the height of the line     * @param height the new height     */    public void setHeight(float height) {        this.height = height;    }        /**     * Sets the alignment.     * @param alignment the alignment     */    public void setAlignment(int alignment) {        this.alignment = alignment;    }        /**     * Gets the alignment.     * @return the alignment     */    public int getAlignment() {        return alignment;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女高潮久久久| 亚洲一区二区在线观看视频 | 91农村精品一区二区在线| 久久先锋资源网| 国产成人精品亚洲777人妖| 国产精品久久久久久福利一牛影视| 国产电影一区二区三区| 中文一区二区完整视频在线观看| 99综合影院在线| 香蕉久久夜色精品国产使用方法| 日韩欧美一区二区久久婷婷| 国产精品综合二区| 日韩伦理av电影| 7777精品久久久大香线蕉| 韩国精品免费视频| 中文字幕一区日韩精品欧美| 在线免费观看日本一区| 麻豆精品视频在线观看视频| 国产三级精品在线| 欧美三级三级三级爽爽爽| 久久国产精品72免费观看| 国产精品久久久久久亚洲伦| 欧美午夜精品电影| 国产一区二区调教| 亚洲激情一二三区| 精品国产污污免费网站入口 | 国产精品网站在线观看| 欧美亚洲综合久久| 国产露脸91国语对白| 亚洲精品五月天| 精品久久久久99| 在线精品国精品国产尤物884a| 久久精品国产亚洲高清剧情介绍| 国产精品二三区| 日韩免费成人网| 在线精品观看国产| 国产精品综合在线视频| 亚洲国产精品综合小说图片区| 精品国产髙清在线看国产毛片 | 欧美综合色免费| 国产精品中文字幕日韩精品| 亚洲国产视频一区二区| 国产精品视频九色porn| 精品久久久久久久久久久久久久久 | 欧美色老头old∨ideo| 国产.欧美.日韩| 日韩激情一区二区| 亚洲免费在线观看| 国产视频一区二区在线观看| 欧美日韩一区二区三区四区| av在线一区二区| 国产精品综合视频| 久久99精品久久久久| 亚洲韩国精品一区| 亚洲男人的天堂在线观看| 欧美高清在线一区二区| 日韩女优电影在线观看| 欧美精选一区二区| 在线观看欧美黄色| aa级大片欧美| 成人av网在线| 国产精品一区一区三区| 久久电影网站中文字幕| 日本不卡一区二区三区高清视频| 亚洲精品中文在线| 中文字幕一区二区三区四区不卡| 久久精品人人做| 久久久久久久av麻豆果冻| 精品久久久久久久久久久久久久久久久 | 日本一区二区三区电影| 久久久久国产一区二区三区四区 | 久久嫩草精品久久久久| 欧美tk—视频vk| 欧美大胆一级视频| 精品久久久久一区二区国产| 欧美大片拔萝卜| 亚洲精品在线一区二区| 久久久久久久性| 国产日韩精品视频一区| 日本一区二区高清| 综合久久国产九一剧情麻豆| 日韩理论片在线| 亚洲一区二区在线免费观看视频| 亚洲尤物视频在线| 午夜精品福利在线| 日韩电影在线一区二区| 久久91精品国产91久久小草| 黄色精品一二区| 成人免费毛片aaaaa**| 成人黄色一级视频| 色噜噜狠狠成人网p站| 欧美体内she精高潮| 欧美一级国产精品| 亚洲精品在线免费播放| 国产精品日韩成人| 亚洲一区二区在线观看视频 | 国产一区二区三区四| 国产成人日日夜夜| 色域天天综合网| 欧美日韩三级一区二区| 精品裸体舞一区二区三区| 国产欧美日本一区二区三区| 国产精品成人免费| 午夜精品免费在线| 国模一区二区三区白浆| av一二三不卡影片| 欧美久久久久久蜜桃| 久久久久免费观看| 亚洲精品国产一区二区精华液| 午夜精品久久一牛影视| 国产高清在线精品| 欧美日韩国产一级片| 久久精品亚洲精品国产欧美kt∨| 亚洲欧洲日韩综合一区二区| 视频在线观看91| 成年人午夜久久久| 欧美久久久久久蜜桃| 欧美激情综合五月色丁香| 亚洲成人www| 成人性生交大片免费看中文| 欧美日韩aaaaa| 国产精品伦一区二区三级视频| 亚洲一区二区精品3399| 国产精品中文欧美| 777奇米四色成人影色区| 国产精品嫩草久久久久| 日韩经典中文字幕一区| av电影天堂一区二区在线观看| 4438x亚洲最大成人网| 中文字幕在线观看一区| 国产最新精品精品你懂的| 欧美影院精品一区| 国产精品国产自产拍高清av | 久久精品一区二区三区四区| 亚洲成av人片| 99免费精品视频| www国产成人| 日韩精品一二三四| 欧美中文一区二区三区| 中文字幕一区三区| 国产成人免费视频精品含羞草妖精| 欧美日本在线看| 亚洲久草在线视频| 成人免费高清视频在线观看| 日韩视频免费观看高清完整版在线观看 | 麻豆一区二区在线| 欧美日韩一区二区三区在线| 亚洲视频每日更新| 成人av在线网| 国产拍欧美日韩视频二区| 久久国产精品99久久久久久老狼| 欧美视频第二页| 亚洲激情图片小说视频| 99久久精品免费看| 国产精品亲子伦对白| 国产成a人亚洲精品| 精品国产乱码久久久久久蜜臀| 日韩专区欧美专区| 欧美精品九九99久久| 图片区小说区国产精品视频| 色婷婷av一区二区| 亚洲精品日产精品乱码不卡| 99久久久精品| 亚洲女人****多毛耸耸8| 91麻豆swag| 亚洲精品ww久久久久久p站| 一本久久a久久精品亚洲| 综合av第一页| 在线看日本不卡| 天天色综合成人网| 777午夜精品视频在线播放| 日本欧美一区二区| 精品欧美一区二区在线观看| 麻豆视频一区二区| 精品久久久久99| 成人晚上爱看视频| 亚洲免费在线观看| 欧美区在线观看| 欧美a一区二区| 色婷婷av一区二区三区之一色屋| 国产99久久久久久免费看农村| 一级特黄大欧美久久久| 国产精品一级二级三级| 久久久99久久| 成人av在线影院| 亚洲综合色区另类av| 91国产视频在线观看| 日韩成人午夜电影| 日韩欧美亚洲国产另类| 国产高清在线观看免费不卡| 亚洲免费在线视频| 91精品国产一区二区三区香蕉| 久久国产精品一区二区| 欧美经典一区二区| 欧洲激情一区二区| 国产毛片精品视频| 亚洲欧美韩国综合色| 日韩一区二区三区免费看| 粉嫩嫩av羞羞动漫久久久| 亚洲国产一区二区在线播放|