public interface IRHtml extends HasResource
HTML templates may contain parameters which have the following syntax: ${paramName}
. The values of the parameters will be provided by the code
and will be replaced properly.
There are general, pre-defined parameters which can be used without declaration (and they cannot be overridden):
${generalCss}
: general CSS in the form of an HTML <style>
tag which can be put in the <head>
section
of HTML documents.
${appName}
: name of the application
${appOpName}
: name of the application operator
The general CSS parameter defines the following CSS classes (which can be used in HTML templates if the ${generalCss}
parameter is inserted in
the <head>
section):
h
- Highlighted (used for keywords or important words)
s
- Stressed or Strong (used for a term or name from the application)
k
- Key (used for marking a key or key combo)
n
- Not important (used for marking words unimportant and less visible)
a
- Advanced details (content intended for advanced users)
D
- Definition block
N
- Note block
T
- Tip block
E
- Example block
W
- Warning or very important block
It is also possible to include the content of another HTML template if that other template is already cached. The factory methods
IGuiFactory.newRHtml(String, java.net.URL, String...)
and
IGuiFactory.newRHtml(String, java.net.URL, java.util.Set, String...)
cache the returned HTML resources, so they can be
referenced properly.
The inclusion has the following syntax:
${#<fully-qualified-html-resource-name>}The inclusion must be in a new line and must not start with white spaces. If there is a cached HTML template associated with the specified resource name, its content will be included.
IGuiFactory.newRHtml(String, java.net.URL, String...)
,
IGuiFactory.newRHtml(String, java.net.URL, java.util.Set, String...)
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get()
Returns the HTML content.
|
java.lang.String |
getTitle()
Returns the title of the HTML template.
|
getResource
java.lang.String getTitle()
java.lang.String get()
The content is read using UTF-8 charset. All parameter values will be substituted with their values.
If reading the resource throws an exception, an HTML error message will be returned indicating that content could not be loaded.
This API documentation is public and is intended for / allowed to be used by anyone.
Scelight home page: https://sites.google.com/site/scelight/
Scelight is a trademark of András Belicza. Copyright © András Belicza, 2013-2015. All rights reserved.