0N/A/*
2362N/A * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
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 *
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 *
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.
0N/A *
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
2362N/A * questions.
0N/A */
0N/Apackage javax.swing.text;
0N/A
0N/A
0N/A/**
0N/A * Interface for <code>View</code>s that have size dependent upon tabs.
0N/A *
0N/A * @author Timothy Prinzing
0N/A * @author Scott Violet
0N/A * @see TabExpander
0N/A * @see LabelView
0N/A * @see ParagraphView
0N/A */
0N/Apublic interface TabableView {
0N/A
0N/A /**
0N/A * Determines the desired span when using the given
0N/A * tab expansion implementation. If a container
0N/A * calls this method, it will do so prior to the
0N/A * normal layout which would call getPreferredSpan.
0N/A * A view implementing this should give the same
0N/A * result in any subsequent calls to getPreferredSpan
0N/A * along the axis of tab expansion.
0N/A *
0N/A * @param x the position the view would be located
0N/A * at for the purpose of tab expansion >= 0.
0N/A * @param e how to expand the tabs when encountered.
0N/A * @return the desired span >= 0
0N/A */
0N/A float getTabbedSpan(float x, TabExpander e);
0N/A
0N/A /**
0N/A * Determines the span along the same axis as tab
0N/A * expansion for a portion of the view. This is
0N/A * intended for use by the TabExpander for cases
0N/A * where the tab expansion involves aligning the
0N/A * portion of text that doesn't have whitespace
0N/A * relative to the tab stop. There is therefore
0N/A * an assumption that the range given does not
0N/A * contain tabs.
0N/A *
0N/A * @param p0 the starting location in the text document >= 0
0N/A * @param p1 the ending location in the text document >= p0
0N/A * @return the span >= 0
0N/A */
0N/A float getPartialSpan(int p0, int p1);
0N/A}