brview.java

来自「java jdk 1.4的源码」· Java 代码 · 共 45 行

JAVA
45
字号
/* * @(#)BRView.java	1.9 03/01/23 * * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */package javax.swing.text.html;import javax.swing.text.*;/** * Processes the <BR> tag.  In other words, forces a line break. * * @author Sunita Mani * @version 1.9 01/23/03 */class BRView extends InlineView {    /**     * Creates a new view that represents a <BR> element.     *     * @param elem the element to create a view for     */    public BRView(Element elem) {	super(elem);	StyleSheet sheet = getStyleSheet();	attr = sheet.getViewAttributes(this);    }    /**     * Forces a line break.     *     * @return View.ForcedBreakWeight     */    public int getBreakWeight(int axis, float pos, float len) {	if (axis == X_AXIS) {	    return ForcedBreakWeight;	} else {	    return super.getBreakWeight(axis, pos, len);	}    }    AttributeSet attr;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?