JavaScript is disabled on your browser.
Skip navigation links
gnu.jemacs.swing

Class SwingBuffer

    • Field Detail

      • doc

        public javax.swing.text.DefaultStyledDocument doc
      • curPosition

        public javax.swing.text.Caret curPosition
      • modelineDocument

        public javax.swing.text.StyledDocument modelineDocument
      • styles

        public static javax.swing.text.StyleContext styles
      • defaultStyle

        public static javax.swing.text.Style defaultStyle
      • inputStyle

        public javax.swing.text.Style inputStyle
      • redStyle

        public static javax.swing.text.Style redStyle
    • Constructor Detail

      • SwingBuffer

        public SwingBuffer(java.lang.String name)
      • SwingBuffer

        public SwingBuffer(java.lang.String name,
         BufferContent content)
    • Method Detail

      • removeRegion

        public void removeRegion(int start,
         int end)
        Specified by:
        removeRegion in class Buffer
      • removeChar

        public void removeChar(int count)
        Overrides:
        removeChar in class Buffer
      • removePos

        public void removePos(int ipos,
         int count)
        Description copied from class: AbstractSequence
        Remove one or more elements.
        Overrides:
        removePos in class AbstractSequence<Char>
        Parameters:
        ipos - position where elements should be removed
        count - if non-negative, remove that number of elements following (poses, posNumber); if negative the negative of the number of elements to remove before (poses, posNumber).
      • save

        public void save(java.io.Writer out)
         throws java.lang.Exception
        Specified by:
        save in class Buffer
        Throws:
        java.lang.Exception
      • insertChar

        public void insertChar(int ch,
         int count)
        Description copied from class: Buffer
        Insert count copies of ch at point.
        Overrides:
        insertChar in class Buffer
      • insert

        public void insert(int index,
         java.lang.String string,
         java.lang.Object style)
      • insert

        public void insert(java.lang.String string,
         java.lang.Object style)
        Overrides:
        insert in class Buffer
      • insert

        public void insert(java.lang.String string,
         java.lang.Object style,
         int ipos)
        Description copied from class: Buffer
        Insert string with given style at position pair.
        Specified by:
        insert in class Buffer
      • insertFile

        public void insertFile(java.io.Reader in)
         throws java.lang.Exception
        Specified by:
        insertFile in class Buffer
        Throws:
        java.lang.Exception
      • scan

        public long scan(char target,
         int start,
         int end,
         int count,
         boolean allowQuit)
        Description copied from class: Buffer
        Search in BUF for COUNT instances of the character TARGET between START and END. If COUNT is positive, search forwards; END >= START is required. If COUNT is negative, search backwards for the -COUNTth instance; inn this case END <= START is required. If COUNT is zero, do anything you please; run rogue, for all I care. If END is zero, use beginning or end of (FIXME: accessible part of) the buffer, as appropriate for the direction indicated by COUNT. 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).
        Specified by:
        scan in class Buffer
        Returns:
        (SHORTAGE<<32|POS)
      • getDot

        public int getDot()
        Overrides:
        getDot in class Buffer
      • setDot

        public void setDot(int i)
        Description copied from class: Buffer
        Set the current position (point) (0-origin).
        Overrides:
        setDot in class Buffer
      • maxDot

        public int maxDot()
        Specified by:
        maxDot in class Buffer
      • createPos

        public int createPos(int index,
         boolean isAfter)
        Description copied from class: AbstractSequence
        Generate a position at a given index. The result is a position cookie that must be free'd with releasePos.
        Overrides:
        createPos in class AbstractSequence<Char>
        Parameters:
        index - offset from beginning of desired position
        isAfter - should the position have the isAfter property
      • size

        public int size()
        Description copied from interface: Sequence
        See java.util.List.
        Specified by:
        size in interface Sequence<Char>
        Specified by:
        size in interface java.util.Collection<Char>
        Specified by:
        size in interface java.util.List<Char>
        Overrides:
        size in class AbstractSequence<Char>
      • restorePointMark

        public void restorePointMark(long pointMark)
        Specified by:
        restorePointMark in class Buffer
      • openReader

        public gnu.kawa.io.InPort openReader(int start,
         int count)
        Specified by:
        openReader in class Buffer
      • invoke

        public void invoke(java.lang.Runnable doRun)
        Description copied from class: Buffer
        This is intended for Runnable's that may affect the state of the buffer. The implementation should make shure that the GUI is properly updated before control returns
        Specified by:
        invoke in class Buffer
        See Also:
        Buffer.invoke(java.lang.Runnable)
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /