javax.swing.text.Documentpublic static interface NbDocument.PositionBiasable
extends javax.swing.text.Document
createPosition(int, javax.swing.text.Position.Bias) that creates
a position that moves either to the left or to the right when an insertion
is performed at it.
If a document implements this interface, the new method is
used in NbDocument.createPosition(javax.swing.text.Document, int, javax.swing.text.Position.Bias).
If not, special support for the position is created.
| Modifier and Type | Method | Description |
|---|---|---|
javax.swing.text.Position |
createPosition(int offset,
javax.swing.text.Position.Bias bias) |
Creates position with a bias.
|
addDocumentListener, addUndoableEditListener, createPosition, getDefaultRootElement, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeDocumentListener, removeUndoableEditListener, renderjavax.swing.text.Position createPosition(int offset,
javax.swing.text.Position.Bias bias)
throws javax.swing.text.BadLocationException
Position.Bias.Backward
then if an insert occures at the position, the text is inserted
after the position. If the bias is Forward, then the text is
inserted before the position.offset - the offset for the positionbias - the bias to use for the positionjavax.swing.text.BadLocationException - if the offset is invalidNbDocument.createPosition(javax.swing.text.Document, int, javax.swing.text.Position.Bias)Built on April 24 2018. | Portions Copyright 1997-2018 Oracle. All rights reserved.