Class: VttDocument
VttDocument Java class is the main core of VTT.
It has three major components and they are detailed as follows
- Main Data Members:
- Text: the original text
- Tags: users defined tags
- Markups: users defined markups
- DefaultTags: if not tags information, this is used. It is read in from the default tags file
- VTT Format:
VttDocument save its information to files in VTT Format. Also, VTT can open file in VTT format and display it in VTT.
- Methods:
Methods only focus on process data members
- public methods:
- ReadFromFile: load Text, Tags, and Markups from a file
- HasChanged: check if the vttDocument has been change since the last saved
- ToString: dump VttDocument to a string
- public static methods:
- GetTextTag: Get the first reserved tag from VttDocument
- SetTextTag: Set the first reserved tag to a specified tag
- GetTextTagClone:
- SaveFile: Save vttDocument to a file
- CloseFile:
- LoadMarkupTextToDocument()
- MarkupText()
- MarkupText()
- SetStyleConstants()
- UpdateDocFileName()
- SetHighlightTextColor()
- SetHighlightBackgroundColor()
The UML class diagram is shown below: