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

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

?? tableview.java

?? JAVA 所有包
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* * @(#)TableView.java	1.41 06/05/12 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.text.html;import java.awt.*;import java.util.BitSet;import java.util.Vector;import java.util.Arrays;import javax.swing.SizeRequirements;import javax.swing.event.DocumentEvent;import javax.swing.text.*;/** * HTML table view.   *  * @author  Timothy Prinzing * @version 1.41 05/12/06 * @see     View *//*public*/ class TableView extends BoxView implements ViewFactory {    /**     * Constructs a TableView for the given element.     *     * @param elem the element that this view is responsible for     */    public TableView(Element elem) {	super(elem, View.Y_AXIS);	rows = new Vector();	gridValid = false;	captionIndex = -1;        totalColumnRequirements = new SizeRequirements();    }    /**     * Creates a new table row.     *     * @param elem an element     * @return the row     */    protected RowView createTableRow(Element elem) {	// PENDING(prinz) need to add support for some of the other	// elements, but for now just ignore anything that is not	// a TR.	Object o = elem.getAttributes().getAttribute(StyleConstants.NameAttribute);	if (o == HTML.Tag.TR) {	    return new RowView(elem);	}	return null;    }    /**     * The number of columns in the table.     */    public int getColumnCount() {	return columnSpans.length;    }    /**     * Fetches the span (width) of the given column.       * This is used by the nested cells to query the      * sizes of grid locations outside of themselves.     */    public int getColumnSpan(int col) {	if (col < columnSpans.length) {	    return columnSpans[col];	}	return 0;    }    /**     * The number of rows in the table.     */    public int getRowCount() {	return rows.size();    }    /**     * Fetch the span of multiple rows.  This includes     * the border area.     */    public int getMultiRowSpan(int row0, int row1) {	RowView rv0 = getRow(row0);	RowView rv1 = getRow(row1);	if ((rv0 != null) && (rv1 != null)) {	    int index0 = rv0.viewIndex;	    int index1 = rv1.viewIndex;	    int span = getOffset(Y_AXIS, index1) - getOffset(Y_AXIS, index0) + 		getSpan(Y_AXIS, index1);	    return span;	}	return 0;    }    /**     * Fetches the span (height) of the given row.     */    public int getRowSpan(int row) {	RowView rv = getRow(row);	if (rv != null) {	    return getSpan(Y_AXIS, rv.viewIndex);	}	return 0;    }    RowView getRow(int row) {	if (row < rows.size()) {	    return (RowView) rows.elementAt(row);	}	return null;    }    protected View getViewAtPoint(int x, int y, Rectangle alloc) {	int n = getViewCount();	View v = null;	Rectangle allocation = new Rectangle();	for (int i = 0; i < n; i++) {	    allocation.setBounds(alloc);	    childAllocation(i, allocation);	    v = getView(i);	    if (v instanceof RowView) {		v = ((RowView)v).findViewAtPoint(x, y, allocation);		if (v != null) {		    alloc.setBounds(allocation);		    return v;		}	    }	}        return super.getViewAtPoint(x, y, alloc);    }    /**     * Determines the number of columns occupied by     * the table cell represented by given element.     */    protected int getColumnsOccupied(View v) {	AttributeSet a = v.getElement().getAttributes();        if (a.isDefined(HTML.Attribute.COLSPAN)) {            String s = (String) a.getAttribute(HTML.Attribute.COLSPAN);            if (s != null) {                try {                    return Integer.parseInt(s);                } catch (NumberFormatException nfe) {                    // fall through to one column                }            }        }	return 1;    }    /**     * Determines the number of rows occupied by     * the table cell represented by given element.     */    protected int getRowsOccupied(View v) {	AttributeSet a = v.getElement().getAttributes();        if (a.isDefined(HTML.Attribute.ROWSPAN)) {            String s = (String) a.getAttribute(HTML.Attribute.ROWSPAN);            if (s != null) {                try {                    return Integer.parseInt(s);                } catch (NumberFormatException nfe) {                    // fall through to one row                }            }        }	return 1;    }    protected void invalidateGrid() {	gridValid = false;    }    protected StyleSheet getStyleSheet() {	HTMLDocument doc = (HTMLDocument) getDocument();	return doc.getStyleSheet();    }    /**     * Update the insets, which contain the caption if there     * is a caption.     */    void updateInsets() {	short top = (short) painter.getInset(TOP, this);	short bottom = (short) painter.getInset(BOTTOM, this);	if (captionIndex != -1) {	    View caption = getView(captionIndex);	    short h = (short) caption.getPreferredSpan(Y_AXIS);	    AttributeSet a = caption.getAttributes();	    Object align = a.getAttribute(CSS.Attribute.CAPTION_SIDE);	    if ((align != null) && (align.equals("bottom"))) {		bottom += h;	    } else {		top += h;	    }	}	setInsets(top, (short) painter.getInset(LEFT, this), 		  bottom, (short) painter.getInset(RIGHT, this));    }    /**     * Update any cached values that come from attributes.     */    protected void setPropertiesFromAttributes() {	StyleSheet sheet = getStyleSheet();	attr = sheet.getViewAttributes(this);	painter = sheet.getBoxPainter(attr);	if (attr != null) {	    setInsets((short) painter.getInset(TOP, this), 		      (short) painter.getInset(LEFT, this), 			  (short) painter.getInset(BOTTOM, this), 		      (short) painter.getInset(RIGHT, this));	    CSS.LengthValue lv = (CSS.LengthValue) 		attr.getAttribute(CSS.Attribute.BORDER_SPACING);	    if (lv != null) {		cellSpacing = (int) lv.getValue();	    } else {		cellSpacing = 0;	    }	    lv = (CSS.LengthValue)                                		    attr.getAttribute(CSS.Attribute.BORDER_TOP_WIDTH);	    if (lv != null) {                                     		    borderWidth = (int) lv.getValue();                	    } else {                                              		    borderWidth = 0;                                  	    }                                                     		}    }    /**     * Fill in the grid locations that are placeholders     * for multi-column, multi-row, and missing grid     * locations.     */    void updateGrid() {	if (! gridValid) {	    relativeCells = false;	    multiRowCells = false;	    // determine which views are table rows and clear out	    // grid points marked filled.	    captionIndex = -1;	    rows.removeAllElements();	    int n = getViewCount();	    for (int i = 0; i < n; i++) {		View v = getView(i);		if (v instanceof RowView) {		    rows.addElement(v);		    RowView rv = (RowView) v;		    rv.clearFilledColumns();		    rv.rowIndex = rows.size() - 1;		    rv.viewIndex = i;		} else {		    Object o = v.getElement().getAttributes().getAttribute(StyleConstants.NameAttribute);		    if (o instanceof HTML.Tag) {			HTML.Tag kind = (HTML.Tag) o;			if (kind == HTML.Tag.CAPTION) {			    captionIndex = i;			}		    }		}	    }	    int maxColumns = 0;	    int nrows = rows.size();	    for (int row = 0; row < nrows; row++) {		RowView rv = getRow(row);		int col = 0;		for (int cell = 0; cell < rv.getViewCount(); cell++, col++) {		    View cv = rv.getView(cell);		    if (! relativeCells) {			AttributeSet a = cv.getAttributes();			CSS.LengthValue lv = (CSS.LengthValue) 			    a.getAttribute(CSS.Attribute.WIDTH);			if ((lv != null) && (lv.isPercentage())) {			    relativeCells = true;			}		    }		    // advance to a free column		    for (; rv.isFilled(col); col++);		    int rowSpan = getRowsOccupied(cv);		    if (rowSpan > 1) {			multiRowCells = true;		    }		    int colSpan = getColumnsOccupied(cv);		    if ((colSpan > 1) || (rowSpan > 1)) {			// fill in the overflow entries for this cell			int rowLimit = row + rowSpan;			int colLimit = col + colSpan;			for (int i = row; i < rowLimit; i++) {			    for (int j = col; j < colLimit; j++) {				if (i != row || j != col) {				    addFill(i, j);				}			    }			}			if (colSpan > 1) {			    col += colSpan - 1;			}		    }		}		maxColumns = Math.max(maxColumns, col);	    }	    // setup the column layout/requirements	    columnSpans = new int[maxColumns];	    columnOffsets = new int[maxColumns];	    columnRequirements = new SizeRequirements[maxColumns];	    for (int i = 0; i < maxColumns; i++) {		columnRequirements[i] = new SizeRequirements();                columnRequirements[i].maximum = Integer.MAX_VALUE;	    }	    gridValid = true;	}    }    /**     * Mark a grid location as filled in for a cells overflow.     */    void addFill(int row, int col) {	RowView rv = getRow(row);	if (rv != null) {	    rv.fillColumn(col);	}    }    /**     * Layout the columns to fit within the given target span.     *     * @param targetSpan the given span for total of all the table     *  columns     * @param reqs the requirements desired for each column.  This     *  is the column maximum of the cells minimum, preferred, and     *  maximum requested span     * @param spans the return value of how much to allocated to     *  each column     * @param offsets the return value of the offset from the     *  origin for each column     * @return the offset from the origin and the span for each column      *  in the offsets and spans parameters     */    protected void layoutColumns(int targetSpan, int[] offsets, int[] spans, 				 SizeRequirements[] reqs) {        //clean offsets and spans        Arrays.fill(offsets, 0);        Arrays.fill(spans, 0);	colIterator.setLayoutArrays(offsets, spans, targetSpan);	CSS.calculateTiledLayout(colIterator, targetSpan);    }    /**     * Calculate the requirements for each column.  The calculation     * is done as two passes over the table.  The table cells that     * occupy a single column are scanned first to determine the     * maximum of minimum, preferred, and maximum spans along the     * give axis.  Table cells that span multiple columns are excluded     * from the first pass.  A second pass is made to determine if     * the cells that span multiple columns are satisfied.  If the     * column requirements are not satisified, the needs of the      * multi-column cell is mixed into the existing column requirements.     * The calculation of the multi-column distribution is based upon     * the proportions of the existing column requirements and taking     * into consideration any constraining maximums.     */    void calculateColumnRequirements(int axis) {        // clean columnRequirements        for (SizeRequirements req : columnRequirements) {            req.minimum = 0;            req.preferred = 0;            req.maximum = Integer.MAX_VALUE;        }	Container host = getContainer();	if (host != null) {	    if (host instanceof JTextComponent) {		skipComments = !((JTextComponent)host).isEditable();	    } else {		skipComments = true;	    }	}	// pass 1 - single column cells	boolean hasMultiColumn = false;	int nrows = getRowCount();	for (int i = 0; i < nrows; i++) {	    RowView row = getRow(i);	    int col = 0;	    int ncells = row.getViewCount();	    for (int cell = 0; cell < ncells; cell++) {		View cv = row.getView(cell);		if (skipComments && !(cv instanceof CellView)) {		    continue;		}		for (; row.isFilled(col); col++); // advance to a free column		int rowSpan = getRowsOccupied(cv);		int colSpan = getColumnsOccupied(cv);		if (colSpan == 1) {		    checkSingleColumnCell(axis, col, cv);		} else {		    hasMultiColumn = true;		    col += colSpan - 1;		}		col++;	    }	}	// pass 2 - multi-column cells	if (hasMultiColumn) {	    for (int i = 0; i < nrows; i++) {		RowView row = getRow(i);		int col = 0;		int ncells = row.getViewCount();		for (int cell = 0; cell < ncells; cell++) {		    View cv = row.getView(cell);		    if (skipComments && !(cv instanceof CellView)) {			continue;		    }		    for (; row.isFilled(col); col++); // advance to a free column		    int colSpan = getColumnsOccupied(cv);		    if (colSpan > 1) {			checkMultiColumnCell(axis, col, colSpan, cv);			col += colSpan - 1;		    }		    col++;		}	    }	}    }    /**     * check the requirements of a table cell that spans a single column.     */    void checkSingleColumnCell(int axis, int col, View v) {	SizeRequirements req = columnRequirements[col];	req.minimum = Math.max((int) v.getMinimumSpan(axis), req.minimum);	req.preferred = Math.max((int) v.getPreferredSpan(axis), req.preferred);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧洲中文字幕精品| 不卡免费追剧大全电视剧网站| 欧美丝袜第三区| 中文字幕精品在线不卡| 不卡一区在线观看| 亚洲欧美另类久久久精品2019| 色播五月激情综合网| 亚洲高清不卡在线| 精品国产成人系列| 国产高清成人在线| 亚洲免费观看在线观看| 在线综合+亚洲+欧美中文字幕| 美腿丝袜亚洲一区| 亚洲国产激情av| 在线中文字幕不卡| 欧美一级xxx| 精品制服美女丁香| 椎名由奈av一区二区三区| 在线亚洲精品福利网址导航| 午夜视频在线观看一区二区三区| 欧美一区二区播放| 国产不卡高清在线观看视频| 一区二区三区 在线观看视频| 日韩精品中文字幕在线不卡尤物| 高清shemale亚洲人妖| 亚洲精品第一国产综合野| 欧美一级二级三级蜜桃| 成人激情图片网| 日韩精品国产欧美| 中文字幕在线不卡视频| 欧美一区永久视频免费观看| 成人av影视在线观看| 蜜臀av性久久久久蜜臀av麻豆| 17c精品麻豆一区二区免费| 日韩一二三四区| 色天使久久综合网天天| 国产一区二区三区四| 丝袜美腿成人在线| 国产精品高潮呻吟| 久久婷婷久久一区二区三区| 色哟哟国产精品免费观看| 国产又粗又猛又爽又黄91精品| 亚洲欧美激情小说另类| 2021中文字幕一区亚洲| 欧美日韩一级片网站| av电影一区二区| 国产精品自在欧美一区| 日韩中文欧美在线| 亚洲一区二区综合| 亚洲色欲色欲www| 2024国产精品| 91精品国产综合久久婷婷香蕉| 91美女福利视频| 波多野结衣在线aⅴ中文字幕不卡| 七七婷婷婷婷精品国产| 亚洲国产成人av好男人在线观看| 中文字幕亚洲视频| 国产午夜一区二区三区| 精品国产区一区| 日韩欧美中文一区| 91精品国产一区二区三区香蕉| 欧洲国内综合视频| 色哟哟一区二区| av午夜精品一区二区三区| 国产99精品国产| 国产99久久久国产精品免费看| 精品一二线国产| 久久精品国产成人一区二区三区| 天天做天天摸天天爽国产一区 | 国产精品一区二区果冻传媒| 麻豆国产欧美日韩综合精品二区| 日韩不卡一二三区| 三级在线观看一区二区| 日韩电影在线免费看| 免费观看成人鲁鲁鲁鲁鲁视频| 天天操天天干天天综合网| 亚洲高清免费在线| 青草国产精品久久久久久| 蜜桃免费网站一区二区三区| 日韩av中文字幕一区二区三区| 免费成人在线网站| 国产一区在线不卡| 国产91精品精华液一区二区三区| 成人妖精视频yjsp地址| 波多野洁衣一区| 日本福利一区二区| 欧美日韩在线播放一区| 欧美顶级少妇做爰| 精品久久一区二区三区| 国产精品女同一区二区三区| 中文字幕在线不卡一区| 亚洲一区二区三区小说| 裸体在线国模精品偷拍| 国产盗摄一区二区三区| proumb性欧美在线观看| 欧美日本精品一区二区三区| 91精品国产乱| 国产日产亚洲精品系列| 最新国产成人在线观看| 亚洲国产综合色| 激情文学综合丁香| 91麻豆蜜桃一区二区三区| 欧美另类z0zxhd电影| 国产亚洲欧美日韩日本| 亚洲免费三区一区二区| 美女视频第一区二区三区免费观看网站| 久久精品999| av亚洲精华国产精华| 欧美精品在线观看播放| 欧美韩日一区二区三区四区| 一区二区欧美在线观看| 精品一区二区在线播放| 99精品视频一区二区三区| 欧美高清hd18日本| 中文字幕乱码久久午夜不卡| 午夜精品久久久| av一区二区久久| 91精品国产日韩91久久久久久| 欧美精彩视频一区二区三区| 午夜在线成人av| 国产剧情一区在线| 91黄色免费网站| 中文字幕二三区不卡| 美女在线一区二区| 一本久久综合亚洲鲁鲁五月天| 精品少妇一区二区三区免费观看 | 国产精品久久久久国产精品日日| 亚洲午夜私人影院| 大陆成人av片| 日韩你懂的在线观看| 亚洲国产综合视频在线观看| 成人自拍视频在线| 日韩一区二区精品葵司在线| 一二三区精品视频| 成人午夜视频在线| 久久人人爽人人爽| 日韩电影一区二区三区四区| 一本一本久久a久久精品综合麻豆| 久久―日本道色综合久久| 奇米亚洲午夜久久精品| 精品视频一区 二区 三区| 国产精品美女久久久久久| 久久99久久久久久久久久久| 欧美日韩在线免费视频| 亚洲少妇30p| av不卡在线播放| 国产清纯美女被跳蛋高潮一区二区久久w | 91麻豆国产精品久久| 久久精品亚洲精品国产欧美| 蜜臀av一级做a爰片久久| 欧美高清性hdvideosex| 亚州成人在线电影| 欧美日韩精品欧美日韩精品一| 一区二区三区中文字幕电影 | 亚洲va欧美va人人爽午夜| 91麻豆.com| 亚洲欧美国产77777| 91女厕偷拍女厕偷拍高清| 国产精品视频第一区| 丁香啪啪综合成人亚洲小说| 久久精品一区蜜桃臀影院| 黄网站免费久久| 久久综合久久鬼色中文字| 久久99国产精品免费| 日韩美女在线视频| 久久国产综合精品| 精品不卡在线视频| 韩国女主播一区二区三区| 欧美精品一区二区三区一线天视频 | 手机精品视频在线观看| 91精品国产全国免费观看| 日本成人超碰在线观看| 日韩一区二区视频| 激情综合一区二区三区| 国产日韩成人精品| 91美女片黄在线| 午夜视频在线观看一区二区| 日韩小视频在线观看专区| 国产一区二区不卡在线| 国产清纯在线一区二区www| av高清不卡在线| 亚洲电影欧美电影有声小说| 欧美精品久久99| 国产一区二区在线视频| 亚洲国产精品成人综合| 色综合久久综合网97色综合| 亚洲一区二区成人在线观看| 欧美一区二区在线免费观看| 久久99国产精品久久99果冻传媒| 国产无人区一区二区三区| 99久久久国产精品免费蜜臀| 亚洲一二三四在线| 日韩午夜在线影院| aaa国产一区| 亚洲成va人在线观看| 久久久久久久综合色一本| 99国产精品久久久久久久久久 | 国内精品在线播放| 自拍偷拍国产精品| 日韩视频一区在线观看|