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

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

?? pdfprow.java

?? iText可以制作中文PDF文件的JAVA源程序最新版下載
?? JAVA
字號:
/* * $Id: PdfPRow.java,v 1.32 2002/11/19 08:33:38 blowagie Exp $ * $Name:  $ * * Copyright 2001, 2002 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 com.lowagie.text.ExceptionConverter;import com.lowagie.text.DocumentException;import com.lowagie.text.Element;import com.lowagie.text.Rectangle;import java.awt.Color;/** * A row in a PdfPTable. * * @author  Paulo Soares */public class PdfPRow {    protected PdfPCell cells[];    protected float maxHeight = 0;    protected boolean calculated = false;    public PdfPRow(PdfPCell cells[])    {        this.cells = cells;    }        public PdfPRow(PdfPRow row)    {        maxHeight = row.maxHeight;        calculated = row.calculated;        cells = new PdfPCell[row.cells.length];        for (int k = 0; k < cells.length; ++k) {            if (row.cells[k] != null)                cells[k] = new PdfPCell(row.cells[k]);        }    }        public boolean setWidths(float widths[])    {        if (widths.length != cells.length)            return false;        float total = 0;        calculated = false;        for (int k = 0; k < widths.length; ++k) {            PdfPCell cell = cells[k];            cell.setLeft(total);            int last = k + cell.getColspan();            for (; k < last; ++k)                total += widths[k];            --k;            cell.setRight(total);            cell.setTop(0);        }        return true;    }        public float calculateHeights()    {        maxHeight = 0;        for (int k = 0; k < cells.length; ++k) {            PdfPCell cell = cells[k];            if (cell == null)                continue;            PdfPTable table = cell.getTable();            if (table == null ) {                float rightLimit = cell.isNoWrap() ? 20000 : cell.right() - cell.getPaddingRight();                ColumnText ct = new ColumnText(null);                ct.setSimpleColumn(cell.getPhrase(),                    cell.left() + cell.getPaddingLeft(),                    cell.top() - cell.getPaddingTop(),                    rightLimit,                    -20000,                    0, cell.getHorizontalAlignment());                ct.setLeading(cell.getLeading(), cell.getMultipliedLeading());                ct.setIndent(cell.getIndent());                ct.setExtraParagraphSpace(cell.getExtraParagraphSpace());                ct.setFollowingIndent(cell.getFollowingIndent());                ct.setRightIndent(cell.getRightIndent());                ct.setRunDirection(cell.getRunDirection());                try {                    ct.go(true);                }                catch (DocumentException e) {                    throw new ExceptionConverter(e);                }                float yLine = ct.getYLine();                cell.setBottom(yLine - cell.getPaddingBottom());            }            else {                table.setTotalWidth(cell.right() - cell.getPaddingRight() - cell.getPaddingLeft() - cell.left());                cell.setBottom(cell.top() - cell.getPaddingTop() - cell.getPaddingBottom() - table.getTotalHeight());            }            float height = cell.getFixedHeight();            if (height <= 0)                height = cell.height();            if (height < cell.getFixedHeight())                height = cell.getFixedHeight();            else if (height < cell.getMinimumHeight())                height = cell.getMinimumHeight();            if (height > maxHeight)                maxHeight = height;        }        calculated = true;        return maxHeight;    }    public void writeBorderAndBackgroung(float xPos, float yPos, PdfPCell cell, PdfContentByte[] canvases)    {        PdfContentByte lines = canvases[PdfPTable.LINECANVAS];        PdfContentByte backgr = canvases[PdfPTable.BACKGROUNDCANVAS];        // the coordinates of the border are retrieved        float x1 = cell.left() + xPos;        float y1 = cell.top() + yPos;        float x2 = cell.right() + xPos;        float y2 = y1 - maxHeight;        // the backgroundcolor is set        Color background = cell.backgroundColor();        if (background != null) {            backgr.setColorFill(background);            backgr.rectangle(x1, y1, x2 - x1, y2 - y1);            backgr.fill();        }        else if (cell.grayFill() > 0) {            backgr.setGrayFill(cell.grayFill());            backgr.rectangle(x1, y1, x2 - x1, y2 - y1);            backgr.fill();        }        // if the element hasn't got any borders, nothing is added        if (cell.hasBorders()) {            // the width is set to the width of the element            if (cell.borderWidth() != Rectangle.UNDEFINED) {                lines.setLineWidth(cell.borderWidth());            }            // the color is set to the color of the element            Color color = cell.borderColor();            if (color != null) {                lines.setColorStroke(color);            }            // if the box is a rectangle, it is added as a rectangle            if (cell.hasBorder(Rectangle.BOX)) {                lines.rectangle(x1, y1, x2 - x1, y2 - y1);            }            // if the border isn't a rectangle, the different sides are added apart            else {                if (cell.hasBorder(Rectangle.RIGHT)) {                    lines.moveTo(x2, y1);                    lines.lineTo(x2, y2);                }                if (cell.hasBorder(Rectangle.LEFT)) {                    lines.moveTo(x1, y1);                    lines.lineTo(x1, y2);                }                if (cell.hasBorder(Rectangle.BOTTOM)) {                    lines.moveTo(x1, y2);                    lines.lineTo(x2, y2);                }                if (cell.hasBorder(Rectangle.TOP)) {                    lines.moveTo(x1, y1);                    lines.lineTo(x2, y1);                }            }            lines.stroke();            if (color != null) {                lines.resetRGBColorStroke();            }        }                }        public void writeCells(float xPos, float yPos, PdfContentByte[] canvases)    {        if (!calculated)            calculateHeights();        for (int k = 0; k < cells.length; ++k) {            PdfPCell cell = cells[k];            if (cell == null)                continue;            writeBorderAndBackgroung(xPos, yPos, cell, canvases);            PdfPTable table = cell.getTable();            float tly = 0;            boolean alignTop = false;            switch (cell.getVerticalAlignment()) {                case Element.ALIGN_BOTTOM:                    tly = cell.top() + yPos - maxHeight + cell.height() - cell.getPaddingTop();                    break;                case Element.ALIGN_MIDDLE:                    tly = cell.top() + yPos + (cell.height() - maxHeight) / 2 - cell.getPaddingTop();                    break;                default:                    alignTop = true;                    tly = cell.top() + yPos - cell.getPaddingTop();                    break;            }            if (table == null) {                float fixedHeight = cell.getFixedHeight();                float rightLimit = cell.right() + xPos - cell.getPaddingRight();                float leftLimit = cell.left() + xPos + cell.getPaddingLeft();                if (cell.isNoWrap()) {                    switch (cell.getHorizontalAlignment()) {                        case Element.ALIGN_CENTER:                            rightLimit += 10000;                            leftLimit -= 10000;                            break;                        case Element.ALIGN_RIGHT:                            leftLimit -= 20000;                            break;                        default:                            rightLimit += 20000;                            break;                    }                }                ColumnText ct = new ColumnText(canvases[PdfPTable.TEXTCANVAS]);                float bry = -20000;                if (fixedHeight > 0) {                    if (cell.height() > maxHeight) {                        tly = cell.top() + yPos - cell.getPaddingTop();                        bry = cell.top() + yPos - maxHeight + cell.getPaddingBottom();                    }                }                ct.setSimpleColumn(cell.getPhrase(),                    leftLimit,                    tly,                    rightLimit,                    bry,                    0, cell.getHorizontalAlignment());                ct.setLeading(cell.getLeading(), cell.getMultipliedLeading());                ct.setIndent(cell.getIndent());                ct.setExtraParagraphSpace(cell.getExtraParagraphSpace());                ct.setFollowingIndent(cell.getFollowingIndent());                ct.setRightIndent(cell.getRightIndent());                ct.setSpaceCharRatio(cell.getSpaceCharRatio());                ct.setRunDirection(cell.getRunDirection());                try {                    ct.go();                }                catch (DocumentException e) {                    throw new ExceptionConverter(e);                }            }            else {                float remainingHeight = 0;                float maxLastRow = 0;                if (alignTop) {                    //add by Jin-Hsia Yang, to add remaining height to last row                    if (table.size() > 0) {                        PdfPRow row = table.getRow(table.size()-1);                        remainingHeight = maxHeight-table.getTotalHeight()-cell.getPaddingBottom()-cell.getPaddingTop();                        if (remainingHeight > 0) {                            maxLastRow = row.getMaxHeights();                            row.setMaxHeights(row.getMaxHeights()+ remainingHeight );                            //table.setTotalHeight(table.getTotalHeight() + remainingHeight);                        }                    }                    //end add                }                table.writeSelectedRows(0, -1, cell.left() + xPos + cell.getPaddingLeft(),                    tly, canvases);                if (alignTop && remainingHeight > 0)                    table.getRow(table.size()-1).setMaxHeights(maxLastRow);            }        }    }        public boolean isCalculated()    {        return calculated;    }        public float getMaxHeights()    {        if (calculated)            return maxHeight;        else            return calculateHeights();    }        //add by Jin-Hsia Yang    public void setMaxHeights(float maxHeight) {	this.maxHeight=maxHeight;    }    //end add        float[] getEventWidth(float xPos) {        int n = 0;        for (int k = 0; k < cells.length; ++k) {            if (cells[k] != null)                ++n;        }        float width[] = new float[n + 1];        n = 0;        width[n++] = xPos;        for (int k = 0; k < cells.length; ++k) {            if (cells[k] != null) {                width[n] = width[n - 1] + cells[k].width();                ++n;            }        }        return width;    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区中文字幕| 久久蜜桃一区二区| 欧美老年两性高潮| 久久久久久久网| 亚洲视频在线一区观看| 亚洲777理论| 色综合天天综合网天天狠天天| 欧美性videosxxxxx| 欧美精品一区二区三区蜜桃视频| 亚洲三级电影全部在线观看高清| 蜜桃一区二区三区四区| 色屁屁一区二区| 26uuu精品一区二区在线观看| 亚洲成人你懂的| 粉嫩在线一区二区三区视频| 91精品国产一区二区| 亚洲一卡二卡三卡四卡五卡| hitomi一区二区三区精品| 337p粉嫩大胆噜噜噜噜噜91av| 日韩黄色小视频| 欧美亚洲国产一区二区三区va | 自拍偷拍欧美激情| 国产精品网曝门| 蜜臀av一区二区| 欧美日本精品一区二区三区| 亚洲美女电影在线| 91亚洲男人天堂| 国产精品久久久久aaaa| 国产suv精品一区二区三区| 日韩小视频在线观看专区| 偷偷要91色婷婷| 欧美日韩一区二区在线观看 | 国产一区三区三区| 91麻豆精品国产91久久久| 亚洲成人免费视| 欧美丰满少妇xxxbbb| 日韩电影在线免费| 欧美视频在线一区二区三区 | 日韩一区日韩二区| 成人精品免费看| 国产精品日韩精品欧美在线| 国产91在线观看丝袜| 国产精品丝袜一区| 91久久精品一区二区二区| 亚洲欧美色一区| 欧美性做爰猛烈叫床潮| 亚洲成av人片www| 777午夜精品视频在线播放| 麻豆91精品视频| 国产婷婷一区二区| 欧美日产在线观看| 精一区二区三区| 欧美国产日韩亚洲一区| 91美女蜜桃在线| 亚洲444eee在线观看| 欧美va天堂va视频va在线| 国产福利不卡视频| 日韩免费看网站| 国产精品一线二线三线精华| 亚洲国产激情av| 欧美影院一区二区| 美女一区二区视频| 国产女主播在线一区二区| 在线观看91视频| 老司机免费视频一区二区| 日本一区二区三区dvd视频在线| 91女人视频在线观看| 午夜av区久久| 亚洲国产精品国自产拍av| 在线观看成人免费视频| 久久成人久久鬼色| 国产精品二三区| 欧美一区二区三区啪啪| a级精品国产片在线观看| 三级在线观看一区二区 | 91麻豆精品国产无毒不卡在线观看| 精品在线亚洲视频| 亚洲天天做日日做天天谢日日欢| 欧美一区二区三级| 午夜精品久久久久久久99水蜜桃 | 欧美mv日韩mv亚洲| 不卡视频免费播放| 日本午夜一区二区| 亚洲欧美另类在线| 国产亚洲午夜高清国产拍精品 | 91首页免费视频| 精品在线一区二区三区| 亚洲乱码国产乱码精品精的特点| 欧美成人在线直播| 欧美日韩精品欧美日韩精品一| 国产超碰在线一区| 久久精品国产澳门| 午夜精品成人在线| 1000部国产精品成人观看| 精品国产1区二区| 在线看一区二区| 99精品国产视频| 国产成人免费在线视频| 美国毛片一区二区三区| 午夜精品久久久久久久久久久| 自拍偷拍欧美激情| 国产精品视频第一区| 久久久电影一区二区三区| 日韩一区二区视频在线观看| 欧美日韩精品一区二区天天拍小说| 成人国产一区二区三区精品| 国产高清精品久久久久| 精品一区二区三区免费播放| 免费美女久久99| 日本美女一区二区| 天天做天天摸天天爽国产一区| 曰韩精品一区二区| 亚洲激情在线播放| 一区二区在线电影| 亚洲精品视频自拍| 一区二区国产盗摄色噜噜| 亚洲综合一二区| 亚洲狠狠爱一区二区三区| 一区二区三区.www| 亚洲综合丁香婷婷六月香| 亚洲女爱视频在线| 一区二区三区美女| 亚洲成人黄色小说| 在线观看视频91| 国产mv日韩mv欧美| 免费精品视频在线| 九九久久精品视频| 国产在线观看免费一区| 韩国精品久久久| 懂色av一区二区在线播放| 成人黄色电影在线| 在线观看不卡一区| 日韩一区二区精品| 精品国产凹凸成av人导航| 久久丝袜美腿综合| 国产精品不卡一区二区三区| 亚洲美女视频在线观看| 午夜影视日本亚洲欧洲精品| 成人免费视频国产在线观看| 成年人国产精品| 欧美日韩专区在线| 日韩色在线观看| 国产欧美日韩精品一区| 亚洲视频1区2区| 日韩电影一区二区三区四区| 国产麻豆成人传媒免费观看| 91在线视频官网| 欧美一区二区三区男人的天堂| 国产日韩v精品一区二区| 亚洲激情图片qvod| 久久精品国产一区二区| 成人午夜激情片| 欧美午夜精品免费| 久久精品视频网| 亚洲一区二区三区视频在线| 日韩精品电影在线| av成人动漫在线观看| 日韩欧美高清一区| 亚洲三级小视频| 精品一区二区三区香蕉蜜桃| 91麻豆高清视频| 日韩免费福利电影在线观看| 亚洲欧美一区二区视频| 久久国产免费看| 91麻豆精品秘密| 久久久久9999亚洲精品| 爽爽淫人综合网网站 | 亚洲午夜私人影院| 国产主播一区二区三区| 欧美日韩中文另类| 欧美国产视频在线| 捆绑调教美女网站视频一区| 色狠狠av一区二区三区| 国产亚洲1区2区3区| 日本不卡在线视频| 欧美专区日韩专区| 国产精品国产自产拍在线| 国模冰冰炮一区二区| 在线综合+亚洲+欧美中文字幕| 中文字幕亚洲精品在线观看| 国内久久婷婷综合| 欧美一区日韩一区| 亚洲国产人成综合网站| 91麻豆国产精品久久| 国产精品私人影院| 国产91丝袜在线播放| 久久婷婷一区二区三区| 午夜精品久久久久| 欧美怡红院视频| 亚洲人成小说网站色在线| 不卡视频一二三| 国产精品久久看| 成人精品视频一区| 国产精品视频一区二区三区不卡| 国产精品一区免费视频| 亚洲精品一区二区三区四区高清| 日韩和欧美一区二区三区| 欧美高清视频不卡网| 婷婷六月综合网| 欧美一级一区二区|