|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colorer.impl.BaseEditorNative
public class BaseEditorNative
Constructor Summary | |
---|---|
BaseEditorNative(ParserFactory pf,
LineSource lineSource)
|
Method Summary | |
---|---|
void |
addEditorListener(EditorListener el)
Adds specified EditorListener object into parse process. |
void |
addRegionHandler(RegionHandler rh,
Region filter)
Adds specified RegionHandler object into the parse process. |
FileType |
chooseFileType(java.lang.String fname)
Chooses filetype according to the filename and first line of text |
void |
dispose()
Dispose this Editor's resources |
protected void |
finalize()
|
RegionDefine |
getBackground()
Current Background Region (def:Text) |
FileType |
getFileType()
Returns Currently selected file type |
RegionDefine |
getHorzCross()
Current Horizontal Rule (def:HorzCross) |
LineRegion[] |
getLineRegions(int lno)
Return parsed and colored LineRegions of requested line. |
PairMatch |
getPairMatch(int lineNo,
int linePos)
Searches and creates pair match object. |
RegionDefine |
getVertCross()
Current Vertical Rule (def:VertCross) |
void |
idleJob(int time)
Tries to do some parsing job while user is doing nothing. |
boolean |
isDisposed()
|
void |
lineCountEvent(int newLineCount)
Informs about total lines count change. |
void |
modifyEvent(int topLine)
Informs BaseEditor object about text modification event. |
void |
modifyLineEvent(int line)
Informs about single line modification event. |
void |
removeEditorListener(EditorListener el)
Removes previously added EditorListener object. |
void |
removeRegionHandler(RegionHandler rh)
Removes previously added region handler. |
void |
searchGlobalPair(PairMatch pm)
Searches pair match in all available text, possibly, making additional processing. |
void |
searchLocalPair(PairMatch pm)
Searches pair match in currently visible text. |
void |
setBackParse(int backParse)
Specifies number of lines, for which parser would be able to run continual processing without highlight invalidation. |
void |
setFileType(FileType typename)
Changes used file type |
void |
setRegionCompact(boolean compact)
LineRegionsSupport object preferences. |
void |
setRegionMapper(RegionMapper regionMapper)
Installs specified external RegionMapper. |
void |
setRegionMapper(java.lang.String hrdClass,
java.lang.String hrdName)
Installs specified internal RegionMapper. |
void |
validate(int lno)
Validates current state of the editor and runs parser, if needed. |
void |
visibleTextEvent(int wStart,
int wSize)
Informs about changes in visible range of text lines. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BaseEditorNative(ParserFactory pf, LineSource lineSource)
Method Detail |
---|
public boolean isDisposed()
public void dispose()
BaseEditor
dispose
in interface BaseEditor
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public void setRegionCompact(boolean compact)
BaseEditor
setRegionCompact
in interface BaseEditor
compact
- Creates LineRegionsSupport (false) or
LineRegionsCompactSupport (true) object to store lists of
RegionDefine'spublic void setFileType(FileType typename)
BaseEditor
setFileType
in interface BaseEditor
public FileType chooseFileType(java.lang.String fname)
BaseEditor
chooseFileType
in interface BaseEditor
public FileType getFileType()
BaseEditor
getFileType
in interface BaseEditor
public void setRegionMapper(RegionMapper regionMapper)
BaseEditor
setRegionMapper
in interface BaseEditor
public void setRegionMapper(java.lang.String hrdClass, java.lang.String hrdName)
BaseEditor
setRegionMapper
in interface BaseEditor
public void addRegionHandler(RegionHandler rh, Region filter)
BaseEditor
addRegionHandler
in interface BaseEditor
filter
- If not null, handler would be activated only if passed regions
have specified filter
parent. This allows to
optimize performance and disable unnecesary JNI context
switches.public void removeRegionHandler(RegionHandler rh)
BaseEditor
removeRegionHandler
in interface BaseEditor
public void addEditorListener(EditorListener el)
BaseEditor
addEditorListener
in interface BaseEditor
public void removeEditorListener(EditorListener el)
BaseEditor
removeEditorListener
in interface BaseEditor
public RegionDefine getBackground()
BaseEditor
getBackground
in interface BaseEditor
public RegionDefine getVertCross()
BaseEditor
getVertCross
in interface BaseEditor
public RegionDefine getHorzCross()
BaseEditor
getHorzCross
in interface BaseEditor
public void setBackParse(int backParse)
BaseEditor
setBackParse
in interface BaseEditor
backParse
- Number of lines. If <= 0, dropped into default value.public PairMatch getPairMatch(int lineNo, int linePos)
BaseEditor
getPairMatch
in interface BaseEditor
lineNo
- Line number, where to search paired region.linePos
- Position in line, where paired region to be searched. Paired
Region is found, if it includes specified position or ends
directly at one char before line position.public void searchLocalPair(PairMatch pm)
BaseEditor
searchLocalPair
in interface BaseEditor
pm
- Unmatched pair matchpublic void searchGlobalPair(PairMatch pm)
BaseEditor
searchGlobalPair
in interface BaseEditor
pm
- Unmatched pair matchpublic LineRegion[] getLineRegions(int lno)
BaseEditor
getLineRegions
in interface BaseEditor
public void validate(int lno)
BaseEditor
validate
in interface BaseEditor
lno
- Line number, for which validation is requested. If this number
is in the current visible window range, the part of text is
validated, which is required for visual repaint. If this
number is equals to -1, all the text is validated. If this
number is not in visible range, optimal partial validation is
usedpublic void idleJob(int time)
BaseEditor
idleJob
in interface BaseEditor
time
- integer between 0 and 100, shows an abount of time, available
for this job.public void modifyEvent(int topLine)
BaseEditor
modifyEvent
in interface BaseEditor
topLine
- Topmost modified line of text.public void modifyLineEvent(int line)
BaseEditor
modifyLineEvent
in interface BaseEditor
line
- Modified line of text.public void visibleTextEvent(int wStart, int wSize)
BaseEditor
visibleTextEvent
in interface BaseEditor
wStart
- Topmost visible line of text.wSize
- Number of currently visible text lines. This number must
includes all partially visible lines.public void lineCountEvent(int newLineCount)
BaseEditor
lineCountEvent
in interface BaseEditor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |