|
||||||||||
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 textMethod Detail |
---|
public void type(int keyCode)
type
in interface IContent
keyCode
- the value of the key enteredpublic void enter()
enter
in interface IContent
public void backspace()
backspace
in interface IContent
public void drag(int x, int y)
drag
in interface IContent
x
- destination columny
- destination linepublic void click(int x, int y)
click
in interface IContent
x
- location columny
- location linepublic void accept(ILineVisitor visitor, int y)
accept
in interface IContent
visitor
- the visitory
- the line numberpublic void register(IView view)
register
in interface IContent
view
- the view to registerpublic void marshall(java.io.OutputStream stream) throws java.io.IOException
marshall
in interface ISerializable
stream
- the stream to write to
java.io.IOException
- an io exception occurspublic void unmarshall(java.io.InputStream stream) throws java.io.IOException
unmarshall
in interface ISerializable
stream
- the stream to read from
java.io.IOException
- an io exception occurspublic void clear()
clear
in interface IContent
public void update(Coordinate position)
update
in interface ISelectionView
position
- the new positionpublic void copy(java.io.OutputStream stream) throws java.io.IOException
copy
in interface IContent
stream
- the stream to write to
java.io.IOException
- an io exception occurspublic void cut(java.io.OutputStream stream)
cut
in interface IContent
stream
- the stream to write topublic void paste(java.io.InputStream stream)
paste
in interface IContent
stream
- the stream to read frompublic void undo()
undo
in interface IContent
public void redo()
redo
in interface IContent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |