javax.swing.text
Class DefaultFormatter.ReplaceHolder

java.lang.Object
  extended byjavax.swing.text.DefaultFormatter.ReplaceHolder
Direct Known Subclasses:
InternationalFormatter.ExtendedReplaceHolder
Enclosing class:
DefaultFormatter

static class DefaultFormatter.ReplaceHolder
extends Object

ReplaceHolder is used to track where insert/remove/replace is going to happen.


Field Summary
(package private)  AttributeSet attrs
          AttributeSet to attach to text, may be null.
(package private)  int cursorPosition
          Position the cursor should be adjusted from.
(package private)  DocumentFilter.FilterBypass fb
          The FilterBypass that was passed to the DocumentFilter method.
(package private)  int length
          Length of text to remove.
(package private)  int offset
          Offset where the remove/insert is going to occur.
(package private)  String text
          The text to insert, may be null.
(package private)  Object value
          The resulting value, this may never be set.
 
Constructor Summary
(package private) DefaultFormatter.ReplaceHolder()
           
 
Method Summary
(package private)  void reset(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fb

DocumentFilter.FilterBypass fb
The FilterBypass that was passed to the DocumentFilter method.


offset

int offset
Offset where the remove/insert is going to occur.


length

int length
Length of text to remove.


text

String text
The text to insert, may be null.


attrs

AttributeSet attrs
AttributeSet to attach to text, may be null.


value

Object value
The resulting value, this may never be set.


cursorPosition

int cursorPosition
Position the cursor should be adjusted from. If this is -1 the cursor position will be adjusted based on the direction of the replace (-1: offset, 1: offset + text.length()), otherwise the cursor position is adusted from this position.

Constructor Detail

DefaultFormatter.ReplaceHolder

DefaultFormatter.ReplaceHolder()
Method Detail

reset

void reset(DocumentFilter.FilterBypass fb,
           int offset,
           int length,
           String text,
           AttributeSet attrs)