NextApp Echo2
v2.1.1

nextapp.echo2.webcontainer.partialupdate
Class ColorUpdate

java.lang.Object
  extended by nextapp.echo2.webcontainer.partialupdate.ColorUpdate
All Implemented Interfaces:
PartialUpdateParticipant

public class ColorUpdate
extends java.lang.Object
implements PartialUpdateParticipant

A PartialUpdateParticipant to update a CSS property representing a color, e.g., 'color' or 'background-color'.


Field Summary
static java.lang.String CSS_BACKGROUND_COLOR
           
static java.lang.String CSS_COLOR
           
 
Constructor Summary
ColorUpdate(java.lang.String componentPropertyName, java.lang.String idSuffix, java.lang.String cssAttributeName)
          Creates a new ColorUpdate.
 
Method Summary
 boolean canRenderProperty(RenderContext rc, nextapp.echo2.app.update.ServerComponentUpdate update)
          Determines if this partial update participant is capable of performing its specific task.
 void renderProperty(RenderContext rc, nextapp.echo2.app.update.ServerComponentUpdate update)
          Renders an update to the client to perform the partial update.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSS_BACKGROUND_COLOR

public static final java.lang.String CSS_BACKGROUND_COLOR
See Also:
Constant Field Values

CSS_COLOR

public static final java.lang.String CSS_COLOR
See Also:
Constant Field Values
Constructor Detail

ColorUpdate

public ColorUpdate(java.lang.String componentPropertyName,
                   java.lang.String idSuffix,
                   java.lang.String cssAttributeName)
Creates a new ColorUpdate.

Parameters:
componentPropertyName - the name of the property of the component
idSuffix - the suffix to append to the root client-side identifier of the component (should be null in typical case of no suffix)
cssAttributeName - the name of the CSS attribute to update (see CSS constants provided in this class)
Method Detail

canRenderProperty

public boolean canRenderProperty(RenderContext rc,
                                 nextapp.echo2.app.update.ServerComponentUpdate update)
Description copied from interface: PartialUpdateParticipant
Determines if this partial update participant is capable of performing its specific task.

Specified by:
canRenderProperty in interface PartialUpdateParticipant
Parameters:
rc - the relevant RenderContext
update - the ServerComponentUpdate to be processed.
Returns:
true if the participant is capable of performing the task
See Also:
PartialUpdateParticipant.canRenderProperty(nextapp.echo2.webcontainer.RenderContext, nextapp.echo2.app.update.ServerComponentUpdate)

renderProperty

public void renderProperty(RenderContext rc,
                           nextapp.echo2.app.update.ServerComponentUpdate update)
Description copied from interface: PartialUpdateParticipant
Renders an update to the client to perform the partial update.

Specified by:
renderProperty in interface PartialUpdateParticipant
Parameters:
rc - the relevant RenderContext
update - the ServerComponentUpdate to be processed
See Also:
PartialUpdateParticipant.renderProperty( nextapp.echo2.webcontainer.RenderContext, nextapp.echo2.app.update.ServerComponentUpdate)

NextApp Echo2
v2.1.1