public interface DocumentGuards
Modifier and Type | Method and Description |
---|---|
int |
adjustPosition(int position,
boolean direction)
Adjust a position to point outside the guarded area.
|
int |
findNextBlock(int position,
boolean direction)
Finds boundary of the nearest guarded block, starting from the position.
|
boolean |
isPositionGuarded(int position,
boolean forInsertion)
Checks whether the particular position is protected.
|
boolean isPositionGuarded(int position, boolean forInsertion)
forInsertion
- int adjustPosition(int position, boolean direction)
position
- offset in the documentdirection
- true for end of the guarded block, false for the beginningint findNextBlock(int position, boolean direction)
-1
, if there is no guarded block in the specified direction.position
- the position to start atdirection
- true forward, false backward