Inherits DocumentFilter.
|
| CentralRepoCommentLengthFilter () |
|
void | insertString (FilterBypass filter, int offset, String input, AttributeSet attrSet) throws BadLocationException |
|
void | remove (FilterBypass filter, int offset, int length) throws BadLocationException |
|
void | replace (FilterBypass filter, int offset, int length, String input, AttributeSet attrSet) throws BadLocationException |
|
Limits the number of characters that can go into the Comment JTextArea of this Dialog box.
Definition at line 102 of file CentralRepoCommentDialog.java.
org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.CentralRepoCommentLengthFilter |
( |
| ) |
|
void org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.insertString |
( |
FilterBypass |
filter, |
|
|
int |
offset, |
|
|
String |
input, |
|
|
AttributeSet |
attrSet |
|
) |
| throws BadLocationException |
Truncates the insert string if its addition in the Comment dialog box will cause it to go past MAX_CHARACTERS in length.
- Parameters
-
filter | FilterBypass that can be used to mutate Document |
offset | the offset into the document to insert the content >= 0. All positions that track change at or after the given location will move. |
input | the string to insert |
attrSet | the attributes to associate with the inserted content. This may be null if there are no attributes. |
- Exceptions
-
BadLocationException | the given insert position is not a valid position within the document |
Definition at line 126 of file CentralRepoCommentDialog.java.
void org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.remove |
( |
FilterBypass |
filter, |
|
|
int |
offset, |
|
|
int |
length |
|
) |
| throws BadLocationException |
Remove the number of characters from the Comment Text box and add back to our remaining count.
- Parameters
-
filter | FilterBypass that can be used to mutate Document |
offset | the offset from the beginning >= 0 |
length | the number of characters to remove >= 0 |
- Exceptions
-
BadLocationException | some portion of the removal range was not a valid part of the document. The location in the exception is the first bad position encountered. |
Definition at line 145 of file CentralRepoCommentDialog.java.
void org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.replace |
( |
FilterBypass |
filter, |
|
|
int |
offset, |
|
|
int |
length, |
|
|
String |
input, |
|
|
AttributeSet |
attrSet |
|
) |
| throws BadLocationException |
Replace the current text at the offset position with the inputted text. If the offset is the end of the text box, then this functions like an append. Truncate this input if its addition will cause the Comment text box to be > MAX_CHARACTERS in length.
- Parameters
-
filter | FilterBypass that can be used to mutate Document |
offset | Location in Document |
length | Length of text to delete |
input | Text to insert, null indicates no text to insert |
attrSet | AttributeSet indicating attributes of inserted text, null is legal. |
- Exceptions
-
BadLocationException | the given insert position is not a valid position within the document |
Definition at line 168 of file CentralRepoCommentDialog.java.
void org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.updateLabel |
( |
| ) |
|
|
private |
Updates the remainingCharactersLabel to reflect the current state. If there are no more characters left, a red 0 is displayed in the UI.
Definition at line 186 of file CentralRepoCommentDialog.java.
final Integer org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.MAX_CHARACTERS = 500 |
|
private |
Integer org.sleuthkit.autopsy.centralrepository.CentralRepoCommentDialog.CentralRepoCommentLengthFilter.remainingCharacters = MAX_CHARACTERS |
|
private |
The documentation for this class was generated from the following file: