|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colorer.swt.TextColorer
StyledText listener with syntax highlighting using Colorer library. http://colorer.sf.net/
Field Summary | |
static int |
HLS_OUTLINE
|
static int |
HLS_OUTLINE2
|
static int |
HLS_XOR
|
Constructor Summary | |
TextColorer(ParserFactory pf,
ColorManager cm)
Common TextColorer creation constructor. |
Method Summary | |
void |
addRegionHandler(RegionHandler rh)
Installs specified handler into parse process. |
void |
attach(StyledText parent)
Installs this highlighter into the specified StyledText object. |
java.lang.String |
chooseFileType(java.lang.String filename)
Selects and installs coloring style (filetype) according to filename string and current first line of text. |
void |
detach()
Removes this object from the corresponding StyledText widget. |
java.lang.String |
getFileType()
Returns currently used file type. |
boolean |
matchPair()
Moves caret to the position of currently active pair. |
boolean |
pairAvailable()
Checks if caret positioned on highlighted pair. |
void |
removeRegionHandler(RegionHandler rh)
Removes specified handler from the parse process. |
boolean |
selectContentPair()
Selects an internal part of the currently selected paired content |
boolean |
selectPair()
Selects a content of the currently positioned pair. |
void |
setCross(boolean horz,
boolean vert)
Specifies visibility of cross at the cursor position. |
void |
setFileType(java.lang.String typename)
Selects and installs specified file type. |
void |
setFullBackground(boolean full)
Inlined languages background coloring. |
void |
setPairsPainter(boolean paint,
int style)
Paint paired constructions or not. |
void |
setRegionMapper(java.lang.String name,
boolean useBackground)
Changes style/coloring scheme into the specified. |
void |
stateChanged()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int HLS_XOR
public static final int HLS_OUTLINE
public static final int HLS_OUTLINE2
Constructor Detail |
public TextColorer(ParserFactory pf, ColorManager cm)
pf
- Parsers factory, used to create all coloring text parsers.cm
- Colors Manager, used to store cached color objectsMethod Detail |
public void attach(StyledText parent)
public void detach()
public java.lang.String chooseFileType(java.lang.String filename)
filename
- File name to be used to autodetect filetypepublic void setFileType(java.lang.String typename)
typename
- Name or description of HRC filetype.public java.lang.String getFileType()
public void setRegionMapper(java.lang.String name, boolean useBackground)
name
- Name of color scheme (HRD name).useBackground
- If true, native HRD background properties
would be assigned to colored StyledText.public void setFullBackground(boolean full)
full
- If true, background color of other language insertions (jsp,
php) would be painted till end of line.
If false, only text will be painted with marked color.public void setCross(boolean horz, boolean vert)
vert
- Not usedpublic void setPairsPainter(boolean paint, int style)
paint
- Paint Matched pairs or not.style
- One of TextColorer.HLS_XOR, TextColorer.HLS_OUTLINE or TextColorer.HLS_OUTLINE2public boolean pairAvailable()
public boolean matchPair()
public boolean selectPair()
public boolean selectContentPair()
public void addRegionHandler(RegionHandler rh)
public void removeRegionHandler(RegionHandler rh)
public void stateChanged()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |