|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpalmed.edit.Content
public final class Content
This class encapsulates text and selection manipulations.
| Constructor Summary | |
|---|---|
Content(IText text)
Create a content. |
|
| Method Summary | |
|---|---|
void |
accept(ILineVisitor visitor,
int y)
Visit a line of text. |
void |
backspace()
Handle a backspace event. |
void |
clear()
Reset the content. |
void |
click(int x,
int y)
Handle a click event at a given location. |
void |
copy(java.io.OutputStream stream)
Copy the current selected text. |
void |
cut(java.io.OutputStream stream)
Cut the current selected text. |
void |
drag(int x,
int y)
Handle a drag event to a given location. |
void |
enter()
Handle an enter event. |
void |
marshall(java.io.OutputStream stream)
Write to an output stream. |
void |
paste(java.io.InputStream stream)
Paste the given text. |
void |
redo()
Redo the last undo. |
void |
register(IView view)
Register a view for events notification. |
void |
type(int keyCode)
Handle a character typing. |
void |
undo()
Undo the last action. |
void |
unmarshall(java.io.InputStream stream)
Read from an input stream. |
void |
update(Coordinate position)
Notify the insertion position has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Content(IText text)
text - the text| Method Detail |
|---|
public void type(int keyCode)
type in interface IContentkeyCode - the value of the key enteredpublic void enter()
enter in interface IContentpublic void backspace()
backspace in interface IContent
public void drag(int x,
int y)
drag in interface IContentx - destination columny - destination line
public void click(int x,
int y)
click in interface IContentx - location columny - location line
public void accept(ILineVisitor visitor,
int y)
accept in interface IContentvisitor - the visitory - the line numberpublic void register(IView view)
register in interface IContentview - the view to register
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 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 occurspublic void clear()
clear in interface IContentpublic void update(Coordinate position)
update in interface ISelectionViewposition - the new position
public void copy(java.io.OutputStream stream)
throws java.io.IOException
copy in interface IContentstream - the stream to write to
java.io.IOException - an io exception occurspublic void cut(java.io.OutputStream stream)
cut in interface IContentstream - the stream to write topublic void paste(java.io.InputStream stream)
paste in interface IContentstream - the stream to read frompublic void undo()
undo in interface IContentpublic void redo()
redo in interface IContent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||