|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopointng.ui.syncpeer.AbstractEchoPointPeer
public abstract class AbstractEchoPointPeer
AbstractEchoPointPeer is a base class for peers that dont
necessarily adhere to container semantics
| Field Summary | |
|---|---|
protected static java.lang.String |
DEFAULT_CONTAINER_TAG
This is the default tag used as a HTML container for child elements. |
protected PartialUpdateManager |
partialUpdateManager
There is a PartialUpdateManager available for subclass
peers to use to for partial update support
By default it has an AblePartialUpdater added to it to handle
echopoint.able.* interfaces as well as a background and foreground
color partial update support. |
| Constructor Summary | |
|---|---|
AbstractEchoPointPeer()
Constructs a AbstractEchoPointPeer |
|
| Method Summary | |
|---|---|
protected void |
disposeRenderState(Component component)
Called to dispose of any render state for a given component. |
java.lang.String |
getContainerId(Component child)
Returns an identifier in the form "parentId_contains_childId". |
void |
renderAdd(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId,
Component component)
This calls renderHtml() to render the entire peer output. |
void |
renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
Removes any render state that is associated with the component. |
void |
renderHtml(RenderContext rc,
ServerComponentUpdate update,
org.w3c.dom.Node parentNode,
Component component)
This sets up the EchoPoint RenderingContext helper and then calls the abstract renderHtml method. |
abstract void |
renderHtml(RenderingContext rc,
org.w3c.dom.Node parentNode,
Component component)
This is the rendering method you must implement if you are to use AbstractEchoPointPeer. |
protected org.w3c.dom.Element |
renderReplaceableChild(RenderContext rc,
ServerComponentUpdate update,
org.w3c.dom.Node parentNode,
Component child)
Renders an individual child component of the AbstractEchoPointPeer. |
boolean |
renderUpdate(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId)
This method ends up calling renderUpdateBaseImpl(rc, update, targetId, fullReplace)
method with fullReplace as true. |
protected void |
renderUpdateAddChildren(RenderContext rc,
ServerComponentUpdate update)
Renders child components which were added to a AbstractEchoPointPeer, as described in the provided
ServerComponentUpdate. |
protected boolean |
renderUpdateBaseImpl(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId,
boolean fullReplace)
If a full replace is to be done then this will remove itself from the parent and redraw everything otherwise it will replace just the changed children. |
protected void |
renderUpdateRemoveChildren(RenderContext rc,
ServerComponentUpdate update)
Renders removal operations for child components which were removed from a AbstractEchoPointPeer, as described in the provided
ServerComponentUpdate. |
protected RenderState |
retreiveRenderState(Component component)
This retreives some RenderState using the Component as 'weak' key. |
protected void |
storeRenderState(Component component,
RenderState renderState)
This stores some RenderState 'weakly' against a a Component and also updates the RenderingContext to point the new rendering state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String DEFAULT_CONTAINER_TAG
protected PartialUpdateManager partialUpdateManager
PartialUpdateManager available for subclass
peers to use to for partial update support
By default it has an AblePartialUpdater added to it to handle echopoint.able.* interfaces as well as a background and foreground color partial update support.
| Constructor Detail |
|---|
public AbstractEchoPointPeer()
AbstractEchoPointPeer
| Method Detail |
|---|
public java.lang.String getContainerId(Component child)
getContainerId in interface ComponentSynchronizePeerchild - a Component whose parent is of the type
synchronized by this peer object.
nextapp.echo2.webcontainer.SynchronizePeer#getContainerId(nextapp.echo2.app.Component)
public void renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
Remember to call super.renderDispose() if you overrride
this method.
renderDispose in interface ComponentSynchronizePeerrc - the relevant RenderContextupdate - the ServerComponentUpdate for which this
operation is being performednextapp.echo2.webcontainer.SynchronizePeer#renderDispose(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate,
nextapp.echo2.app.Component)
public void renderAdd(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId,
Component component)
renderAdd in interface ComponentSynchronizePeerrc - the relevant RenderContextupdate - the ServerComponentUpdate for which this
operation is being performedtargetId - the id of the HTML element in which the component's
HTML output should be renderedcomponent - the component to be rendered (this component must
be of a type supported by this synchronization peer).nextapp.echo2.webcontainer.SynchronizePeer#renderAdd(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, java.lang.String,
nextapp.echo2.app.Component)
public boolean renderUpdate(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId)
renderUpdateBaseImpl(rc, update, targetId, fullReplace)
method with fullReplace as true. In other words by default
it does coarse grain replacement of children.
renderUpdate in interface ComponentSynchronizePeerrc - the relevant RenderContextupdate - the ServerComponentUpdate for which this
operation is being performedtargetId - the id of the HTML element inside of which the
components HTML code should be rendered.
nextapp.echo2.webcontainer.SynchronizePeer#renderUpdate(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, java.lang.String)
protected boolean renderUpdateBaseImpl(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId,
boolean fullReplace)
nextapp.echo2.webcontainer.SynchronizePeer#renderUpdate(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, java.lang.String)
protected void renderUpdateAddChildren(RenderContext rc,
ServerComponentUpdate update)
AbstractEchoPointPeer, as described in the provided
ServerComponentUpdate.
rc - the relevant RenderContextupdate - the update
protected void renderUpdateRemoveChildren(RenderContext rc,
ServerComponentUpdate update)
AbstractEchoPointPeer, as described in the provided
ServerComponentUpdate.
rc - the relevant RenderContextupdate - the update
protected org.w3c.dom.Element renderReplaceableChild(RenderContext rc,
ServerComponentUpdate update,
org.w3c.dom.Node parentNode,
Component child)
AbstractEchoPointPeer. It is deemed replaceable in the
sense it gets enveloped in a tag container and hence can be DOM replaced
directly via the Echo2 framework.
Each child in an HTML element tag of DEFAULT_CONTAINER_TAG and then renders the child component into it.
rc - the relevant RenderContextupdate - the ServerComponentUpdate being performedparentNode - a document fragment to hold the new XHTMLchild - the child Component to be rendered
public void renderHtml(RenderContext rc,
ServerComponentUpdate update,
org.w3c.dom.Node parentNode,
Component component)
renderHtml in interface DomUpdateSupportrc - the relevant RenderContextupdate - the ServerComponentUpdate for which this
rendering is being performedparentNode - the parent DOM node to which this child should
add HTML codecomponent - the Component to be renderedDomUpdateSupport.renderHtml(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, org.w3c.dom.Node,
nextapp.echo2.app.Component)
public abstract void renderHtml(RenderingContext rc,
org.w3c.dom.Node parentNode,
Component component)
AbstractEchoPointPeer.
Its a simpler wrapper for the standard one but provides some neato setup services that would otherwise be repeated over and over again.
Note the use of RenderingContext object instead of the standard Echo RenderContext as this provides more rich code facilities.
rc - -
the RenderingContext to useparentNode - -
the parent Node to put content intocomponent - -
the component in questionnextapp.echo2.webcontainer.DomUpdateSupport#renderHtml(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, org.w3c.dom.Element,
nextapp.echo2.app.Component)
protected void storeRenderState(Component component,
RenderState renderState)
component - -
the component to use as a keyrenderState - -
the RenderState to storeprotected RenderState retreiveRenderState(Component component)
component - -
the component to use as a key
protected void disposeRenderState(Component component)
component - -
the component to dispose render state for
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||