Package swingtree
Class TextRemoveDelegate
java.lang.Object
swingtree.AbstractTextComponentDelegate
swingtree.TextRemoveDelegate
A delegate object for the
This delegate provides useful context information to the action listener, such as the text component itself, the
Action
lambda passed
to the UIForAnyTextComponent.onTextRemove(Action)
method,
which is used to register a listener for text removal events.
This delegate provides useful context information to the action listener, such as the text component itself, the
DocumentFilter.FilterBypass
object that can be used to remove text from the document, the offset at which
the text is to be removed and the length of the text to be removed.-
Method Summary
Modifier and TypeMethodDescriptionThis method exposes the actual text that is being removed from the document as part of the current text removal event.Methods inherited from class swingtree.AbstractTextComponentDelegate
getComponent, getFilterBypass, getLength, getOffset
-
Method Details
-
getTextToBeRemoved
This method exposes the actual text that is being removed from the document as part of the current text removal event. If nothing is removed from the document, an emptyString
is returned.- Returns:
- The text to be removed or an empty
String
if no text is to be removed. Null is never returned.
-