sub_arctic.text
Class word

java.lang.Object
  |
  +--sub_arctic.text.word

public class word
extends java.lang.Object

This object represents an entire, non-breakable word. This object is used by the layout algorithm to know what objects it must layout and what is breakable and what isn't. Wondering why a single word may have multiple text_bounding_rectangles? Consider the (now famous) "superfreak" case. The word is superfreak but the "super" is italicized and in 16 point font, whereas the freak is not italicized and is in a 12 pint font. These must be in two different text_runs (since they are displayed differently), and they will have different bounding rectangles, but are one word and must not be broken apart when displayed.


Field Summary
 java.util.Vector bounding_rects
          This is the set of text_bounding rectangles this word contains.
 
Constructor Summary
word()
          Create a new word, with no bounding rects yet contained.
 
Method Summary
 void add_bounding_rect(text_bounding_rect tbr)
          Add a new bounding rectangle to the word.
 int aggregate_width()
          This returns the aggregate width of all bounding rects.
 java.lang.String toString()
          Print out a word to the terminal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bounding_rects

public java.util.Vector bounding_rects
This is the set of text_bounding rectangles this word contains.
Constructor Detail

word

public word()
Create a new word, with no bounding rects yet contained.
Method Detail

add_bounding_rect

public void add_bounding_rect(text_bounding_rect tbr)
Add a new bounding rectangle to the word.
Parameters:
text_bounding_rect - the new rectangle to add

toString

public java.lang.String toString()
Print out a word to the terminal
Returns:
String printed representation of the word
Overrides:
toString in class java.lang.Object

aggregate_width

public int aggregate_width()
This returns the aggregate width of all bounding rects.
Returns:
int the total width of this word