FSF GCC merge 02/23/03
[official-gcc.git] / libjava / java / awt / font / TextLayout.java
blob60c4966737ac90ddb6a5cf71aa073028e20bd8e1
1 /* TextLayout.java
2 Copyright (C) 2003 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package java.awt.font;
41 import java.awt.Font;
42 import java.awt.Graphics2D;
43 import java.awt.Shape;
44 import java.awt.geom.AffineTransform;
45 import java.awt.geom.Rectangle2D;
46 import java.text.AttributedCharacterIterator;
47 import java.util.Map;
49 /**
50 * @author Michael Koch
52 public final class TextLayout implements Cloneable
54 public static final CaretPolicy DEFAULT_CARET_POLICY = new CaretPolicy ();
56 public static class CaretPolicy
58 public CaretPolicy ()
60 // Do nothing here.
63 public TextHitInfo getStrongCaret (TextHitInfo hit1, TextHitInfo hit2,
64 TextLayout layout)
66 throw new Error ("not implemented");
70 private FontRenderContext fontRenderContext;
72 public TextLayout (AttributedCharacterIterator text, FontRenderContext frc)
74 // FIXME
75 this.fontRenderContext = frc;
78 public TextLayout (String string, Font font, FontRenderContext frc)
80 // FIXME
81 this.fontRenderContext = frc;
84 public TextLayout (String string, Map attributes, FontRenderContext frc)
86 // FIXME
87 this.fontRenderContext = frc;
90 protected Object clone ()
92 try
94 return super.clone ();
96 catch (CloneNotSupportedException e)
98 // This should never occur
99 throw new InternalError ();
103 public void draw (Graphics2D g2, float x, float y)
105 throw new Error ("not implemented");
108 public boolean equals (Object obj)
110 if (! (obj instanceof TextLayout))
111 return false;
113 return equals ((TextLayout) obj);
116 public boolean equals (TextLayout tl)
118 throw new Error ("not implemented");
121 public float getAdvance ()
123 throw new Error ("not implemented");
126 public float getAscent ()
128 throw new Error ("not implemented");
131 public byte getBaseline ()
133 throw new Error ("not implemented");
136 public float[] getBaselineOffsets ()
138 throw new Error ("not implemented");
141 public Shape getBlackBoxBounds (int firstEndpoint, int secondEndpoint)
143 throw new Error ("not implemented");
146 public Rectangle2D getBounds()
148 throw new Error ("not implemented");
151 public float[] getCaretInfo (TextHitInfo hit)
153 throw new Error ("not implemented");
156 public float[] getCaretInfo (TextHitInfo hit, Rectangle2D bounds)
158 throw new Error ("not implemented");
161 public Shape getCaretShape (TextHitInfo hit)
163 throw new Error ("not implemented");
166 public Shape getCaretShape (TextHitInfo hit, Rectangle2D bounds)
168 throw new Error ("not implemented");
171 public Shape[] getCaretShapes (int offset)
173 throw new Error ("not implemented");
176 public Shape[] getCaretShapes (int offset, Rectangle2D bounds)
178 throw new Error ("not implemented");
181 public Shape[] getCaretShapes (int offset, Rectangle2D bounds,
182 TextLayout.CaretPolicy policy)
184 throw new Error ("not implemented");
187 public int getCharacterCount ()
189 throw new Error ("not implemented");
192 public byte getCharacterLevel (int index)
194 throw new Error ("not implemented");
197 public float getDescent ()
199 throw new Error ("not implemented");
202 public TextLayout getJustifiedLayout (float justificationWidth)
204 throw new Error ("not implemented");
207 public float getLeading ()
209 throw new Error ("not implemented");
212 public Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint)
214 throw new Error ("not implemented");
217 public Shape getLogicalHighlightShape (int firstEndpoint, int secondEndpoint,
218 Rectangle2D bounds)
220 throw new Error ("not implemented");
223 public int[] getLogicalRangesForVisualSelection (TextHitInfo firstEndpoint,
224 TextHitInfo secondEndpoint)
226 throw new Error ("not implemented");
229 public TextHitInfo getNextLeftHit (int offset)
231 throw new Error ("not implemented");
234 public TextHitInfo getNextLeftHit (int offset, TextLayout.CaretPolicy policy)
236 throw new Error ("not implemented");
239 public TextHitInfo getNextLeftHit (TextHitInfo hit)
241 throw new Error ("not implemented");
244 public TextHitInfo getNextRightHit (int offset)
246 throw new Error ("not implemented");
249 public TextHitInfo getNextRightHit (int offset, TextLayout.CaretPolicy policy)
251 throw new Error ("not implemented");
254 public TextHitInfo getNextRightHit (TextHitInfo hit)
256 throw new Error ("not implemented");
259 public Shape getOutline (AffineTransform tx)
261 throw new Error ("not implemented");
264 public float getVisibleAdvance ()
266 throw new Error ("not implemented");
269 public Shape getVisualHighlightShape (TextHitInfo firstEndpoint,
270 TextHitInfo secondEndpoint)
272 throw new Error ("not implemented");
275 public Shape getVisualHighlightShape (TextHitInfo firstEndpoint,
276 TextHitInfo secondEndpoint,
277 Rectangle2D bounds)
279 throw new Error ("not implemented");
282 public TextHitInfo getVisualOtherHit (TextHitInfo hit)
284 throw new Error ("not implemented");
287 protected void handleJustify (float justificationWidth)
289 throw new Error ("not implemented");
292 public int hashCode ()
294 throw new Error ("not implemented");
297 public TextHitInfo hitTestChar (float x, float y)
299 throw new Error ("not implemented");
302 public TextHitInfo hitTestChar (float x, float y, Rectangle2D bounds)
304 throw new Error ("not implemented");
307 public boolean isLeftToRight ()
309 throw new Error ("not implemented");
312 public boolean isVertical ()
314 throw new Error ("not implemented");
317 public String toString ()
319 throw new Error ("not implemented");