|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.swing.text.AbstractDocument | +--javax.swing.text.DefaultStyledDocument | +--org.thdl.tib.text.TibetanDocument
A TibetanDocument is a styled document that knows about Tibetan and will respect line breaks and the like. It allows you to insert Tibetan also.
Field Summary |
Fields inherited from class javax.swing.text.DefaultStyledDocument |
buffer, BUFFER_SIZE_DEFAULT |
Fields inherited from class javax.swing.text.AbstractDocument |
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName |
Fields inherited from interface javax.swing.text.Document |
StreamDescriptionProperty, TitleProperty |
Constructor Summary | |
TibetanDocument()
Creates a new TibetanDocument with default styles. |
|
TibetanDocument(StyleContext styles)
Creates a TibetanDocument. |
Method Summary | |
void |
appendDuff(int offset,
String s,
MutableAttributeSet attr)
Inserts Tibetan text into the document. |
int |
getTibetanFontSize()
Gets the point size for Tibetan text. |
String |
getWylie()
Converts the entire document into Extended Wylie. |
String |
getWylie(int begin,
int end)
Converts a portion of the document into Extended Wylie. |
int |
insertDuff(int pos,
org.thdl.tib.text.DuffData[] glyphs)
Inserts a stretch of TibetanMachineWeb data into the document. |
void |
setTibetanFontSize(int size)
Sets the point size used by default for Tibetan text. |
void |
writeRTFOutputStream(OutputStream out)
Writes the document to an OutputStream as Rich Text Format (.rtf). |
Methods inherited from class javax.swing.text.DefaultStyledDocument |
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.text.Document |
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render |
Constructor Detail |
public TibetanDocument()
public TibetanDocument(StyleContext styles)
styles
- a StyleContext, which is simply passed on
to DefaultStyledDocument's constructorMethod Detail |
public void setTibetanFontSize(int size)
size
- the point size for Tibetan textpublic int getTibetanFontSize()
public void writeRTFOutputStream(OutputStream out) throws IOException
out
- the OutputStream to write to
IOException
public void appendDuff(int offset, String s, MutableAttributeSet attr)
offset
- the position at which you want to insert texts
- the string you want to insertattr
- the attributes to apply, normally a particular TibetanMachineWeb fontsetTibetanFontSize(int size)
public int insertDuff(int pos, org.thdl.tib.text.DuffData[] glyphs)
glyphs
- the array of Tibetan data you want to insertpos
- the position at which you want to insert textpublic String getWylie()
public String getWylie(int begin, int end)
begin
- the beginning of the region to convertend
- the end of the region to convert
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |