Package swingtree

Class AbstractTextComponentDelegate

java.lang.Object
swingtree.AbstractTextComponentDelegate
Direct Known Subclasses:
TextInsertDelegate, TextRemoveDelegate, TextReplaceDelegate

public abstract class AbstractTextComponentDelegate extends Object
A delegate object for text event listeners served by the numerous TextComponent types. A concrete sub-type of this may be passed to one of the Action lambdas registered by UIForAnyTextComponent.onTextInsert(Action), UIForAnyTextComponent.onTextRemove(Action) and UIForAnyTextComponent.onTextReplace(Action).
See TextInsertDelegate, TextRemoveDelegate and TextReplaceDelegate for concrete implementations of this abstract class.
  • Constructor Details

  • Method Details

    • getComponent

      public JTextComponent getComponent()
    • getFilterBypass

      public DocumentFilter.FilterBypass getFilterBypass()
      The filter bypass type is used as a way to circumvent calling back into the Document to change it. Document implementations that wish to support a DocumentFilter must provide an implementation that will not call back into the DocumentFilter when the following methods are invoked from the DocumentFilter.
      Returns:
      The DocumentFilter.FilterBypass object that can be used to modify the document.
    • getOffset

      public int getOffset()
      The offset at which the text change occurred.
      Returns:
      The offset at which the text change occurred.
    • getLength

      public int getLength()
      The length of the text change.
      Returns:
      The length of the text change.