2362N/A * Copyright (c) 1997, 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * A view implementation to display an unwrapped 0N/A * preformatted line.<p> 0N/A * This subclasses ParagraphView, but this really only contains one 0N/A * @author Timothy Prinzing 0N/A /** Last place painted at. */ 0N/A * Creates a LineView object. 0N/A * @param elem the element to wrap in a view 0N/A * Preformatted lines are not suppressed if they 0N/A * have only whitespace, so they are always visible. 0N/A * Determines the minimum span for this view along an 0N/A * axis. The preformatted line should refuse to be 0N/A * sized less than the preferred size. 0N/A * @param axis may be either <code>View.X_AXIS</code> or 0N/A * <code>View.Y_AXIS</code> 0N/A * @return the minimum span the view can be rendered into 0N/A * @see View#getPreferredSpan 0N/A * Gets the resize weight for the specified axis. 0N/A * @param axis may be either X_AXIS or Y_AXIS 0N/A * @return the weight 0N/A * Gets the alignment for an axis. 0N/A * @param axis may be either X_AXIS or Y_AXIS 0N/A * @return the alignment 0N/A * Lays out the children. If the layout span has changed, 0N/A * the rows are rebuilt. The superclass functionality 0N/A * is called after checking and possibly rebuilding the 0N/A * rows. If the height has changed, the 0N/A * <code>preferenceChanged</code> method is called 0N/A * on the parent since the vertical preference is 0N/A * @param width the width to lay out against >= 0. This is 0N/A * the width inside of the inset area. 0N/A * @param height the height to lay out against >= 0 (not used 0N/A * by paragraph, but used by the superclass). This 0N/A * is the height inside of the inset area. 0N/A * Returns the next tab stop position given a reference position. 0N/A * This view implements the tab coordinate system, and calls 0N/A * <code>getTabbedSpan</code> on the logical children in the process 0N/A * of layout to determine the desired span of the children. The 0N/A * logical children can delegate their tab expansion upward to 0N/A * the paragraph which knows how to expand tabs. 0N/A * <code>LabelView</code> is an example of a view that delegates 0N/A * its tab expansion needs upward to the paragraph. 0N/A * This is implemented to try and locate a <code>TabSet</code> 0N/A * in the paragraph element's attribute set. If one can be 0N/A * found, its settings will be used, otherwise a default expansion 0N/A * will be provided. The base location for for tab expansion 0N/A * is the left inset from the paragraphs most recent allocation 0N/A * (which is what the layout of the children is based upon). 0N/A * @param x the X reference position 0N/A * @param tabOffset the position within the text stream 0N/A * that the tab occurred at >= 0. 0N/A * @return the trailing end of the tab expansion >= 0 0N/A // If the text isn't left justified, offset by 10 pixels! 0N/A * Returns the location for the tab. 0N/A // Assume f is fixed point. 0N/A * @return number of characters per tab, 8.