|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.editor.MarkChain
public class MarkChain
Support class for chain of MarkBlocks
Field Summary | |
---|---|
protected MarkFactory.ChainDrawMark |
chain
Chain of all marks |
protected MarkFactory.ChainDrawMark |
curMark
Current mark to make checks faster |
protected BaseDocument |
doc
Document for this mark |
protected String |
layerName
If this chain uses draw marks, then this is the name for the draw layer that will be used for the marks |
Constructor Summary | |
---|---|
MarkChain(BaseDocument doc,
String layerName)
Construct chain using draw marks |
Method Summary | |
---|---|
boolean |
addMark(int pos)
|
boolean |
addMark(int pos,
boolean forceAdd)
Add mark to the chain |
int |
compareMark(int pos)
Tests whether the position range is partly or fully inside some mark block from the chain. |
protected MarkFactory.ChainDrawMark |
createAndInsertNewMark(int pos)
|
protected MarkFactory.ChainDrawMark |
createMark()
|
MarkFactory.ChainDrawMark |
getAddedMark()
The mark created by addMark() method is returned by this method. |
MarkFactory.ChainDrawMark |
getChain()
|
MarkFactory.ChainDrawMark |
getCurMark()
|
boolean |
isMark(int pos)
Is there mark at given position? |
boolean |
removeMark(int pos)
Remove non-empty block from area covered by blocks from chain |
boolean |
removeMark(MarkFactory.ChainDrawMark mark)
|
boolean |
toggleMark(int pos)
Toggle the mark so that if it didn't exist it is created and if it existed it's removed |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected MarkFactory.ChainDrawMark chain
protected MarkFactory.ChainDrawMark curMark
protected BaseDocument doc
protected String layerName
Constructor Detail |
---|
public MarkChain(BaseDocument doc, String layerName)
Method Detail |
---|
public final MarkFactory.ChainDrawMark getChain()
public final MarkFactory.ChainDrawMark getCurMark()
public int compareMark(int pos)
pos
- compared position
protected MarkFactory.ChainDrawMark createAndInsertNewMark(int pos) throws BadLocationException
BadLocationException
protected MarkFactory.ChainDrawMark createMark()
public boolean addMark(int pos) throws BadLocationException
BadLocationException
public boolean addMark(int pos, boolean forceAdd) throws BadLocationException
pos
- position at which the mark should be addedforceAdd
- force adding of a fresh mark
even if the mark at the same position already exists
BadLocationException
public MarkFactory.ChainDrawMark getAddedMark()
public boolean removeMark(int pos)
public boolean removeMark(MarkFactory.ChainDrawMark mark)
public boolean isMark(int pos)
public boolean toggleMark(int pos) throws BadLocationException
BadLocationException
public String toString()
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |