|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.karora.cooee.webcontainer.syncpeer.ActiveTextFieldPeer
public abstract class ActiveTextFieldPeer
Abstract base synchronization peer for the built-in
org.karora.cooee.informagen.app.ActiveTextField
| Field Summary | |
|---|---|
protected static Alignment |
DEFAULT_ICON_POSITION
|
protected static Alignment |
DEFAULT_MSG_POSITION
|
| Fields inherited from interface org.karora.cooee.webcontainer.ActionProcessor |
|---|
ACTION_NAME, ACTION_VALUE |
| Fields inherited from interface org.karora.cooee.webcontainer.PropertyUpdateProcessor |
|---|
PROPERTY_NAME, PROPERTY_VALUE |
| Constructor Summary | |
|---|---|
ActiveTextFieldPeer(java.lang.String messageProcessor)
Default constructor. |
|
| Method Summary | |
|---|---|
protected CssStyle |
createBaseCssStyle(RenderContext rc,
TextComponent textComponent)
Creates a base CssStyle for properties common to text
components. |
java.lang.String |
getContainerId(Component child)
Returns the id of the HTML element in which the specified component should be rendered. |
ImageReference |
getImage(Component component,
java.lang.String imageId)
Retrieves the image identified by the given imageId value
for the given Component. |
void |
processAction(ContainerInstance ci,
Component component,
org.w3c.dom.Element actionElement)
Notifies the ComponentSynchronizePeer that a client action
has occurred. |
void |
processPropertyUpdate(ContainerInstance ci,
Component component,
org.w3c.dom.Element propertyElement)
Notifies the ComponentSynchronizePeer that a client property
update has occurred. |
void |
renderAdd(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId,
Component component)
Renders a client update which adds an HTML representation of the provided component to the client DOM as a child of the HTML element identified by targetId. |
void |
renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
Renders a client update to dispose of resources/listeners created for the specified component on the client. |
protected void |
renderDisposeDirective(RenderContext rc,
Component component)
|
void |
renderHtml(RenderContext rc,
ServerComponentUpdate addUpdate,
org.w3c.dom.Node parentNode,
Component component)
|
protected org.w3c.dom.Element |
renderInitDirective(RenderContext rc,
ActiveTextField activeTextField)
Renders a directive to the outgoing ServerMessage to
initialize the state of a text component, performing tasks such as
registering event listeners on the client. |
void |
renderSetFocus(RenderContext rc,
Component component)
Renders a directive to set the client input focus to the specified component. |
boolean |
renderUpdate(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId)
Renders the specified ServerComponentUpdate by adding and
removing children and updating properties of the specified
component. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final Alignment DEFAULT_MSG_POSITION
protected static final Alignment DEFAULT_ICON_POSITION
| Constructor Detail |
|---|
public ActiveTextFieldPeer(java.lang.String messageProcessor)
| Method Detail |
|---|
public ImageReference getImage(Component component,
java.lang.String imageId)
ImageRenderSupportimageId value
for the given Component.
Note: A reference to any images to be rendered must be
maintained throughout the rendering process, due to the fact that the
image rendering subsystem creates a weak-keyed cache of images to be
rendered. This method therefore may not simply return a new,
otherwise-unreferenced image. In the event that this presents a problem,
the recommended workaround is to simply store such otherwise unreferenced
ImageReferences using a RenderState object.
getImage in interface ImageRenderSupportcomponent - the componentimageId - the id of the image
ImageRenderSupport.getImage(org.karora.cooee.app.Component,
java.lang.String)
public void processAction(ContainerInstance ci,
Component component,
org.w3c.dom.Element actionElement)
ActionProcessorComponentSynchronizePeer that a client action
has occurred.
processAction in interface ActionProcessorci - the relevant ContainerInstancecomponent - the target ComponentactionElement - the XML element describing the action
(the name and value of the action may be obtained
by querying the ACTION_NAME and
ACTION_VALUE attribute values.ActionProcessor.processAction(org.karora.cooee.webcontainer.ContainerInstance,
org.karora.cooee.app.Component, org.w3c.dom.Element)
public void processPropertyUpdate(ContainerInstance ci,
Component component,
org.w3c.dom.Element propertyElement)
PropertyUpdateProcessorComponentSynchronizePeer that a client property
update has occurred.
processPropertyUpdate in interface PropertyUpdateProcessorci - the relevant ContainerInstancecomponent - the target ComponentpropertyElement - the XML element describing the property update
(the name and value of the changed property may be obtained
by querying the PROPERTY_NAME and
PROPERTY_VALUE attribute values.PropertyUpdateProcessor.processPropertyUpdate(
org.karora.cooee.webcontainer.ContainerInstance,
org.karora.cooee.app.Component, org.w3c.dom.Element)
public void renderSetFocus(RenderContext rc,
Component component)
FocusSupport
renderSetFocus in interface FocusSupportrc - the relevant RenderContextcomponent - the Component to be focused.FocusSupport.renderSetFocus(org.karora.cooee.webcontainer.RenderContext,
org.karora.cooee.app.Component)public java.lang.String getContainerId(Component child)
ComponentSynchronizePeercomponent should be rendered. The specified
component must be an immediate child of
an instance of the class of component that this peer supports.
A child component's renderer may invoke this method to
determine where it should place its rendered content.
getContainerId in interface ComponentSynchronizePeerchild - a Component whose parent is of the type
synchronized by this peer object.
ComponentSynchronizePeer.getContainerId(org.karora.cooee.app.Component)
public void renderAdd(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId,
Component component)
ComponentSynchronizePeertargetId.
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).ComponentSynchronizePeer.renderAdd(org.karora.cooee.webcontainer.RenderContext,
org.karora.cooee.app.update.ServerComponentUpdate, java.lang.String,
org.karora.cooee.app.Component)
public void renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
ComponentSynchronizePeerrenderUpdate() method being invoked, and thus
implementations SHOULD NOT redundantly attempt
to remove the HTML in this method.
Implementations must handle the condition where the component to be
disposed is not present in the client DOM, as this method may be invoked
under such a condition.
renderDispose in interface ComponentSynchronizePeerrc - the relevant RenderContextupdate - the ServerComponentUpdate for which this
operation is being performed
protected void renderDisposeDirective(RenderContext rc,
Component component)
protected org.w3c.dom.Element renderInitDirective(RenderContext rc,
ActiveTextField activeTextField)
ServerMessage to
initialize the state of a text component, performing tasks such as
registering event listeners on the client.
rc - the relevant RenderContextintegerTextField - the LiveTextField
public boolean renderUpdate(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId)
ComponentSynchronizePeerServerComponentUpdate by adding and
removing children and updating properties of the specified
component.
If the component is not a container, the implementation only needs to
analyze the updated properties of the component. If the component is
a container, the implementation should additionally query
update for information about added children, removed
children, and children with updated LayoutData states.
The implementation is responsible for rendering added children by
obtaining their ComponentSynchronizePeers and invoking their
renderAdd() methods. Alternatively, if a child's
ComponentSynchronizePeer implements the
DomUpdateSupport interface, the implementation may invoke
the child peer's renderHtml() method instead.
This method should return true if, in the course of its rendering operation, it has re-rendered the entire component hierarchy beneath the parent component of the update. Returning true will ensure that updates to descendants are NOT rendered. The method should return false in all cases if the component is not a container.
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.
ComponentSynchronizePeer.renderUpdate(org.karora.cooee.webcontainer.RenderContext,
org.karora.cooee.app.update.ServerComponentUpdate, java.lang.String)
public void renderHtml(RenderContext rc,
ServerComponentUpdate addUpdate,
org.w3c.dom.Node parentNode,
Component component)
protected CssStyle createBaseCssStyle(RenderContext rc,
TextComponent textComponent)
CssStyle for properties common to text
components.
rc - the relevant RenderContexttextComponent - the text component
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||