public abstract class GuardedSection extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Position pos,
boolean permitHoles)
Assures that a position is not inside the guarded section.
|
void |
deleteSection()
Removes the section and the text of the section from the Document.
|
Position |
getCaretPosition()
Gets the begin of section.
|
Position |
getEndPosition()
Returns the end position of the whole guarded section.
|
String |
getName()
Get the name of the section.
|
Position |
getStartPosition()
Returns the start position of the whole guarded section.
|
String |
getText()
Gets the text contained in the section.
|
boolean |
isValid()
Tests if the section is still valid - it is not removed from the
source.
|
void |
removeSection()
Removes the section from the Document, but retains the text contained
within.
|
void |
setName(String name)
Set the name of the section.
|
public String getName()
public void setName(String name) throws PropertyVetoException
name
- the new namePropertyVetoException
- if the new name is already in usepublic void deleteSection()
public boolean isValid()
public void removeSection()
public Position getCaretPosition()
public String getText()
public boolean contains(Position pos, boolean permitHoles)
pos
- position in questionpermitHoles
- if false, guarded section is taken as a monolithic block
without any holes in it regardless of its complexity.true
if the position is inside section.public Position getEndPosition()
public Position getStartPosition()