Class TextViewer.WidgetCommand

  • Enclosing class:
    TextViewer

    protected class TextViewer.WidgetCommand
    extends java.lang.Object
    Represents a replace command that brings the text viewer's text widget back in synchronization with text viewer's document after the document has been changed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      DocumentEvent event
      The document event encapsulated by this command.
      int length
      The length of the event.
      java.lang.String preservedText
      The replaced text segments of event.
      int start
      The start of the event.
      java.lang.String text
      The inserted and replaced text segments of event.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected WidgetCommand()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setEvent​(DocumentEvent e)
      Translates a document event into the presentation coordinates of this text viewer.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • event

        public DocumentEvent event
        The document event encapsulated by this command.
      • start

        public int start
        The start of the event.
      • length

        public int length
        The length of the event.
      • text

        public java.lang.String text
        The inserted and replaced text segments of event.
      • preservedText

        public java.lang.String preservedText
        The replaced text segments of event.
    • Constructor Detail

      • WidgetCommand

        protected WidgetCommand()
    • Method Detail

      • setEvent

        public void setEvent​(DocumentEvent e)
        Translates a document event into the presentation coordinates of this text viewer.
        Parameters:
        e - the event to be translated