|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This class encapsulates all the necessary objects for painting the control.
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.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 |
javax.servlet.jsp.PageContext |
getPageContext()
Gets the Page Context |
java.lang.String |
getResourceDir()
Returns the base directory used for resource by the painter factory |
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 |
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 interface com.cc.framework.adapter.RequestContext |
getNestedContext, getPrincipal |
Methods inherited from interface com.cc.framework.http.HttpContext |
getAttribute, getServletContext, request, response, session |
Method Detail |
public void open()
public void close()
public java.lang.String getElementName()
public void setFactory(PainterFactory factory)
factory
- Painter factorypublic javax.servlet.jsp.PageContext getPageContext()
public java.lang.String getAsString(Converter converter, java.lang.Object value) throws ConverterException
converter
- The converter to use or null
to use a default
Convertervalue
- The Bean to convert
null
ConverterException
- Is thrown when a conversion exception occurspublic java.lang.String decorateURL(java.lang.String url)
url
- the URL to encode
public java.lang.String getResourceDir()
public java.lang.String getStringResource(java.lang.String stringOrKey)
stringOrKey
- Id of the resource/key
public java.lang.String getFrameworkString(java.lang.String resourceId)
resourceId
- Id of the resource/key
public java.lang.String getFrameworkString(java.lang.String resourceId, java.lang.Object[] arguments)
resourceId
- Id of the resource/keyarguments
- MessageFormat arguments
public ImageModel getImage(java.lang.String resourceId)
resourceId
- Image Code
null
public ImageModel getImage(int size, java.lang.String resourceId)
size
- Image sizeresourceId
- Image Code
null
public ImageModel getImage(java.lang.String resourceId, java.lang.Object param)
resourceId
- Image Codeparam
- Markup parameter
null
public java.lang.String getImageSrc(java.lang.String resourceId)
resourceId
- Image Code
public java.lang.String getImageSrc(java.lang.String resourceId, java.lang.Object param)
resourceId
- Image Codeparam
- Markup Parameter
public java.lang.String getImageSrc(int size, java.lang.String resourceId)
size
- Image sizeresourceId
- Image Code
public Color getColor(java.lang.String resourceId)
resourceId
- Color Code
null
public java.awt.Color getAwtColor(java.lang.String resourceId)
resourceId
- Color Code
null
public Control getControl()
public boolean isRunAtClient()
true
when the component should run on the
clientpublic java.lang.String getStyleId()
public boolean showComments()
false
when comments should be hiddenpublic boolean isDisplayOnly()
true
if a control should be rendered as
display onlypublic ActionPainter createActionPainter(ControlActionDef action)
action
- ControlAction
public ActionPainter createActionPainter(ControlActionDef action, java.lang.String actionName)
action
- ControlActionactionName
- Additional Action Name
public org.apache.ecs.html.Input createInput(ImageModel image)
image
- Image
null
public org.apache.ecs.html.Input createInput(java.lang.String resourceId)
resourceId
- Image Code
null
public org.apache.ecs.html.IMG createImage(ImageModel image)
image
- Image
null
public org.apache.ecs.html.IMG createImage(java.lang.String resourceId)
resourceId
- Image Code
null
public org.apache.ecs.html.IMG createImage(java.lang.String resourceId, java.lang.Object param)
resourceId
- Image Codeparam
- Markup parameter
null
public org.apache.ecs.html.IMG createImage(int size, java.lang.String resourceId)
size
- Image sizeresourceId
- Image Code
null
public java.util.Locale getLocale()
getLocale
in interface RequestContext
public java.lang.String localize(java.lang.String keyOrString)
keyOrString
- String Literal or Resource Key
public java.lang.String localize(java.lang.String keyOrString, java.util.Locale locale)
keyOrString
- String Literal or Resource Keylocale
- the locale to use
public java.lang.String localize(java.lang.String keyOrString, java.lang.Object[] arguments)
keyOrString
- String Literal or Resource Keyarguments
- MessageFormat arguments
public java.lang.String localizeKey(java.lang.String resourceId, java.lang.Object[] arguments, boolean returnNull)
resourceId
- The resource key.arguments
- MessageFormat arguments or null
returnNull
- controls whether to return null or a not present indicator
public java.lang.String removeHtml(java.lang.Object html)
html
- Object in HTML format
public java.lang.String removeHtml(java.lang.Object html, boolean filter)
html
- Object in HTML formatfilter
- Filter
public java.lang.String html(java.lang.Object raw)
raw
- Object
public java.lang.String html(java.lang.Object raw, boolean filter)
raw
- Objectfilter
- Filter
public java.lang.String html(java.lang.Object raw, boolean filter, int maxlength)
raw
- Objectfilter
- Filtermaxlength
- The maximum number of visible characters
public java.lang.String attr(java.lang.Object raw)
raw
- Object
public java.lang.String attr(java.lang.Object raw, boolean filter)
raw
- Objectfilter
- Filter
public java.lang.String attr(java.lang.Object raw, boolean filter, int maxlength)
raw
- Objectfilter
- Filtermaxlength
- The maximum number of visible characters
public java.lang.String truncate(java.lang.Object obj, int maxlength)
obj
- The string to truncatemaxlength
- The maximum number of characters
public java.lang.String getSource(java.lang.String base, java.lang.String src)
base
- Base Directory or resource Identifiersrc
- Resource name
public java.lang.String getSource(ImageModel image)
image
- Image Model
public void setAttribute(java.lang.String key, java.lang.Object value)
key
- Attribute Keyvalue
- Attribute Valuepublic java.lang.Object removeAttribute(java.lang.String key)
key
- Attribute Key
null
public java.lang.Object getAttribute(java.lang.String key, boolean searchParent)
key
- Attribute KeysearchParent
- if set to true
the attribute will be search up
the PainterContext hierarchy
null
public boolean hasAttribute(java.lang.String key, boolean searchParent)
key
- Attribute KeysearchParent
- if set to true
the attribute will be search up
the PainterContext hierarchy
null
public void pushAttributes()
public void popAttributes()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |