|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cc.framework.ui.painter.def.DefActionPainter
The ActionPainter Class is responsible to generate a HTML-Element to initiate an Action
Field Summary | |
private ControlAction |
action
ControlAction |
private boolean |
active
Indicates if the User is allowed to activated the Action |
private ClientHandler |
additionalHandler
Additional client handlers which can be set with a call to addClientHandler() |
private java.lang.String |
anchor
Anchor |
private PainterContext |
ctx
Painter context |
private ClientHandler |
handler
Access to the client handler |
private ImageModel |
image
ImageModel |
private AlignmentType |
imageAlign
Specifies the alignment of the image (in front of / or behind the label) |
private java.lang.String |
imageStyle
Additional image style |
private AlignmentType |
imageVAlign
Specifies the vertical alignment of the image (in front of / or behind the label) |
private java.lang.String |
label
Label |
private java.lang.String |
linkName
The anchor name to be defined within this page, so that you can reference it with intra-page Hyperlinks. |
private java.lang.String |
style
Style |
private java.lang.String |
styleClass
StyleClass |
private java.lang.String |
styleId
StyleId |
private java.lang.String |
target
Target |
private java.lang.String |
tooltip
Tooltip |
Constructor Summary | |
DefActionPainter(PainterContext ctx,
ControlAction action)
Constructor for ActionPainter |
Method Summary | |
protected void |
addAjaxHandlers(org.apache.ecs.html.A anchor)
|
void |
addEventHandler(ClientEvent event,
java.lang.String handler)
Adds an additional event handler to this painter |
void |
addParameter(boolean value)
Method addParameter |
void |
addParameter(java.lang.Boolean value)
Method addParameter |
void |
addParameter(int value)
Method addParameter |
void |
addParameter(java.lang.Integer value)
Method addParameter |
void |
addParameter(long value)
Method addParameter |
void |
addParameter(java.lang.Long value)
Method addParameter |
void |
addParameter(java.lang.Object obj)
Method addParameter |
void |
addParameter(java.lang.String value)
Method addParameter |
protected java.lang.String |
createActionHref()
Creates the actions Hyperlink |
protected java.lang.String |
createAjaxOnClick(AjaxSettings settings)
|
protected org.apache.ecs.ConcreteElement |
createBody()
Creates the passive Element which is visible to the user |
org.apache.ecs.ConcreteElement |
createElement()
Creates an HTML Element which makes it possible to choose the Action on the user interface. |
protected org.apache.ecs.html.IMG |
createImage()
Creates the Image |
protected org.apache.ecs.ConcreteElement |
createLink(org.apache.ecs.ConcreteElement linkBody)
Creates an active Element which makes it possible to choose the Action on the user interface. |
ControlAction |
getAction()
return the Action |
protected ClientHandler |
getAdditionalHandler()
|
java.lang.String |
getAnchor()
|
protected PainterContext |
getCtx()
|
protected ClientHandler |
getHandler()
|
ImageModel |
getImage()
Returns the Image |
AlignmentType |
getImageAlign()
Returns the alignment of an additional image |
java.lang.String |
getImageStyle()
|
AlignmentType |
getImageVAlign()
Returns the vertical alignment of an additional image |
java.lang.String |
getLabel()
Returns the Label |
java.lang.String |
getLinkName()
|
java.lang.String |
getStyle()
Returns the Style |
java.lang.String |
getStyleClass()
Returns the StyleClass |
java.lang.String |
getStyleId()
Returns the StyleId |
java.lang.String |
getTarget()
Returns the Target |
java.lang.String |
getTooltip()
Returns the Tooltip |
boolean |
isActive()
Returns the Active Flag |
boolean |
isFormAction()
Returns the form action Flag |
void |
setActive(boolean b)
Sets the Active Flag |
void |
setAnchor(java.lang.String anchor)
Sets the Anchor to appended to the URL (#anchor) |
void |
setBehavior(ActionBehavior behavior)
Sets some information about the actions behavior. |
void |
setClientHandler(ClientHandler handler)
sets the Client Event Handlers |
void |
setImage(ImageModel image)
Sets the Image |
void |
setImage(java.lang.String imageResource)
Deprecated. use setImage(ImageModel) instead |
void |
setImage(java.lang.String imageResource,
int width,
int height)
Deprecated. use setImage(ImageModel) instead |
void |
setImageAlign(AlignmentType type)
Sets the alignment of an additional image |
void |
setImageStyle(java.lang.String style)
Sets an additional image Style |
void |
setImageVAlign(AlignmentType type)
Sets the vertical alignment of an additional image |
void |
setLabel(java.lang.String label)
Sets the Label. |
void |
setLinkName(java.lang.String linkName)
The anchor name to be defined within this page, so that you can reference it with intra-page hyperlinks. |
void |
setStyle(java.lang.String style)
Sets the Style |
void |
setStyleClass(java.lang.String styleClass)
Sets the StyleClass |
void |
setStyleId(java.lang.String styleId)
Sets the StyleId |
void |
setTarget(java.lang.String target)
Sets the Target |
void |
setTooltip(java.lang.String tooltip)
Sets the ToolTip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ControlAction action
private boolean active
private ImageModel image
private java.lang.String imageStyle
private java.lang.String label
private java.lang.String tooltip
private java.lang.String style
private java.lang.String styleId
private java.lang.String styleClass
private java.lang.String target
private java.lang.String anchor
private java.lang.String linkName
private ClientHandler handler
private ClientHandler additionalHandler
private PainterContext ctx
private AlignmentType imageAlign
private AlignmentType imageVAlign
Constructor Detail |
public DefActionPainter(PainterContext ctx, ControlAction action)
ctx
- Painter Contextaction
- ControlActionMethod Detail |
public boolean isFormAction()
ActionPainter
isFormAction
in interface ActionPainter
true
when this action link should
submit the enclosing HTML formActionPainter.isFormAction()
public void addEventHandler(ClientEvent event, java.lang.String handler)
ActionPainter
addEventHandler
in interface ActionPainter
event
- Eventhandler
- ScriptCodeActionPainter.addEventHandler(com.cc.framework.ui.model.ClientEvent, java.lang.String)
public void addParameter(java.lang.Object obj)
ActionPainter
addParameter
in interface ActionPainter
obj
- ObjectActionPainter.addParameter(java.lang.Object)
public void addParameter(java.lang.String value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(java.lang.String)
public void addParameter(java.lang.Integer value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(java.lang.Integer)
public void addParameter(int value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(int)
public void addParameter(java.lang.Long value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(java.lang.Long)
public void addParameter(long value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(long)
public void addParameter(java.lang.Boolean value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(java.lang.Boolean)
public void addParameter(boolean value)
ActionPainter
addParameter
in interface ActionPainter
value
- ValueActionPainter.addParameter(boolean)
public void setImage(java.lang.String imageResource)
imageResource
- ImageResourcepublic void setImage(java.lang.String imageResource, int width, int height)
imageResource
- ImageResourcewidth
- Image Widthheight
- Image Heightpublic void setImage(ImageModel image)
ActionPainter
setImage
in interface ActionPainter
image
- ImageModelActionPainter.setImage(com.cc.framework.ui.model.ImageModel)
public void setImageStyle(java.lang.String style)
ActionPainter
setImageStyle
in interface ActionPainter
style
- Image styleActionPainter.setImageStyle(java.lang.String)
public void setClientHandler(ClientHandler handler)
ActionPainter
setClientHandler
in interface ActionPainter
handler
- Client HandlerActionPainter.setClientHandler(com.cc.framework.ui.model.ClientHandler)
public void setTooltip(java.lang.String tooltip)
ActionPainter
setTooltip
in interface ActionPainter
tooltip
- ToolTipActionPainter.setTooltip(java.lang.String)
public void setTarget(java.lang.String target)
ActionPainter
setTarget
in interface ActionPainter
target
- TargetActionPainter.setTarget(java.lang.String)
public void setAnchor(java.lang.String anchor)
ActionPainter
setAnchor
in interface ActionPainter
anchor
- AnchorActionPainter.setAnchor(java.lang.String)
public void setLinkName(java.lang.String linkName)
ActionPainter
setLinkName
in interface ActionPainter
linkName
- Link NameActionPainter.setLinkName(java.lang.String)
public void setLabel(java.lang.String label)
ActionPainter
setLabel
in interface ActionPainter
label
- LabelActionPainter.setLabel(java.lang.String)
public void setStyle(java.lang.String style)
ActionPainter
setStyle
in interface ActionPainter
style
- StyleActionPainter.setStyle(java.lang.String)
public void setStyleId(java.lang.String styleId)
ActionPainter
setStyleId
in interface ActionPainter
styleId
- StyleIdActionPainter.setStyleId(java.lang.String)
public void setStyleClass(java.lang.String styleClass)
ActionPainter
setStyleClass
in interface ActionPainter
styleClass
- StyleClassActionPainter.setStyleClass(java.lang.String)
public void setBehavior(ActionBehavior behavior)
ActionPainter
setBehavior
in interface ActionPainter
behavior
- Directs the framework to include a transaction token (if any)
in all generated hyperlinks. The Transaction token is used to
track form re-submissions. enables the AJAX handlers for this
actionActionPainter.setBehavior(com.cc.framework.ui.model.ActionBehavior)
public ControlAction getAction()
ActionPainter
getAction
in interface ActionPainter
ActionPainter.getAction()
public java.lang.String getAnchor()
getAnchor
in interface ActionPainter
ActionPainter.getAnchor()
public ImageModel getImage()
ActionPainter
getImage
in interface ActionPainter
ActionPainter.getImage()
public java.lang.String getImageStyle()
getImageStyle
in interface ActionPainter
ActionPainter.getImageStyle()
protected ClientHandler getHandler()
protected ClientHandler getAdditionalHandler()
protected PainterContext getCtx()
public java.lang.String getLabel()
ActionPainter
getLabel
in interface ActionPainter
ActionPainter.getLabel()
public java.lang.String getLinkName()
getLinkName
in interface ActionPainter
ActionPainter.getLinkName()
public java.lang.String getStyle()
ActionPainter
getStyle
in interface ActionPainter
ActionPainter.getStyle()
public java.lang.String getStyleClass()
ActionPainter
getStyleClass
in interface ActionPainter
ActionPainter.getStyleClass()
public java.lang.String getStyleId()
ActionPainter
getStyleId
in interface ActionPainter
ActionPainter.getStyleId()
public java.lang.String getTarget()
ActionPainter
getTarget
in interface ActionPainter
ActionPainter.getTarget()
public java.lang.String getTooltip()
ActionPainter
getTooltip
in interface ActionPainter
ActionPainter.getTooltip()
public boolean isActive()
ActionPainter
isActive
in interface ActionPainter
ActionPainter.isActive()
public void setActive(boolean b)
ActionPainter
setActive
in interface ActionPainter
b
- FlagActionPainter.setActive(boolean)
public AlignmentType getImageAlign()
ActionPainter
getImageAlign
in interface ActionPainter
ActionPainter.getImageAlign()
public void setImageAlign(AlignmentType type)
ActionPainter
setImageAlign
in interface ActionPainter
type
- Alignment TypeActionPainter.setImageAlign(com.cc.framework.ui.AlignmentType)
public AlignmentType getImageVAlign()
ActionPainter
getImageVAlign
in interface ActionPainter
ActionPainter.getImageVAlign()
public void setImageVAlign(AlignmentType type)
ActionPainter
setImageVAlign
in interface ActionPainter
type
- Alignment TypeActionPainter.setImageVAlign(com.cc.framework.ui.AlignmentType)
protected java.lang.String createActionHref()
public org.apache.ecs.ConcreteElement createElement()
ActionPainter
createElement
in interface ActionPainter
ActionPainter.createElement()
protected org.apache.ecs.html.IMG createImage()
protected org.apache.ecs.ConcreteElement createBody()
protected org.apache.ecs.ConcreteElement createLink(org.apache.ecs.ConcreteElement linkBody)
linkBody
- The nested link body
protected void addAjaxHandlers(org.apache.ecs.html.A anchor)
protected java.lang.String createAjaxOnClick(AjaxSettings settings)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |