de.matthiasmann.twl.model
Interface EditFieldModel

All Superinterfaces:
java.lang.CharSequence, ObservableCharSequence
All Known Implementing Classes:
DefaultEditFieldModel

public interface EditFieldModel
extends ObservableCharSequence


Nested Class Summary
 
Nested classes/interfaces inherited from interface de.matthiasmann.twl.model.ObservableCharSequence
ObservableCharSequence.Callback
 
Method Summary
 boolean replace(int start, int count, char replacement)
          Replace count characters starting at start with the specified replacement character.
 int replace(int start, int count, java.lang.String replacement)
          Replace count characters starting at start with the specified replacement text.
 java.lang.String substring(int start, int end)
          Returns a String containing the specified range from this sequence.
 
Methods inherited from interface de.matthiasmann.twl.model.ObservableCharSequence
addCallback, removeCallback
 
Methods inherited from interface java.lang.CharSequence
charAt, length, subSequence, toString
 

Method Detail

replace

int replace(int start,
            int count,
            java.lang.String replacement)
Replace count characters starting at start with the specified replacement text.

Parameters:
start - the start index
count - the number of characters to replace, can be 0.
replacement - the replacement text, can be empty.
Returns:
the number of characters which have been inserted, or -1 if no replacement has been performed.
Throws:
java.lang.StringIndexOutOfBoundsException - if start or count are outside the sequence
java.lang.NullPointerException - when replacement is null

replace

boolean replace(int start,
                int count,
                char replacement)
Replace count characters starting at start with the specified replacement character.

Parameters:
start - the start index
count - the number of characters to replace, can be 0.
replacement - the replacement character
Returns:
true if the sequence was changed, false otherwise.
Throws:
java.lang.StringIndexOutOfBoundsException - if start or count are outside the sequence

substring

java.lang.String substring(int start,
                           int end)
Returns a String containing the specified range from this sequence.

Parameters:
start - the start index
end - the end index
Returns:
the String object
Throws:
java.lang.StringIndexOutOfBoundsException - if start or count are outside the sequence
See Also:
CharSequence.subSequence(int, int)