|
![]() |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsunlabs.brazil.template.Template
sunlabs.brazil.template.HighlightTemplate (view source)
public class HighlightTemplate
Template class for highlighting text that matches a regular expression. All text between html/xml entities is matched against a regular expression. For each portion of text that matches the expression, a pair of html/xml tags is added on either side of all matched text. Highlighting is automatically turned off inside of head, script, style, and server tags.
Properties. These are recomputed for every page that
highlight
changes.
tag
and options
are
ignored. The default is:
<${tag} ${options}>&</${tag}>
The format of the string is a regular expression
substitution string, which supports ${} style
variable substitutions from the request properties.
highlight
tags. If set
no highlighting will take place until an actual
highlight
tag is present.
The following html tags are processed:
highlight
tag.
In the current implementation, highlight
and
nohighlight
don't nest.
Field Summary |
---|
Fields inherited from class sunlabs.brazil.template.Template |
---|
debug |
Constructor Summary | |
---|---|
HighlightTemplate()
|
Method Summary | |
---|---|
boolean |
init(RewriteContext hr)
This gets called at every page, at the beginning. |
void |
string(RewriteContext hr)
Gets all text between tags - highlighting it appropriately. |
void |
tag_head(RewriteContext hr)
Don't do highlight inside the following sections |
void |
tag_highlight(RewriteContext hr)
The special entities highlight and
nohighlight
may be used to turn highlighting on or off in certain areas. |
void |
tag_nohighlight(RewriteContext hr)
|
void |
tag_script(RewriteContext hr)
|
void |
tag_server(RewriteContext hr)
|
void |
tag_slash_head(RewriteContext hr)
|
void |
tag_slash_highlight(RewriteContext hr)
|
void |
tag_slash_nohighlight(RewriteContext hr)
|
void |
tag_slash_script(RewriteContext hr)
|
void |
tag_slash_server(RewriteContext hr)
|
void |
tag_slash_style(RewriteContext hr)
|
void |
tag_style(RewriteContext hr)
|
Methods inherited from class sunlabs.brazil.template.Template |
---|
done |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HighlightTemplate()
Method Detail |
---|
public boolean init(RewriteContext hr)
init
in interface TemplateInterface
init
in class Template
public void string(RewriteContext hr)
public void tag_head(RewriteContext hr)
public void tag_slash_head(RewriteContext hr)
public void tag_script(RewriteContext hr)
public void tag_slash_script(RewriteContext hr)
public void tag_style(RewriteContext hr)
public void tag_slash_style(RewriteContext hr)
public void tag_server(RewriteContext hr)
public void tag_slash_server(RewriteContext hr)
public void tag_highlight(RewriteContext hr)
highlight
and
nohighlight
may be used to turn highlighting on or off in certain areas.
public void tag_slash_highlight(RewriteContext hr)
public void tag_nohighlight(RewriteContext hr)
public void tag_slash_nohighlight(RewriteContext hr)
|
Version Kenai-svn-r24, Generated 08/18/09 Copyright (c) 2001-2009, Sun Microsystems. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |