palmed.edit.selection
Interface ISelection

All Superinterfaces:
ISerializable
All Known Implementing Classes:
Selection

public interface ISelection
extends ISerializable

This interface defines the operations available on a text selection.

Version:
$Revision$ $Date$
Author:
Mathieu Champlon

Method Summary
 void accept(ILineVisitor visitor, int y)
          Visit a line of text.
 void backward()
          Extend selection one character backward.
 void clear()
          Clear selection.
 void copy(java.io.OutputStream stream)
          Copy the current selected text.
 void cut(java.io.OutputStream stream)
          Cut the current selected text.
 void delete()
          Delete selection.
 void extend(int x, int y)
          Extend selection up to the given point.
 void forward()
          Extend selection one character forward.
 boolean isEmpty()
          Test if the selection is empty.
 void paste(java.io.InputStream stream)
          Paste the given text.
 void read(java.io.InputStream stream)
          Replace the current selection with the text from the given stream.
 void register(ISelectionView view)
          Register a view to receive insertion point notification changes.
 void reset()
          Reset selection.
 void write(java.io.OutputStream stream)
          Write the current selected text to the given stream.
 
Methods inherited from interface palmed.io.ISerializable
marshall, unmarshall
 

Method Detail

isEmpty

boolean isEmpty()
Test if the selection is empty.

Returns:
whether the selection is empty or not

forward

void forward()
Extend selection one character forward.


backward

void backward()
Extend selection one character backward.


extend

void extend(int x,
            int y)
Extend selection up to the given point.

Parameters:
x - the destination column
y - the destination line

clear

void clear()
Clear selection.


delete

void delete()
Delete selection.


accept

void accept(ILineVisitor visitor,
            int y)
Visit a line of text.

Parameters:
visitor - the visitor
y - the line number

reset

void reset()
Reset selection.


register

void register(ISelectionView view)
Register a view to receive insertion point notification changes.

Parameters:
view - the view to register

copy

void copy(java.io.OutputStream stream)
          throws java.io.IOException
Copy the current selected text.

Parameters:
stream - the stream to write to
Throws:
java.io.IOException - an io exception occurs

cut

void cut(java.io.OutputStream stream)
         throws java.io.IOException
Cut the current selected text.

Parameters:
stream - the stream to write to
Throws:
java.io.IOException - an io exception occurs

paste

void paste(java.io.InputStream stream)
           throws java.io.IOException
Paste the given text.

Parameters:
stream - the stream to read from
Throws:
java.io.IOException - an io exception occurs

read

void read(java.io.InputStream stream)
          throws java.io.IOException
Replace the current selection with the text from the given stream.

Parameters:
stream - the stream
Throws:
java.io.IOException - an io exception occurs

write

void write(java.io.OutputStream stream)
           throws java.io.IOException
Write the current selected text to the given stream.

Parameters:
stream - the stream
Throws:
java.io.IOException - an io exception occurs


Copyright © 2004-2006 PalmEd. All Rights Reserved.