|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| 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 manage| Method Detail |
|---|
public void type(int keyCode)
type in interface IContentkeyCode - the value of the key entered
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 linepublic void enter()
enter in interface IContentpublic void backspace()
backspace in interface IContent
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 scroll(int columns,
int lines)
scroll in interface IViewportcolumns - the number of columns to scrolllines - the number of lines to scrollpublic void update(Coordinate position)
update in interface ISelectionViewposition - the new position
public void update(int columns,
int lines)
update in interface ITextViewcolumns - the number of columnslines - the number of linespublic void modified(boolean status)
modified in interface ITextViewstatus - the new modification status
public void resize(int columns,
int lines)
resize in interface IViewportcolumns - 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 IViewportview - the view to register
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 clear()
clear in interface IContent
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 occurs
public void cut(java.io.OutputStream stream)
throws java.io.IOException
cut in interface IContentstream - the stream to write to
java.io.IOException - an io exception occurs
public void paste(java.io.InputStream stream)
throws java.io.IOException
paste in interface IContentstream - the stream to read from
java.io.IOException - an io exception occurspublic 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 | |||||||||