/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*
* (C) Copyright IBM Corp. 1998-2003 All Rights Reserved
*/
/**
* A factory for text labels. Basically this just holds onto the stuff that
* doesn't change-- the render context, context, and bidi info for the context-- and gets
* called for each subrange you want to create.
*
* @see Font
* @see FontRenderContext
* @see GlyphVector
* @see TextLabel
* @see ExtendedTextLabel
* @see Bidi
* @see TextLayout
*/
public class TextLabelFactory {
private char[] text;
private int flags;
private int lineStart;
private int lineLimit;
/**
* Initialize a factory to produce glyph arrays.
* @param frc the FontRenderContext to use for the arrays to be produced.
* @param text the text of the paragraph.
* @param bidi the bidi information for the paragraph text, or null if the
* entire text is left-to-right text.
*/
char[] text,
int flags) {
this.lineStart = 0;
}
return frc;
}
public char[] getText() {
return text;
}
return bidi;
}
return lineBidi;
}
public int getLayoutFlags() {
return flags;
}
public int getLineStart() {
return lineStart;
}
public int getLineLimit() {
return lineLimit;
}
/**
* Set a line context for the factory. Shaping only occurs on this line.
* Characters are ordered as they would appear on this line.
* @param lineStart the index within the text of the start of the line.
* @param lineLimit the index within the text of the limit of the line.
*/
}
}
/**
* Create an extended glyph array for the text between start and limit.
*
* @param font the font to use to generate glyphs and character positions.
* @param start the start of the subrange for which to create the glyph array
* @param limit the limit of the subrange for which to create glyph array
*
* Start and limit must be within the bounds of the current line. If no
* line context has been set, the entire text is used as the current line.
* The text between start and limit will be treated as though it all has
* the same bidi level (and thus the same directionality) as the character
* at start. Clients should ensure that all text between start and limit
* has the same bidi level for the current line.
*/
int start,
int limit) {
}
TextSource source = new StandardTextSource(text, start, limit - start, lineStart, lineLimit - lineStart, level, layoutFlags, font, frc, lm);
}
/**
* Create a simple glyph array for the text between start and limit.
*
* @param font the font to use to generate glyphs and character positions.
* @param start the start of the subrange for which to create the glyph array
* @param limit the limit of the subrange for which to create glyph array
*/
int start,
int limit) {
}
TextSource source = new StandardTextSource(text, start, limit - start, lineStart, lineLimit - lineStart, level, layoutFlags, font, frc, lm);
return new TextSourceLabel(source);
}
}