|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SDocument
| Method Summary | |
|---|---|
void |
addDocumentListener(SDocumentListener listener)
Registers the given observer to begin receiving notifications when changes are made to the document. |
SDocumentListener[] |
getDocumentListeners()
Returns an array of all the SDocumentListeners added
to this SDocument via addDocumentListener(). |
int |
getLength()
Returns number of characters of content currently in the document. |
String |
getText()
|
String |
getText(int offset,
int length)
Fetches the text contained within the given portion of the document. |
void |
insert(int offset,
String string)
Inserts a string of content. |
void |
remove(int offs,
int len)
Removes a portion of the content of the document. |
void |
removeDocumentListener(SDocumentListener listener)
Unregisters the given observer from the notification list so it will no longer receive change updates. |
void |
setText(String text)
|
| Methods inherited from interface org.wings.SDelayedEventModel |
|---|
fireDelayedFinalEvents, fireDelayedIntermediateEvents, getDelayEvents, setDelayEvents |
| Method Detail |
|---|
int getLength()
SDocumentListener[] getDocumentListeners()
SDocumentListeners added
to this SDocument via addDocumentListener().
SDocumentListeners added or an
empty array if no listeners are presentaddDocumentListener(org.wings.event.SDocumentListener),
removeDocumentListener(org.wings.event.SDocumentListener)void addDocumentListener(SDocumentListener listener)
listener - the observer to registerremoveDocumentListener(org.wings.event.SDocumentListener)void removeDocumentListener(SDocumentListener listener)
listener - the observer to registeraddDocumentListener(org.wings.event.SDocumentListener)
void remove(int offs,
int len)
throws BadLocationException
offs - the offset from the beginning >= 0len - the number of characters to remove >= 0
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.DocumentEvent,
DocumentListener,
UndoableEditEvent,
UndoableEditListener
void insert(int offset,
String string)
throws BadLocationException
offset - the offset into the document to insert the content >= 0.
All positions that track change at or after the given location
will move.string - the string to insert
BadLocationException
String getText(int offset,
int length)
throws BadLocationException
offset - the offset into the document representing the desired
start of the text >= 0length - the length of the desired string >= 0
BadLocationException - some portion of the given range
was not a valid part of the document. The location in the exception
is the first bad position encountered.String getText()
void setText(String text)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||