|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.imp.PainterContextWrapper
Wrapper for a painter context
Field Summary | |
private PainterContext |
nested
The nested painter context |
Constructor Summary | |
PainterContextWrapper(PainterContext nested)
Constructor |
Method Summary | |
java.lang.String |
attr(java.lang.Object raw)
Converts a String to a valid HTML Attribute |
java.lang.String |
attr(java.lang.Object raw,
boolean filter)
Converts a String to a valid HTML Attribute |
java.lang.String |
attr(java.lang.Object raw,
boolean filter,
int maxlength)
Converts a String to a valid HTML Attribute |
void |
close()
After the painter context has been used it has to be closed. |
ActionPainter |
createActionPainter(ControlActionDef action)
Creates an ActionPainter. |
ActionPainter |
createActionPainter(ControlActionDef action,
java.lang.String actionName)
Creates an ActionPainter. |
org.apache.ecs.html.IMG |
createImage(ImageModel image)
Retrieves an image for the specified Id |
org.apache.ecs.html.IMG |
createImage(int size,
java.lang.String resourceId)
Retrieves an image for the specified Id |
org.apache.ecs.html.IMG |
createImage(java.lang.String resourceId)
Retrieves an image for the specified Id |
org.apache.ecs.html.IMG |
createImage(java.lang.String resourceId,
java.lang.Object param)
Retrieves an image for the specified Id |
org.apache.ecs.html.Input |
createInput(ImageModel image)
Retrieves an image for the specified Id |
org.apache.ecs.html.Input |
createInput(java.lang.String resourceId)
Retrieves an image for the specified Id |
java.lang.String |
decorateURL(java.lang.String url)
Decorates the URL with RequestDecorator settings and appends the JSESSIONID when URL-rewriting is enabled to track sessions Every URL has to be decorated this way! |
java.lang.String |
getAsString(Converter converter,
java.lang.Object value)
Uses a Bean Converter to convert the given object to a String representation. |
java.lang.Object |
getAttribute(java.lang.String key,
boolean searchParent)
Gets an Attribute from the Painter Context hierarchy |
java.lang.Object |
getAttribute(java.lang.String name,
HttpScope scope)
Returns the attribute with the given name from the specified scope |
java.awt.Color |
getAwtColor(java.lang.String resourceId)
Retrieves an color for the specified Id |
Color |
getColor(java.lang.String resourceId)
Retrieves an color for the specified Id |
Control |
getControl()
|
java.lang.String |
getElementName()
Retrieves the name of the HTML element. |
java.lang.String |
getFrameworkString(java.lang.String resourceId)
Returns a framework string resource |
java.lang.String |
getFrameworkString(java.lang.String resourceId,
java.lang.Object[] arguments)
Returns a framework string resource |
ImageModel |
getImage(int size,
java.lang.String resourceId)
Retrieves an image for the specified Id |
ImageModel |
getImage(java.lang.String resourceId)
Retrieves an image for the specified Id |
ImageModel |
getImage(java.lang.String resourceId,
java.lang.Object param)
Retrieves an image for the specified Id |
java.lang.String |
getImageSrc(int size,
java.lang.String resourceId)
Retrieves an image for the specified Id |
java.lang.String |
getImageSrc(java.lang.String resourceId)
Retrieves an image for the specified Id |
java.lang.String |
getImageSrc(java.lang.String resourceId,
java.lang.Object param)
Retrieves an image for the specified Id |
java.util.Locale |
getLocale()
Gets the Locale Setting for this Control |
RequestContext |
getNestedContext()
Gets the nested Action Context |
javax.servlet.jsp.PageContext |
getPageContext()
Gets the Page Context |
Principal |
getPrincipal()
Returns the Principal Object in the current User session |
java.lang.String |
getResourceDir()
Returns the base directory used for resource by the painter factory |
javax.servlet.ServletContext |
getServletContext()
Returns the Servlet Context |
java.lang.String |
getSource(ImageModel image)
Gets the localized resource name |
java.lang.String |
getSource(java.lang.String base,
java.lang.String src)
Returns the localized Image resource name |
java.lang.String |
getStringResource(java.lang.String stringOrKey)
Returns a string resource |
java.lang.String |
getStyleId()
Returns the Style Id of the control. |
boolean |
hasAttribute(java.lang.String key,
boolean searchParent)
Gets an Attribute from the Painter Context hierarchy |
java.lang.String |
html(java.lang.Object raw)
Converts a String to an equivalent HTML-String |
java.lang.String |
html(java.lang.Object raw,
boolean filter)
Converts a String to an equivalent HTML-String |
java.lang.String |
html(java.lang.Object raw,
boolean filter,
int maxlength)
Converts a String to an equivalent HTML-String |
boolean |
isDisplayOnly()
This method checks if a control that is rendered within this painter context has to be "display only" |
boolean |
isRunAtClient()
This Method checks if the control should run on the client |
java.lang.String |
localize(java.lang.String keyOrString)
Localizes a string depending on the localization settings of the Painter context |
java.lang.String |
localize(java.lang.String keyOrString,
java.util.Locale locale)
Localizes a string depending on the localization settings of the Painter context |
java.lang.String |
localize(java.lang.String keyOrString,
java.lang.Object[] arguments)
Localizes a string depending on the localization settings of the Painter context |
java.lang.String |
localizeKey(java.lang.String resourceId,
java.lang.Object[] arguments,
boolean returnNull)
Localizes a string depending on the localization settings of the Painter context. |
void |
open()
The painter context has to be opened before it can be used. |
void |
popAttributes()
Restores the attributes from the Stack all current attributes are lost |
void |
pushAttributes()
Pushes the current attributes on a stack for later restore |
java.lang.Object |
removeAttribute(java.lang.String key)
Removes an Attribute for this Painter |
java.lang.String |
removeHtml(java.lang.Object html)
Removes all HTML formatting from the given HTML-String |
java.lang.String |
removeHtml(java.lang.Object html,
boolean filter)
Removes all HTML formatting from the given HTML-String depending on the filter setting |
javax.servlet.http.HttpServletRequest |
request()
Returns the HTTP Request |
javax.servlet.http.HttpServletResponse |
response()
Returns the HTTP Response |
javax.servlet.http.HttpSession |
session()
Gets the session object |
void |
setAttribute(java.lang.String key,
java.lang.Object value)
Sets an Attribute for this Painter |
void |
setFactory(PainterFactory factory)
Sets the painter factory |
boolean |
showComments()
This method checks if HTML comments should be written to the output |
java.lang.String |
truncate(java.lang.Object obj,
int maxlength)
Truncates a given string to a maximum number of characters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private PainterContext nested
Constructor Detail |
public PainterContextWrapper(PainterContext nested)
nested
- the painter context that should be wrappedMethod Detail |
public void close()
PainterContext
close
in interface PainterContext
PainterContext.close()
public ActionPainter createActionPainter(ControlActionDef action, java.lang.String actionName)
PainterContext
createActionPainter
in interface PainterContext
action
- ControlActionactionName
- Additional Action Name
PainterContext.createActionPainter(com.cc.framework.ui.control.ControlActionDef, java.lang.String)
public ActionPainter createActionPainter(ControlActionDef action)
PainterContext
createActionPainter
in interface PainterContext
action
- ControlAction
PainterContext.createActionPainter(com.cc.framework.ui.control.ControlActionDef)
public org.apache.ecs.html.IMG createImage(ImageModel image)
PainterContext
createImage
in interface PainterContext
image
- Image
null
PainterContext.createImage(com.cc.framework.ui.model.ImageModel)
public org.apache.ecs.html.IMG createImage(int size, java.lang.String resourceId)
PainterContext
createImage
in interface PainterContext
size
- Image sizeresourceId
- Image Code
null
PainterContext.createImage(int, java.lang.String)
public org.apache.ecs.html.IMG createImage(java.lang.String resourceId, java.lang.Object param)
PainterContext
createImage
in interface PainterContext
resourceId
- Image Codeparam
- Markup parameter
null
PainterContext.createImage(java.lang.String, java.lang.Object)
public org.apache.ecs.html.IMG createImage(java.lang.String resourceId)
PainterContext
createImage
in interface PainterContext
resourceId
- Image Code
null
PainterContext.createImage(java.lang.String)
public org.apache.ecs.html.Input createInput(ImageModel image)
PainterContext
createInput
in interface PainterContext
image
- Image
null
PainterContext.createInput(com.cc.framework.ui.model.ImageModel)
public org.apache.ecs.html.Input createInput(java.lang.String resourceId)
PainterContext
createInput
in interface PainterContext
resourceId
- Image Code
null
PainterContext.createInput(java.lang.String)
public java.lang.String decorateURL(java.lang.String url)
PainterContext
decorateURL
in interface PainterContext
url
- the URL to encode
PainterContext.decorateURL(java.lang.String)
public java.lang.String getAsString(Converter converter, java.lang.Object value) throws ConverterException
PainterContext
getAsString
in interface PainterContext
converter
- The converter to use or null
to use a default
Convertervalue
- The Bean to convert
null
ConverterException
- Is thrown when a conversion exception occursPainterContext.getAsString(com.cc.framework.convert.Converter, java.lang.Object)
public java.lang.Object getAttribute(java.lang.String key, boolean searchParent)
PainterContext
getAttribute
in interface PainterContext
key
- Attribute KeysearchParent
- if set to true
the attribute will be search up
the PainterContext hierarchy
null
PainterContext.getAttribute(java.lang.String, boolean)
public java.awt.Color getAwtColor(java.lang.String resourceId)
PainterContext
getAwtColor
in interface PainterContext
resourceId
- Color Code
null
PainterContext.getAwtColor(java.lang.String)
public Color getColor(java.lang.String resourceId)
PainterContext
getColor
in interface PainterContext
resourceId
- Color Code
null
PainterContext.getColor(java.lang.String)
public Control getControl()
getControl
in interface PainterContext
PainterContext.getControl()
public java.lang.String getElementName()
PainterContext
getElementName
in interface PainterContext
PainterContext.getElementName()
public java.lang.String getFrameworkString(java.lang.String resourceId, java.lang.Object[] arguments)
PainterContext
getFrameworkString
in interface PainterContext
resourceId
- Id of the resource/keyarguments
- MessageFormat arguments
PainterContext.getFrameworkString(java.lang.String, java.lang.Object[])
public java.lang.String getFrameworkString(java.lang.String resourceId)
PainterContext
getFrameworkString
in interface PainterContext
resourceId
- Id of the resource/key
PainterContext.getFrameworkString(java.lang.String)
public ImageModel getImage(int size, java.lang.String resourceId)
PainterContext
getImage
in interface PainterContext
size
- Image sizeresourceId
- Image Code
null
PainterContext.getImage(int, java.lang.String)
public ImageModel getImage(java.lang.String resourceId, java.lang.Object param)
PainterContext
getImage
in interface PainterContext
resourceId
- Image Codeparam
- Markup parameter
null
PainterContext.getImage(java.lang.String, java.lang.Object)
public ImageModel getImage(java.lang.String resourceId)
PainterContext
getImage
in interface PainterContext
resourceId
- Image Code
null
PainterContext.getImage(java.lang.String)
public java.lang.String getImageSrc(int size, java.lang.String resourceId)
PainterContext
getImageSrc
in interface PainterContext
size
- Image sizeresourceId
- Image Code
PainterContext.getImageSrc(int, java.lang.String)
public java.lang.String getImageSrc(java.lang.String resourceId, java.lang.Object param)
PainterContext
getImageSrc
in interface PainterContext
resourceId
- Image Codeparam
- Markup Parameter
PainterContext.getImageSrc(java.lang.String, java.lang.Object)
public java.lang.String getImageSrc(java.lang.String resourceId)
PainterContext
getImageSrc
in interface PainterContext
resourceId
- Image Code
PainterContext.getImageSrc(java.lang.String)
public java.util.Locale getLocale()
PainterContext
getLocale
in interface PainterContext
PainterContext.getLocale()
public javax.servlet.jsp.PageContext getPageContext()
PainterContext
getPageContext
in interface PainterContext
PainterContext.getPageContext()
public java.lang.String getResourceDir()
PainterContext
getResourceDir
in interface PainterContext
PainterContext.getResourceDir()
public java.lang.String getSource(ImageModel image)
PainterContext
getSource
in interface PainterContext
image
- Image Model
PainterContext.getSource(com.cc.framework.ui.model.ImageModel)
public java.lang.String getSource(java.lang.String base, java.lang.String src)
PainterContext
getSource
in interface PainterContext
base
- Base Directory or resource Identifiersrc
- Resource name
PainterContext.getSource(java.lang.String, java.lang.String)
public java.lang.String getStringResource(java.lang.String stringOrKey)
PainterContext
getStringResource
in interface PainterContext
stringOrKey
- Id of the resource/key
PainterContext.getStringResource(java.lang.String)
public java.lang.String getStyleId()
PainterContext
getStyleId
in interface PainterContext
PainterContext.getStyleId()
public boolean hasAttribute(java.lang.String key, boolean searchParent)
PainterContext
hasAttribute
in interface PainterContext
key
- Attribute KeysearchParent
- if set to true
the attribute will be search up
the PainterContext hierarchy
null
PainterContext.hasAttribute(java.lang.String, boolean)
public java.lang.String html(java.lang.Object raw, boolean filter, int maxlength)
PainterContext
html
in interface PainterContext
raw
- Objectfilter
- Filtermaxlength
- The maximum number of visible characters
PainterContext.html(java.lang.Object, boolean, int)
public java.lang.String html(java.lang.Object raw, boolean filter)
PainterContext
html
in interface PainterContext
raw
- Objectfilter
- Filter
PainterContext.html(java.lang.Object, boolean)
public java.lang.String removeHtml(java.lang.Object html)
PainterContext
removeHtml
in interface PainterContext
html
- Object in HTML format
PainterContext.removeHtml(java.lang.Object)
public java.lang.String removeHtml(java.lang.Object html, boolean filter)
PainterContext
removeHtml
in interface PainterContext
html
- Object in HTML formatfilter
- Filter
PainterContext.removeHtml(java.lang.Object, boolean)
public java.lang.String html(java.lang.Object raw)
PainterContext
html
in interface PainterContext
raw
- Object
PainterContext.html(java.lang.Object)
public java.lang.String attr(java.lang.Object raw, boolean filter, int maxlength)
PainterContext
attr
in interface PainterContext
raw
- Objectfilter
- Filtermaxlength
- The maximum number of visible characters
PainterContext.attr(java.lang.Object, boolean, int)
public java.lang.String attr(java.lang.Object raw, boolean filter)
PainterContext
attr
in interface PainterContext
raw
- Objectfilter
- Filter
PainterContext.attr(java.lang.Object, boolean)
public java.lang.String attr(java.lang.Object raw)
PainterContext
attr
in interface PainterContext
raw
- Object
PainterContext.attr(java.lang.Object)
public boolean isDisplayOnly()
PainterContext
isDisplayOnly
in interface PainterContext
true
if a control should be rendered as
display onlyPainterContext.isDisplayOnly()
public boolean isRunAtClient()
PainterContext
isRunAtClient
in interface PainterContext
true
when the component should run on the
clientPainterContext.isRunAtClient()
public java.lang.String localize(java.lang.String keyOrString, java.util.Locale locale)
PainterContext
localize
in interface PainterContext
keyOrString
- String Literal or Resource Keylocale
- the locale to use
PainterContext.localize(java.lang.String, java.util.Locale)
public java.lang.String localize(java.lang.String keyOrString, java.lang.Object[] arguments)
PainterContext
localize
in interface PainterContext
keyOrString
- String Literal or Resource Keyarguments
- MessageFormat arguments
PainterContext.localize(java.lang.String, java.lang.Object[])
public java.lang.String localize(java.lang.String keyOrString)
PainterContext
localize
in interface PainterContext
keyOrString
- String Literal or Resource Key
PainterContext.localize(java.lang.String)
public java.lang.String localizeKey(java.lang.String resourceId, java.lang.Object[] arguments, boolean returnNull)
PainterContext
localizeKey
in interface PainterContext
resourceId
- The resource key.arguments
- MessageFormat arguments or null
returnNull
- controls whether to return null or a not present indicator
PainterContext.localizeKey(java.lang.String, java.lang.Object[], boolean)
public void open()
PainterContext
open
in interface PainterContext
PainterContext.open()
public void popAttributes()
PainterContext
popAttributes
in interface PainterContext
PainterContext.popAttributes()
public void pushAttributes()
PainterContext
pushAttributes
in interface PainterContext
PainterContext.pushAttributes()
public java.lang.Object removeAttribute(java.lang.String key)
PainterContext
removeAttribute
in interface PainterContext
key
- Attribute Key
null
PainterContext.removeAttribute(java.lang.String)
public void setAttribute(java.lang.String key, java.lang.Object value)
PainterContext
setAttribute
in interface PainterContext
key
- Attribute Keyvalue
- Attribute ValuePainterContext.setAttribute(java.lang.String, java.lang.Object)
public void setFactory(PainterFactory factory)
PainterContext
setFactory
in interface PainterContext
factory
- Painter factoryPainterContext.setFactory(com.cc.framework.ui.painter.PainterFactory)
public boolean showComments()
PainterContext
showComments
in interface PainterContext
false
when comments should be hiddenPainterContext.showComments()
public java.lang.String truncate(java.lang.Object obj, int maxlength)
PainterContext
truncate
in interface PainterContext
obj
- The string to truncatemaxlength
- The maximum number of characters
PainterContext.truncate(java.lang.Object, int)
public RequestContext getNestedContext()
RequestContext
getNestedContext
in interface RequestContext
RequestContext.getNestedContext()
public Principal getPrincipal()
RequestContext
getPrincipal
in interface RequestContext
RequestContext.getPrincipal()
public java.lang.Object getAttribute(java.lang.String name, HttpScope scope)
HttpContext
getAttribute
in interface HttpContext
name
- the attribute namescope
- the scope to search
null
HttpContext.getAttribute(java.lang.String, com.cc.framework.http.HttpScope)
public javax.servlet.ServletContext getServletContext()
HttpContext
getServletContext
in interface HttpContext
HttpContext.getServletContext()
public javax.servlet.http.HttpServletRequest request()
HttpContext
request
in interface HttpContext
HttpContext.request()
public javax.servlet.http.HttpServletResponse response()
HttpContext
response
in interface HttpContext
HttpContext.response()
public javax.servlet.http.HttpSession session()
HttpContext
session
in interface HttpContext
HttpContext.session()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |