|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectechopointng.ui.syncpeer.AbstractEchoPointPeer
echopointng.ui.syncpeer.ButtonExPeer
public class ButtonExPeer
ButtonExPeer is a peer for ButtonEx
| Field Summary | |
|---|---|
static Service |
BUTTON_SERVICE
Service to provide supporting JavaScript library. |
| Fields inherited from class echopointng.ui.syncpeer.AbstractEchoPointPeer |
|---|
DEFAULT_CONTAINER_TAG, partialUpdateManager |
| Fields inherited from interface nextapp.echo2.webcontainer.ActionProcessor |
|---|
ACTION_NAME, ACTION_VALUE |
| Constructor Summary | |
|---|---|
ButtonExPeer()
|
|
| Method Summary | |
|---|---|
protected int |
convertIconTextPositionToOrientation(Alignment alignment,
Component component)
|
java.lang.String |
getContainerId(Component child)
Returns an identifier in the form "parentId_contains_childId". |
protected org.w3c.dom.Element |
getTopLevelButtonElement(RenderingContext rc,
ButtonEx button,
Style fallbackStyle)
Called to return the top level Element to be used around the rendered ButtonEx |
void |
processAction(ContainerInstance ci,
Component component,
org.w3c.dom.Element actionElement)
Notifies the ComponentSynchronizePeer that a client action
has occurred. |
protected void |
renderButtonContent(RenderingContext rc,
org.w3c.dom.Element buttonContainerElement,
ButtonEx button,
Style fallbackStyle)
Renders the content of the button, i.e., its text, icon, and/or state icon. |
protected void |
renderCellIcon(TriCellTable tct,
org.w3c.dom.Element iconElement,
int cellIndex,
Style fallbackStyle)
Renders the content of the TriCellTable cell which
contains the button's icon. |
protected void |
renderCellText(RenderingContext rc,
TriCellTable tct,
org.w3c.dom.Text textNode,
ButtonEx button,
Style fallbackStyle)
Renders the content of the TriCellTable cell which
contains the button's text. |
void |
renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
Removes any render state that is associated with the component. |
protected void |
renderEventSupport(RenderingContext rc,
ButtonEx button,
boolean addRolloverListener)
Called to add the event support to the ButtonEx. |
void |
renderHtml(RenderingContext rc,
org.w3c.dom.Node parent,
Component component)
This is the rendering method you must implement if you are to use AbstractEchoPointPeer. |
protected boolean |
renderRolloverStyleSupport(RenderingContext rc,
ButtonEx button,
Style fallbackStyle)
Called to render the rollover style support required for this ButtonEx. |
protected CssStyle |
renderTopLevelStyleSupport(RenderingContext rc,
ButtonEx button,
Style fallbackStyle)
Called to render the CssStyle for the top level ButtonEx element |
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. |
| Methods inherited from class echopointng.ui.syncpeer.AbstractEchoPointPeer |
|---|
disposeRenderState, renderAdd, renderHtml, renderReplaceableChild, renderUpdateAddChildren, renderUpdateBaseImpl, renderUpdateRemoveChildren, retreiveRenderState, storeRenderState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Service BUTTON_SERVICE
| Constructor Detail |
|---|
public ButtonExPeer()
| Method Detail |
|---|
public java.lang.String getContainerId(Component child)
AbstractEchoPointPeer
getContainerId in interface ComponentSynchronizePeergetContainerId in class AbstractEchoPointPeerchild - a Component whose parent is of the type
synchronized by this peer object.
nextapp.echo2.webcontainer.SynchronizePeer#getContainerId(nextapp.echo2.app.Component)
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(nextapp.echo2.webcontainer.ContainerInstance,
nextapp.echo2.app.Component, org.w3c.dom.Element)
public void renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
AbstractEchoPointPeer
Remember to call super.renderDispose() if you overrride
this method.
renderDispose in interface ComponentSynchronizePeerrenderDispose in class AbstractEchoPointPeerrc - 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 boolean renderUpdate(RenderContext rc,
ServerComponentUpdate update,
java.lang.String targetId)
AbstractEchoPointPeerrenderUpdateBaseImpl(rc, update, targetId, fullReplace)
method with fullReplace as true. In other words by default
it does coarse grain replacement of children.
renderUpdate in interface ComponentSynchronizePeerrenderUpdate in class AbstractEchoPointPeerrc - 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.
AbstractEchoPointPeer.renderUpdate(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, java.lang.String)
public void renderHtml(RenderingContext rc,
org.w3c.dom.Node parent,
Component component)
AbstractEchoPointPeerAbstractEchoPointPeer.
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.
renderHtml in class AbstractEchoPointPeerrc - -
the RenderingContext to useparent - -
the parent Node to put content intocomponent - -
the component in questionAbstractEchoPointPeer.renderHtml(echopointng.ui.util.RenderingContext,
Node, nextapp.echo2.app.Component)
protected org.w3c.dom.Element getTopLevelButtonElement(RenderingContext rc,
ButtonEx button,
Style fallbackStyle)
protected CssStyle renderTopLevelStyleSupport(RenderingContext rc,
ButtonEx button,
Style fallbackStyle)
protected boolean renderRolloverStyleSupport(RenderingContext rc,
ButtonEx button,
Style fallbackStyle)
protected void renderEventSupport(RenderingContext rc,
ButtonEx button,
boolean addRolloverListener)
rc - -
the RenderingContext in placebutton - -
the current buttonaddRolloverListener - -
the result of the renderRolloverStyleSupport() method call
protected void renderButtonContent(RenderingContext rc,
org.w3c.dom.Element buttonContainerElement,
ButtonEx button,
Style fallbackStyle)
rc - the relevant RenderingContextbuttonContainerElement - the Element which will contain the contentbutton - the ButtonEx being rendered
protected void renderCellIcon(TriCellTable tct,
org.w3c.dom.Element iconElement,
int cellIndex,
Style fallbackStyle)
TriCellTable cell which
contains the button's icon.
tct - the TriCellTable to updatetextNode - the textcellIndex - the index of the cell in the TriCellTable that
should contain the icon
protected void renderCellText(RenderingContext rc,
TriCellTable tct,
org.w3c.dom.Text textNode,
ButtonEx button,
Style fallbackStyle)
TriCellTable cell which
contains the button's text. Text is always rendered in cell #0 of the
table.
tct - the TriCellTable to updatetextNode - the textbutton - the ButtonEx being rendered
protected int convertIconTextPositionToOrientation(Alignment alignment,
Component component)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||