|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opencms.jsp.CmsJspBean
org.opencms.jsp.CmsJspActionElement
org.opencms.frontend.templateone.CmsTemplateBase
org.opencms.frontend.templateone.CmsTemplateStyleSheet
public class CmsTemplateStyleSheet
Provides methods to build the dynamic CSS style sheet of template one.
| Field Summary | |
|---|---|
static java.lang.String |
FILENAME_CONFIGFILE
Default file name of the CSS configuration file. |
static java.lang.String |
NODE_OPTIONALCONFIG
Node name of the optional configuration nodes. |
static java.lang.String |
PARAM_CONFIGFILE
Request parameter name providing the configuration file URI. |
static java.lang.String |
PROPERTY_CONFIGFILE
Name of the property key to set the path to the configuration file. |
| Fields inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
ATTRIBUTE_ORIGINAL_URI |
| Fields inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
NOT_INITIALIZED |
| Constructor Summary | |
|---|---|
CmsTemplateStyleSheet()
Empty constructor, required for every JavaBean. |
|
CmsTemplateStyleSheet(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Constructor, with parameters. |
|
| Method Summary | |
|---|---|
static java.lang.String |
calculateHeight(java.lang.String value,
int delta)
Calculates the height of an element. |
java.lang.String |
getConfigValue(java.lang.String key,
java.lang.String defaultValue)
Returns the configuration value for the specified key from the configuration. |
java.lang.String |
getFontUnderline(java.lang.String key,
java.lang.String defaultValue)
Returns the CSS formatting String for underlining an element. |
java.lang.String |
getFontWeight(java.lang.String key,
java.lang.String defaultValue)
Returns the CSS formatting String for bold output of an element. |
java.lang.String |
getHeadlineSize(int headline)
Returns the size of the headline with the given number. |
java.lang.String |
getOptionalConfigValue(java.lang.String key,
java.lang.String defaultValue)
Returns an optional configuration value for the specified key from the configuration. |
java.lang.String |
getResourcePath()
Returns the substituted path to the modules resource folder. |
java.lang.String |
getTemplateWidth()
Returns the width of the template to display depending on the configuration. |
void |
init(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Initialize this bean with the current page context, request and response. |
| Methods inherited from class org.opencms.frontend.templateone.CmsTemplateBase |
|---|
getOriginalUri, initUri, isUriChanged |
| Methods inherited from class org.opencms.jsp.CmsJspActionElement |
|---|
editable, editable, editable, editableManualClose, editableManualOpen, getContent, getContent, getMessages, getMessages, getMessages, getMessages, getNavigation, getNavigationUri, img, img, include, include, include, include, include, include, includeSilent, includeSilent, includeSilent, includeSilent, info, label, link, link, properties, properties, property, property, property, property, template, template, template, toAbsolute, user |
| Methods inherited from class org.opencms.jsp.CmsJspBean |
|---|
getCmsObject, getController, getJspContext, getMessage, getRequest, getRequestContext, getResponse, handleException, isNotInitialized, isSupressingExceptions, setContentType, setStatus, setSupressingExceptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FILENAME_CONFIGFILE
public static final java.lang.String NODE_OPTIONALCONFIG
public static final java.lang.String PARAM_CONFIGFILE
public static final java.lang.String PROPERTY_CONFIGFILE
| Constructor Detail |
|---|
public CmsTemplateStyleSheet()
public CmsTemplateStyleSheet(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Use this constructor for the template.
context - the JSP page context objectreq - the JSP requestres - the JSP response| Method Detail |
|---|
public static java.lang.String calculateHeight(java.lang.String value,
int delta)
value - the old height valuedelta - the delta to use
public java.lang.String getConfigValue(java.lang.String key,
java.lang.String defaultValue)
key - the key name to look updefaultValue - the default value used when no value was found for the key
public java.lang.String getFontUnderline(java.lang.String key,
java.lang.String defaultValue)
Checks the value in the configuration file, if the value is "true",
the text decoration will be underlined, otherwise none.
key - the key name to look up in the optional configurationdefaultValue - the default value used when no value was found for the key
public java.lang.String getFontWeight(java.lang.String key,
java.lang.String defaultValue)
Checks the value in the configuration file, if the value is "true",
the font weight will be bold, otherwise normal.
key - the key name to look up in the optional configurationdefaultValue - the default value used when no value was found for the key
public java.lang.String getHeadlineSize(int headline)
headline - the number of the heading element (1 to 6)
public java.lang.String getOptionalConfigValue(java.lang.String key,
java.lang.String defaultValue)
key - the key name to look updefaultValue - the default value used when no value was found for the key
public java.lang.String getResourcePath()
public java.lang.String getTemplateWidth()
public void init(javax.servlet.jsp.PageContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
It is required to call one of the init() methods before you can use the instance of this bean.
init in class org.opencms.jsp.CmsJspBeancontext - the JSP page context objectreq - the JSP requestres - the JSP response
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||