|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colorer.editor.Outliner
public class Outliner
Basic outliner class, used to capture parser output and filter out only required structure elements.
Field Summary | |
---|---|
protected java.util.Vector |
outline
|
Constructor Summary | |
---|---|
Outliner(Region searchRegion)
|
Method Summary | |
---|---|
void |
addRegion(int lno,
java.lang.String line,
int sx,
int ex,
Region region)
Informs handler about lexical region in line. |
void |
attachOutliner(BaseEditor be)
|
void |
clear()
Cleans out current outline elements. |
void |
clearLine(int lno,
java.lang.String line)
Clear line event. |
OutlineItem |
createItem(int lno,
int sx,
int length,
int curLevel,
java.lang.String itemLabel,
Region region)
|
void |
detachOutliner(BaseEditor be)
|
void |
endParsing(int lno)
End of text parsing. |
void |
enterScheme(int lno,
java.lang.String line,
int sx,
int ex,
Region region,
java.lang.String scheme)
Informs handler about entering into specified scheme. |
Region |
getFilter()
Returns filter region, used by this handler. |
OutlineItem |
getItem(int idx)
|
boolean |
isOutlined(Region region)
|
int |
itemCount()
|
void |
leaveScheme(int lno,
java.lang.String line,
int sx,
int ex,
Region region,
java.lang.String scheme)
Informs handler about leaveing specified scheme. |
void |
modifyEvent(int topLine)
Informs EditorListener object about text modification event. |
protected void |
notifyUpdate()
|
void |
startParsing(int lno)
Start of text parsing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Vector outline
Constructor Detail |
---|
public Outliner(Region searchRegion)
Method Detail |
---|
public void attachOutliner(BaseEditor be)
public void detachOutliner(BaseEditor be)
public OutlineItem getItem(int idx)
public int itemCount()
public Region getFilter()
RegionHandler
getFilter
in interface RegionHandler
public boolean isOutlined(Region region)
public void clear()
public OutlineItem createItem(int lno, int sx, int length, int curLevel, java.lang.String itemLabel, Region region)
protected void notifyUpdate()
public void modifyEvent(int topLine)
EditorListener
modifyEvent
in interface EditorListener
topLine
- Topmost modified line of text.public void startParsing(int lno)
RegionHandler
startParsing
in interface RegionHandler
lno
- Start line numberpublic void endParsing(int lno)
RegionHandler
endParsing
in interface RegionHandler
lno
- End line numberpublic void clearLine(int lno, java.lang.String line)
RegionHandler
clearLine
in interface RegionHandler
lno
- Line numberpublic void addRegion(int lno, java.lang.String line, int sx, int ex, Region region)
RegionHandler
addRegion
in interface RegionHandler
lno
- Current line numbersx
- Start X position of region in lineex
- End X position of region in lineregion
- Region informationpublic void enterScheme(int lno, java.lang.String line, int sx, int ex, Region region, java.lang.String scheme)
RegionHandler
region
is used to specify
scheme background region information.
If text is parsed not from the first line, this method is called
with fake parameters to compensate required scheme structure.
enterScheme
in interface RegionHandler
lno
- Current line numbersx
- Start X position of region in lineex
- End X position of region in lineregion
- Scheme Region information (background)scheme
- Additional Scheme informationpublic void leaveScheme(int lno, java.lang.String line, int sx, int ex, Region region, java.lang.String scheme)
RegionHandler
region
is used to specify
scheme background region information.
If text parse process ends, but current schemes stack is not balanced
(this can happends because of bad balanced structure of source text,
or partial text parse) this method is not called for unbalanced
levels.
leaveScheme
in interface RegionHandler
lno
- Current line numbersx
- Start X position of region in lineex
- End X position of region in lineregion
- Scheme Region information (background)scheme
- Additional Scheme information
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |