|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpalmed.edit.view.Viewport
public final class Viewport
This class implements a viewport on a content.
Constructor Summary | |
---|---|
Viewport(IContent content)
Create a content viewport. |
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 |
modified(boolean status)
Notify the modification flag has changed. |
void |
paste(java.io.InputStream stream)
Paste the given text. |
void |
redo()
Redo the last undo. |
void |
register(IScrollView view)
Register a view to be notified of scroll events. |
void |
register(IView view)
Register a view for events notification. |
void |
resize(int columns,
int lines)
Resize the viewport. |
void |
scroll(int columns,
int lines)
Scroll the viewport. |
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. |
void |
update(int columns,
int lines)
Notify the text bounding box has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Viewport(IContent content)
content
- the content to manageMethod Detail |
---|
public void type(int keyCode)
type
in interface IContent
keyCode
- the value of the key enteredpublic 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 enter()
enter
in interface IContent
public void backspace()
backspace
in interface IContent
public 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 scroll(int columns, int lines)
scroll
in interface IViewport
columns
- the number of columns to scrolllines
- the number of lines to scrollpublic void update(Coordinate position)
update
in interface ISelectionView
position
- the new positionpublic void update(int columns, int lines)
update
in interface ITextView
columns
- the number of columnslines
- the number of linespublic void modified(boolean status)
modified
in interface ITextView
status
- the new modification statuspublic void resize(int columns, int lines)
resize
in interface IViewport
columns
- the number of columns visiblelines
- the number of lines visiblepublic void register(IScrollView view)
The content viewport must be able to handle several views.
register
in interface IViewport
view
- the view to registerpublic 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 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 clear()
clear
in interface IContent
public 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) throws java.io.IOException
cut
in interface IContent
stream
- the stream to write to
java.io.IOException
- an io exception occurspublic void paste(java.io.InputStream stream) throws java.io.IOException
paste
in interface IContent
stream
- the stream to read from
java.io.IOException
- an io exception occurspublic void undo()
undo
in interface IContent
public void redo()
redo
in interface IContent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |