1 18 package org.apache.batik.gvt.text; 19 20 import java.text.AttributedCharacterIterator ; 21 import java.text.AttributedString ; 22 import java.util.Map ; 23 import java.util.Set ; 24 25 37 38 public interface GVTAttributedCharacterIterator extends AttributedCharacterIterator { 39 40 43 public void setString(String s); 44 45 48 public void setString(AttributedString s); 49 50 63 public void setAttributeArray(TextAttribute attr, 64 Object [] attValues, int beginIndex, int endIndex); 65 66 68 71 public Set getAllAttributeKeys(); 72 73 77 public Object getAttribute(AttributedCharacterIterator.Attribute attribute); 78 79 83 public Map getAttributes(); 84 85 90 public int getRunLimit(); 91 92 97 public int getRunLimit(AttributedCharacterIterator.Attribute attribute); 98 99 104 public int getRunLimit(Set attributes); 105 106 110 public int getRunStart(); 111 112 118 public int getRunStart(AttributedCharacterIterator.Attribute attribute); 119 120 125 public int getRunStart(Set attributes); 126 127 129 132 public Object clone(); 133 134 139 public char current(); 140 141 146 public char first(); 147 148 152 public int getBeginIndex(); 153 154 158 public int getEndIndex(); 159 160 164 public int getIndex(); 165 166 171 public char last(); 172 173 178 public char next(); 179 180 185 public char previous(); 186 187 193 public char setIndex(int position); 194 195 197 204 public static class TextAttribute extends AttributedCharacterIterator.Attribute { 205 206 207 public TextAttribute(String s) { 208 super(s); 209 } 210 211 public final static TextAttribute FLOW_PARAGRAPH = 212 new TextAttribute("FLOW_PARAGRAPH"); 213 214 public final static TextAttribute FLOW_EMPTY_PARAGRAPH = 215 new TextAttribute("FLOW_EMPTY_PARAGRAPH"); 216 217 public final static TextAttribute FLOW_LINE_BREAK = 218 new TextAttribute("FLOW_LINE_BREAK"); 219 220 public final static TextAttribute FLOW_REGIONS = 221 new TextAttribute("FLOW_REGIONS"); 222 223 public final static TextAttribute LINE_HEIGHT = 224 new TextAttribute("LINE_HEIGHT"); 225 226 public final static TextAttribute PREFORMATTED = 227 new TextAttribute("PREFORMATTED"); 228 229 230 public final static TextAttribute TEXT_COMPOUND_DELIMITER = 231 new TextAttribute("TEXT_COMPOUND_DELIMITER"); 232 233 234 public final static TextAttribute ANCHOR_TYPE = 235 new TextAttribute("ANCHOR_TYPE"); 236 237 238 public final static TextAttribute EXPLICIT_LAYOUT = 239 new TextAttribute("EXPLICIT_LAYOUT"); 240 241 242 public final static TextAttribute X = new TextAttribute("X"); 243 244 245 public final static TextAttribute Y = new TextAttribute("Y"); 246 247 248 public final static TextAttribute DX = new TextAttribute("DX"); 249 250 251 public final static TextAttribute DY = new TextAttribute("DY"); 252 253 254 public final static TextAttribute ROTATION = 255 new TextAttribute("ROTATION"); 256 257 258 public final static TextAttribute PAINT_INFO = 259 new TextAttribute("PAINT_INFO"); 260 261 264 public final static TextAttribute BBOX_WIDTH = 265 new TextAttribute("BBOX_WIDTH"); 266 267 269 public final static TextAttribute LENGTH_ADJUST = 270 new TextAttribute("LENGTH_ADJUST"); 271 272 274 public final static TextAttribute CUSTOM_SPACING = 275 new TextAttribute("CUSTOM_SPACING"); 276 277 279 public final static TextAttribute KERNING = 280 new TextAttribute("KERNING"); 281 282 284 public final static TextAttribute LETTER_SPACING = 285 new TextAttribute("LETTER_SPACING"); 286 287 289 public final static TextAttribute WORD_SPACING = 290 new TextAttribute("WORD_SPACING"); 291 292 293 public final static TextAttribute TEXTPATH = 294 new TextAttribute("TEXTPATH"); 295 296 299 public final static TextAttribute FONT_VARIANT = 300 new TextAttribute("FONT_VARIANT"); 301 302 304 public final static TextAttribute BASELINE_SHIFT = 305 new TextAttribute("BASELINE_SHIFT"); 306 307 309 public final static TextAttribute WRITING_MODE = 310 new TextAttribute("WRITING_MODE"); 311 312 public final static TextAttribute VERTICAL_ORIENTATION = 313 new TextAttribute("VERTICAL_ORIENTATION"); 314 315 public final static TextAttribute VERTICAL_ORIENTATION_ANGLE = 316 new TextAttribute("VERTICAL_ORIENTATION_ANGLE"); 317 318 public final static TextAttribute HORIZONTAL_ORIENTATION_ANGLE = 319 new TextAttribute("HORIZONTAL_ORIENTATION_ANGLE"); 320 321 public final static TextAttribute GVT_FONT_FAMILIES = 322 new TextAttribute("GVT_FONT_FAMILIES"); 323 324 public final static TextAttribute GVT_FONT = 325 new TextAttribute("GVT_FONT"); 326 327 public final static TextAttribute ALT_GLYPH_HANDLER = 328 new TextAttribute("ALT_GLYPH_HANDLER"); 329 330 public final static TextAttribute BIDI_LEVEL = 331 new TextAttribute("BIDI_LEVEL"); 332 333 public final static TextAttribute CHAR_INDEX = 334 new TextAttribute("CHAR_INDEX"); 335 336 public final static TextAttribute ARABIC_FORM = 337 new TextAttribute("ARABIC_FORM"); 338 339 341 342 public final static Integer WRITING_MODE_LTR = new Integer (0x1); 343 344 345 public final static Integer WRITING_MODE_RTL = new Integer (0x2); 346 347 348 public final static Integer WRITING_MODE_TTB = new Integer (0x3); 349 350 351 public final static Integer ORIENTATION_ANGLE = new Integer (0x1); 352 353 354 public final static Integer ORIENTATION_AUTO = new Integer (0x2); 355 356 357 public final static Integer SMALL_CAPS = new Integer (0x10); 358 359 360 public final static Integer UNDERLINE_ON = 361 java.awt.font.TextAttribute.UNDERLINE_ON; 362 363 364 public final static Boolean OVERLINE_ON = new Boolean (true); 365 366 367 public final static Boolean STRIKETHROUGH_ON = 368 java.awt.font.TextAttribute.STRIKETHROUGH_ON; 369 370 371 public final static Integer ADJUST_SPACING = 372 new Integer (0x0); 373 374 375 public final static Integer ADJUST_ALL = 376 new Integer (0x01); 377 378 public final static Integer ARABIC_NONE = new Integer (0x0); 380 public final static Integer ARABIC_ISOLATED = new Integer (0x1); 381 public final static Integer ARABIC_TERMINAL = new Integer (0x2); 382 public final static Integer ARABIC_INITIAL = new Integer (0x3); 383 public final static Integer ARABIC_MEDIAL = new Integer (0x4); 384 385 } 386 387 394 public interface AttributeFilter { 395 396 406 public AttributedCharacterIterator 407 mutateAttributes(AttributedCharacterIterator aci); 408 409 } 410 } 411 412 413 414 415 416 417 418 419 420 | Popular Tags |