|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpalmed.edit.text.Text
public final class Text
This class handles the text.
| Constructor Summary | |
|---|---|
Text()
Create a text. |
|
| Method Summary | |
|---|---|
void |
clear()
Clear the text. |
void |
delete()
Delete any resource associated to the text. |
int |
getHeight()
Retrieve the height of the text. |
java.lang.String |
getLine(int y)
Retrieve a given line. |
void |
insert(Coordinate position,
char c)
Insert a character at a given position. |
void |
insertNewLine(Coordinate position)
Split a line in two lines. |
void |
marshall(java.io.OutputStream stream)
Write to an output stream. |
void |
read(java.io.InputStream stream)
Read the text from the given stream. |
void |
read(java.io.InputStream stream,
Coordinate from)
Insert a part of text from the given stream. |
void |
register(ITextView view)
Register a view to receive lines invalidation events. |
void |
remove(Coordinate from,
Coordinate to)
Remove the text between two positions. |
void |
setLineSeparator(java.lang.String separator)
Change the line separator. |
void |
unmarshall(java.io.InputStream stream)
Read from an input stream. |
void |
write(java.io.OutputStream stream)
Write the text to the given stream. |
void |
write(java.io.OutputStream stream,
Coordinate from,
Coordinate to)
Write a part of the text to the given stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Text()
| Method Detail |
|---|
public int getHeight()
getHeight in interface ITextpublic java.lang.String getLine(int y)
getLine in interface ITexty - the number of the line to retrieve
public void insert(Coordinate position,
char c)
insert in interface ITextposition - the insertion pointc - the characterpublic void insertNewLine(Coordinate position)
insertNewLine in interface ITextposition - the insertion point
public void remove(Coordinate from,
Coordinate to)
The two positions must be ordered properly.
remove in interface ITextfrom - the first positionto - the second positionpublic void register(ITextView view)
register in interface ITextview - the view to registerpublic void clear()
clear in interface IText
public void read(java.io.InputStream stream)
throws java.io.IOException
read in interface ITextstream - the stream to read from
java.io.IOException - an io exception occurs
public void write(java.io.OutputStream stream)
throws java.io.IOException
write in interface ITextstream - the stream to write to
java.io.IOException - an io exception occurs
public void write(java.io.OutputStream stream,
Coordinate from,
Coordinate to)
throws java.io.IOException
write in interface ITextstream - the stream to write tofrom - the starting pointto - the ending point
java.io.IOException - an io exception occurs
public void read(java.io.InputStream stream,
Coordinate from)
throws java.io.IOException
read in interface ITextstream - the stream to read fromfrom - the insertion point
java.io.IOException - an io exception occurs
public void unmarshall(java.io.InputStream stream)
throws java.io.IOException
unmarshall in interface ISerializablestream - the stream to read from
java.io.IOException - an io exception occurs
public void marshall(java.io.OutputStream stream)
throws java.io.IOException
marshall in interface ISerializablestream - the stream to write to
java.io.IOException - an io exception occurspublic void delete()
delete in interface ITextpublic void setLineSeparator(java.lang.String separator)
To reset to the default mode preserving file format use null.
setLineSeparator in interface ITextseparator - a string value or null to reset
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||