|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.northwestern.at.wordhoard.model.text.Text edu.northwestern.at.wordhoard.model.text.TranslatedText
public class TranslatedText
Text with translations.
This class takes primary text plus one or more text translations and merges them together into a text object which has the translated lines immediately following each primary text line. This is like a "perfect shuffle" of multiple decks of cards into one big deck of cards.
Each translation text object must have exactly the same number of lines as the primary text object, in one-to-one correspondence.
Field Summary |
---|
Fields inherited from class edu.northwestern.at.wordhoard.model.text.Text |
---|
serialVersionUID |
Constructor Summary | |
---|---|
TranslatedText(Text primaryText,
Text[] translations)
Creates new translated text. |
Method Summary | |
---|---|
TextLocation |
baseToDerived(TextLocation loc)
Converts a location from base to derived coordinates. |
TextLocation |
derivedToBase(TextLocation loc)
Converts a location from derived to base coordinates. |
Methods inherited from class edu.northwestern.at.wordhoard.model.text.Text |
---|
appendBlankLine, appendLine, appendLine, baseToDerived, clone, computeLineWidths, computeVerticalPositioningInformation, copyLine, copyLine, derivedToBase, draw, finalize, getLine, getLineLocation, getLineLocation, getLines, getNumLines, getText, getWordLocation, hasLineNumbers, hasMarginalia, initializeForDrawing, isMarked, readExternal, roundLocation, setCollapseBlankLines, setExtraIndentation, setLineNumberInterval, setMarkers, setSelection, viewToModel, writeExternal |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TranslatedText(Text primaryText, Text[] translations) throws java.lang.Exception
primaryText
- Primary text.translations
- Translations.
java.lang.Exception
- Translation has wrong number of lines. Method Detail |
---|
public TextLocation derivedToBase(TextLocation loc)
If the location is in a translated line, the returned base location is at the end of the earliest preceding primary line.
See the package documentation for more details on derived and base coordinate systems.
derivedToBase
in class Text
loc
- Text location in derived coordinates.
public TextLocation baseToDerived(TextLocation loc)
See the package documentation for more details on derived and base coordinate systems.
baseToDerived
in class Text
loc
- Text location in base cooordinates.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |