org.itsnat.comp.label
Interface ItsNatLabelRenderer


public interface ItsNatLabelRenderer

Is used to render label values as markup into DOM elements.

Author:
Jose Maria Arranz Santamaria
See Also:
ItsNatComponentManager.createDefaultItsNatLabelRenderer(), ItsNatLabel.getItsNatLabelRenderer(), ItsNatLabel.setItsNatLabelRenderer(ItsNatLabelRenderer)

Method Summary
 void renderLabel(ItsNatLabel label, java.lang.Object value, org.w3c.dom.Element labelElem, boolean isNew)
          Renders as markup the specified value into the specified element, usually as a text node.
 void unrenderLabel(ItsNatLabel label, org.w3c.dom.Element labelElem)
          Unrenders the label markup.
 

Method Detail

renderLabel

void renderLabel(ItsNatLabel label,
                 java.lang.Object value,
                 org.w3c.dom.Element labelElem,
                 boolean isNew)
Renders as markup the specified value into the specified element, usually as a text node.

Default implementation delegates to the default ElementRenderer.

Parameters:
label - the label component, may be used to provide contextual information. Default implementation ignores it.
value - the value to render.
labelElem - the label element to render the value into. Is a hint, if provided should be obtained by calling ItsNatElementComponent.getElement().
isNew - true if this is the first time the markup is rendered. Default implementation ignores this parameter.

unrenderLabel

void unrenderLabel(ItsNatLabel label,
                   org.w3c.dom.Element labelElem)
Unrenders the label markup. This method is called before the markup is removed.

Default implementation does nothing.

Parameters:
label - the label component, may be used to provide contextual information. Default implementation ignores it.
labelElem - the label element to render the value into. Is a hint, if provided should be obtained by calling ItsNatElementComponent.getElement().


Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.