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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? table.java

?? 一個java操作pdf文件的開發(fā)包,很好用的.
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
        // check one column at a time, find maximum needed nr of cols        for (j=0; j < columns; j++) {            lNewMaxColumns = 1; // value to hold in how many columns the current one will be split            for (i=0; i < rows.size(); i++) {                if ( Table.class.isInstance(((Row) rows.get(i)).getCell(j)) ) {                    lDummyTable = ((Table) ((Row) rows.get(i)).getCell(j));                    if ( lDummyTable.getDimension().width > lNewMaxColumns ) {                        lNewMaxColumns = lDummyTable.getDimension().width;                        lDummyColumnWidths[j] = lDummyTable.widths; // bugfix Tony Copping                    }                }            }            lTotalColumns += lNewMaxColumns;            lDummyWidths [j] = lNewMaxColumns;        }        // next we'll add new rows when needed        for (i=0; i < rows.size(); i++) {            lNewMaxRows = 1;    // holds value in how many rows the current one will be split            for (j=0; j < columns; j++) {                if ( Table.class.isInstance(((Row) rows.get(i)).getCell(j)) ) {                    lDummyTable = (Table) ((Row) rows.get(i)).getCell(j);                    if ( lDummyTable.getDimension().height > lNewMaxRows ) {                        lNewMaxRows = lDummyTable.getDimension().height;                    }                }            }            lTotalRows += lNewMaxRows;            lDummyHeights [i] = lNewMaxRows;        }        if ( (lTotalColumns != columns) || (lTotalRows != rows.size()) )    // NO ADJUSTMENT        {            // ** WIDTH            // set correct width for new columns            // divide width over new nr of columns            lNewWidths = new float [lTotalColumns];            int lDummy = 0;            for (int tel=0; tel < widths.length;tel++) {                if ( lDummyWidths[tel] != 1) {                    // divide                    for (int tel2 = 0; tel2 < lDummyWidths[tel]; tel2++) {                        // lNewWidths[lDummy] = widths[tel] / lDummyWidths[tel];                        lNewWidths[lDummy] = widths[tel] * lDummyColumnWidths[tel][tel2] / 100f; // bugfix Tony Copping                        lDummy++;                    }                }                else {                    lNewWidths[lDummy] = widths[tel];                    lDummy++;                }            }            // ** FILL OUR NEW TABLE            // generate new table            // set new widths            // copy old values            newRows = new ArrayList(lTotalRows);            for (i = 0; i < lTotalRows; i++) {                newRows.add(new Row(lTotalColumns));            }            int lDummyRow = 0, lDummyColumn = 0;        // to remember where we are in the new, larger table            Object lDummyElement = null;            for (i=0; i < rows.size(); i++) {                lDummyColumn = 0;                lNewMaxRows = 1;                for (j=0; j < columns; j++) {                    if ( Table.class.isInstance(((Row) rows.get(i)).getCell(j)) )       // copy values from embedded table                    {                        lDummyTable = (Table) ((Row) rows.get(i)).getCell(j);                        for (int k=0; k < lDummyTable.getDimension().height; k++) {                            for (int l=0; l < lDummyTable.getDimension().width; l++) {                                lDummyElement = lDummyTable.getElement(k,l);                                if (lDummyElement != null) {                                    ((Row) newRows.get(k + lDummyRow)).addElement(lDummyElement,l + lDummyColumn);  // use addElement to set reserved status ok in row                                }                            }                        }                    }                    else        // copy others values                    {                        Object aElement = getElement(i,j);                        if ( Cell.class.isInstance(aElement) ) {                            // adjust spans for cell                            ((Cell) aElement).setRowspan(((Cell) ((Row) rows.get(i)).getCell(j)).rowspan() + lDummyHeights[i] - 1);                            ((Cell) aElement).setColspan(((Cell) ((Row) rows.get(i)).getCell(j)).colspan() + lDummyWidths[j] - 1);                            // most likely this cell covers a larger area because of the row/cols splits : define not-to-be-filled cells                            placeCell(newRows,((Cell) aElement), new Point(lDummyRow,lDummyColumn));                        }                    }                    lDummyColumn += lDummyWidths[j];                }                lDummyRow += lDummyHeights[i];            }            // Set our new matrix            columns     = lTotalColumns;            rows = newRows;            this.widths = lNewWidths;        }    }/** * adds new<CODE>Cell</CODE>'s to empty/null spaces. */    private void fillEmptyMatrixCells() {        try {            for (int i=0; i < rows.size(); i++) {                for (int j=0; j < columns; j++) {                    if ( ((Row) rows.get(i)).isReserved(j) == false) {                        addCell(defaultLayout, new Point(i, j));                    }                }            }        }        catch(BadElementException bee) {            throw new ExceptionConverter(bee);        }    }/** * check if <CODE>Cell</CODE> 'fits' the table. * <P> * <UL><LI>rowspan/colspan not beyond borders *     <LI>spanned cell don't overlap existing cells</UL> * * @param   aCell       the cell that has to be checked * @param   aLocation   the location where the cell has to be placed */    private boolean isValidLocation(Cell aCell, Point aLocation)    {        // rowspan not beyond last column        if ( aLocation.x < rows.size() )        // if false : new location is already at new, not-yet-created area so no check        {            if ((aLocation.y + aCell.colspan()) > columns) {                return false;            }            int difx = ((rows.size() - aLocation.x) >  aCell.rowspan()) ? aCell.rowspan() : rows.size() - aLocation.x;            int dify = ((columns - aLocation.y) >  aCell.colspan()) ? aCell.colspan() : columns - aLocation.y;            // no other content at cells targetted by rowspan/colspan            for (int i=aLocation.x; i < (aLocation.x + difx); i++) {                for (int j=aLocation.y; j < (aLocation.y + dify); j++) {                    if ( ((Row) rows.get(i)).isReserved(j) == true ) {                        return false;                    }                }            }        }        else {            if ((aLocation.y + aCell.colspan()) > columns) {                return false;            }        }        return true;    }/** * Inserts a Cell in a cell-array and reserves cells defined by row-/colspan. * * @param   someRows    some rows * @param   aCell       the cell that has to be inserted * @param   aPosition   the position where the cell has to be placed */    private void placeCell(ArrayList someRows, Cell aCell, Point aPosition) {        int i;        Row row = null;        int lColumns = ((Row) someRows.get(0)).columns();        int rowCount = aPosition.x + aCell.rowspan() - someRows.size();        assumeTableDefaults(aCell);        if ( (aPosition.x + aCell.rowspan()) > someRows.size() )        //create new rows ?        {            for (i = 0; i < rowCount; i++) {                row = new Row(lColumns);                someRows.add(row);            }        }        // reserve cell in rows below        for (i = aPosition.x + 1; i < (aPosition.x  + aCell.rowspan()); i++) {            if ( !((Row) someRows.get(i)).reserve(aPosition.y, aCell.colspan())) {                // should be impossible to come here :-)                throw new RuntimeException("addCell - error in reserve");            }        }        row = (Row) someRows.get(aPosition.x);        row.addElement(aCell, aPosition.y);    }/** * Gives you the posibility to add columns. * * @param   aColumns    the number of columns to add */    public void addColumns(int aColumns) {        ArrayList newRows = new ArrayList(rows.size());        int newColumns = columns + aColumns;        Row row;        for (int i = 0; i < rows.size(); i++) {            row = new Row(newColumns);            for (int j = 0; j < columns; j++) {                row.setElement(((Row) rows.get(i)).getCell(j) ,j);            }            for (int j = columns; j < newColumns && i < curPosition.x; j++) {                row.setElement(defaultLayout, j);            }            newRows.add(row);        }        // applied 1 column-fix; last column needs to have a width of 0        float [] newWidths = new float[newColumns];        for (int j = 0; j < columns; j++) {            newWidths[j] = widths[j];        }        for (int j = columns; j < newColumns ; j++) {            newWidths[j] = 0;        }        columns = newColumns;        widths = newWidths;        rows = newRows;    }/** * Gets an array with the positions of the borders between every column. * <P> * This method translates the widths expressed in percentages into the * x-coordinate of the borders of the columns on a real document. * * @param       left            this is the position of the first border at the left (cellpadding not included) * @param       totalWidth      this is the space between the first border at the left *                                              and the last border at the right (cellpadding not included) * @return      an array with borderpositions */    public float[] getWidths(float left, float totalWidth) {        // for x columns, there are x+1 borders        float[] w = new float[columns + 1];        // the border at the left is calculated        switch(alignment) {            case Element.ALIGN_LEFT:                w[0] = left;                break;            case Element.ALIGN_RIGHT:                w[0] = left + (totalWidth * (100 - widthPercentage)) / 100;                break;            case Element.ALIGN_CENTER:                default:                    w[0] = left + (totalWidth * (100 - widthPercentage)) / 200;        }        // the total available width is changed        totalWidth = (totalWidth * widthPercentage) / 100;        // the inner borders are calculated        for (int i = 1; i < columns; i++) {            w[i] = w[i - 1] + (widths[i - 1] * totalWidth / 100);        }        // the border at the right is calculated        w[columns] = w[0] + totalWidth;        return w;    }/** *  Sets current col/row to valid(empty) pos after addCell/Table */    private void setCurrentLocationToNextValidPosition(Point aLocation)    {        // set latest location to next valid position        int i, j;        i = aLocation.x;        j = aLocation.y;        do {            if ( (j + 1)  == columns ) {    // goto next row                i++;                j = 0;            }            else {                j++;            }        }        while (        (i < rows.size()) && (j < columns) && (((Row) rows.get(i)).isReserved(j) == true)        );        curPosition = new Point(i, j);    }/** * Checks if a given tag corresponds with this object. * * @param   tag     the given tag * @return  true if the tag corresponds */    public static boolean isTag(String tag) {        return ElementTags.TABLE.equals(tag);    }/** * Allows clients to set up alternating attributes for each Row in the Table. * <P> * This code was contributed by Matt Benson. * * @param   name    the name of the attribute * @param   value0  the value of the attribute for even rows * @param   value1  the value of the attribute for odd rows */    public void setAlternatingRowAttribute(String name, String value0, String value1) {        if (value0 == null || value1 == null) {            throw new NullPointerException("MarkupTable#setAlternatingRowAttribute(): null values are not permitted.");        }        alternatingRowAttributes = (alternatingRowAttributes == null) ?  new Hashtable() : alternatingRowAttributes;        // we could always use new Arrays but this is big enough        String[] value = (String[])(alternatingRowAttributes.get(name));        value = (value == null) ? new String[2] : value;        value[0] = value0;        value[1] = value1;        alternatingRowAttributes.put(name, value);    }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float top() {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float bottom() {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float left() {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float right() {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float top(int margin) {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float bottom(int margin) {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float left(int margin) {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public float right(int margin) {       throw new UnsupportedOperationException("Dimensions of a Table can't be calculated. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public void setTop(int value) {       throw new UnsupportedOperationException("Dimensions of a Table are attributed automagically. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public void setBottom(int value) {       throw new UnsupportedOperationException("Dimensions of a Table are attributed automagically. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public void setLeft(int value) {       throw new UnsupportedOperationException("Dimensions of a Table are attributed automagically. See the FAQ.");   }/** * This method throws an <CODE>UnsupportedOperationException</CODE>. */   public void setRight(int value) {       throw new UnsupportedOperationException("Dimensions of a Table are attributed automagically. See the FAQ.");   }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久超碰国产精品电影| 国产老妇另类xxxxx| www.欧美日韩| 欧美v日韩v国产v| 亚洲成人免费视| a亚洲天堂av| 久久精品无码一区二区三区| 亚洲1区2区3区4区| 91麻豆免费视频| 欧美国产1区2区| 国产美女一区二区| 91精品国产91综合久久蜜臀| 亚洲免费色视频| 成人激情免费网站| 久久久精品黄色| 亚洲天堂免费看| 亚洲123区在线观看| 97超碰欧美中文字幕| 久久九九久久九九| 蜜臀久久99精品久久久画质超高清 | 亚洲一区二区视频在线| 国产a精品视频| 国产婷婷一区二区| 韩国女主播一区| 日韩欧美一区二区不卡| 日韩在线卡一卡二| 欧美日韩激情一区二区三区| 亚洲精品成人在线| 一本一本大道香蕉久在线精品| 日本一区二区三区视频视频| 国产呦精品一区二区三区网站| 欧美不卡一二三| 久久精品理论片| 日韩精品一区二区三区蜜臀| 日本伊人色综合网| 日韩色视频在线观看| 人人精品人人爱| 日韩午夜三级在线| 美国av一区二区| 欧美va日韩va| 国产在线精品一区二区夜色 | 欧美日韩视频在线第一区 | 亚洲狼人国产精品| 欧洲精品在线观看| 亚洲无人区一区| 欧美三级一区二区| 视频在线观看一区二区三区| 欧美一三区三区四区免费在线看| 天堂精品中文字幕在线| 91精品国产一区二区三区香蕉 | 国产欧美日韩另类视频免费观看| 欧美日韩成人综合天天影院| 91香蕉视频污在线| 一区二区三区美女| 欧美日韩三级在线| 美国十次综合导航| 久久久五月婷婷| 成人综合婷婷国产精品久久蜜臀| 中文字幕一区二区三区不卡在线 | 久久精品国产一区二区三区免费看 | 另类小说视频一区二区| 久久免费偷拍视频| 成人伦理片在线| 亚洲午夜三级在线| 欧美成va人片在线观看| 国产91富婆露脸刺激对白| **欧美大码日韩| 欧美日韩免费视频| 国产在线精品免费| 日韩理论片中文av| 欧美精品久久一区| 国产精品99久久久| 亚洲色图制服诱惑| 欧美一级久久久| 成人一区二区视频| 亚洲国产视频在线| 2020国产成人综合网| 91女人视频在线观看| 偷拍与自拍一区| 久久精品视频一区二区三区| 99re成人精品视频| 蜜桃av噜噜一区| 中文字幕中文字幕在线一区 | 在线精品视频一区二区三四| 青青草一区二区三区| 国产精品久久免费看| 欧美日韩一区二区三区四区五区| 久久精品国产亚洲高清剧情介绍| 国产精品网站一区| 欧美日本韩国一区二区三区视频 | 蜜臀a∨国产成人精品| 欧美高清在线精品一区| 欧美日韩视频专区在线播放| 国产不卡免费视频| 日韩成人伦理电影在线观看| 欧美经典三级视频一区二区三区| 精品视频在线视频| 国产成人精品免费网站| 午夜免费久久看| 国产精品久久久久婷婷| 欧美丰满嫩嫩电影| 不卡免费追剧大全电视剧网站| 首页国产丝袜综合| 一区视频在线播放| 欧美va在线播放| 欧美性受xxxx黑人xyx性爽| 国产精品1024| 日韩在线一区二区三区| 亚洲免费在线观看| 国产日韩高清在线| 欧美一级高清片| 日韩精品国产欧美| 国产精品久久久99| 精品国产一区二区三区久久影院| 在线免费观看视频一区| 成人性视频网站| 久久精品国产久精国产| 亚洲主播在线观看| 国产精品成人免费| 国产欧美日韩亚州综合 | 欧美中文字幕一区二区三区| 高清不卡一二三区| 精品在线播放免费| 亚洲国产中文字幕| 亚洲男人的天堂av| 国产精品你懂的| 国产亚洲欧美在线| 日韩欧美一二三| 88在线观看91蜜桃国自产| 色综合 综合色| 成人性生交大片免费 | 日韩制服丝袜av| 欧美挠脚心视频网站| 中文字幕中文字幕一区| 欧美人妇做爰xxxⅹ性高电影| 韩国在线一区二区| 日韩av电影一区| 亚洲午夜激情网站| 亚洲一区二区在线免费看| 亚洲视频免费在线观看| 国产精品电影院| 日本一区二区三级电影在线观看| 精品国产乱码久久久久久图片| 3d成人h动漫网站入口| 欧美日韩精品是欧美日韩精品| 91看片淫黄大片一级| av中文字幕不卡| 成人av电影在线播放| 成熟亚洲日本毛茸茸凸凹| 国产成人亚洲综合a∨婷婷| 国产九色sp调教91| 国产传媒一区在线| 国产成人精品免费视频网站| 国产精品一区二区在线看| 国产一区二区电影| 国产精品一卡二卡在线观看| 国产精品亚洲人在线观看| 国产精品一级在线| 国产成人精品亚洲日本在线桃色 | 亚洲黄色录像片| 一区二区三区日韩在线观看| 亚洲免费观看高清完整版在线| 亚洲欧美视频在线观看| 一区二区高清在线| 亚洲一区日韩精品中文字幕| 久久99精品国产.久久久久| 3atv在线一区二区三区| 国产精品久久久久久久久图文区| 国产午夜精品一区二区| 久久一留热品黄| 中文字幕不卡的av| 亚洲欧洲成人自拍| 一区二区三区蜜桃网| 丝袜美腿高跟呻吟高潮一区| 美日韩一级片在线观看| 国产精品综合视频| 日本中文一区二区三区| 老汉av免费一区二区三区| 国产精品一区二区在线看| av在线不卡免费看| 欧美亚一区二区| 欧美一级高清大全免费观看| 久久嫩草精品久久久久| 国产精品久久久久久久久久久免费看 | 国产精品系列在线| 亚洲欧洲制服丝袜| 日韩精品一区第一页| 国产乱码一区二区三区| av综合在线播放| 欧美女孩性生活视频| 久久久久久久av麻豆果冻| 国产精品卡一卡二| 午夜激情综合网| 国产一区视频导航| www.日本不卡| 91精品国产aⅴ一区二区| 国产欧美一区二区精品久导航 | 欧美日韩激情在线| 日韩一级高清毛片| 国产欧美精品一区二区色综合朱莉|