| java.lang.Object gnu.kawa.swingviews.SwingContent gnu.jemacs.swing.BufferContent
BufferContent | public class BufferContent extends gnu.kawa.swingviews.SwingContent (Code) | | A Content class that supports Emacs-style Markers.
The standard GapContent is close, but unfortunately it only
supports inserting *before* marks, which is not the Emacs default.
This provides a superset of the Position functionality (except for undo).
|
Method Summary | |
public static int | indexOf(char[] buffer, int start, int limit, char ch) | public static int | lastIndexOf(char[] buffer, int start, int limit, char ch) Search for the last occurrence of a character
in buffer[limit..start]. | final public long | scan(char target, int start, int end, int count, boolean allowQuit) Search in BUF for COUNT instances of the character TARGET between START and END.
If COUNT is positive, search forwards; END must be >= START.
If COUNT is negative, search backwards for the -COUNTth instance;
END must be <= START.
If COUNT is zero, do anything you please; run rogue, for all I care.
If we find COUNT instances, SHORTAGE is zero, and return the
position after the COUNTth match. |
BufferContent | public BufferContent()(Code) | | |
BufferContent | public BufferContent(int initialSize)(Code) | | |
indexOf | public static int indexOf(char[] buffer, int start, int limit, char ch)(Code) | | |
lastIndexOf | public static int lastIndexOf(char[] buffer, int start, int limit, char ch)(Code) | | Search for the last occurrence of a character
in buffer[limit..start].
|
scan | final public long scan(char target, int start, int end, int count, boolean allowQuit)(Code) | | Search in BUF for COUNT instances of the character TARGET between START and END.
If COUNT is positive, search forwards; END must be >= START.
If COUNT is negative, search backwards for the -COUNTth instance;
END must be <= START.
If COUNT is zero, do anything you please; run rogue, for all I care.
If we find COUNT instances, SHORTAGE is zero, and return the
position after the COUNTth match. Note that for reverse motion
this is not the same as the usual convention for Emacs motion commands.
If we don't find COUNT instances before reaching END, set SHORTAGE
to the number of TARGETs left unfound, and return (shortage<<32|END).
(SHORTAGE<<32|POS) |
|
|