|
|||||||||
| 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.AbstractEchoPointContainerPeer
echopointng.ui.syncpeer.MenuItemPeer
public class MenuItemPeer
MenuItemPeer is the peer for MenuItem
| Field Summary | |
|---|---|
static Service |
MENU_ITEM_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 | |
|---|---|
MenuItemPeer()
|
|
| Method Summary | |
|---|---|
protected int |
convertIconTextPositionToOrientation(Alignment alignment,
Component component)
Converts Alignment values into TriCellTable values |
protected void |
createMenuItemInitDirective(RenderingContext rc,
Component component,
Style fallbackStyle)
Renders a directive to the outgoing ServerMessage to
initialize the state of a MenuItem, performing tasks such as registering
event listeners on the client and creating the EPMI JS object. |
java.lang.String |
getContainerId(Component child)
Returns an identifier in the form "parentId_contains_childId". |
void |
processAction(ContainerInstance ci,
Component component,
org.w3c.dom.Element actionElement)
Notifies the ComponentSynchronizePeer that a client action
has occurred. |
org.w3c.dom.Element |
renderAsMenuItem(RenderingContext rc,
Component component)
This will render a MenuItem as, well a MenuItem. |
protected void |
renderCellIcon(TriCellTable tct,
org.w3c.dom.Element iconElement,
int cellIndex)
Renders the content of the TriCellTable cell which
contains the menuItem's icon. |
protected void |
renderCellText(RenderingContext rc,
TriCellTable tct,
org.w3c.dom.Text textNode,
Component component,
int cellIndex,
Style fallbackStyle)
Renders the content of the TriCellTable cell which
contains the menuItem's text. |
void |
renderDispose(RenderContext rc,
ServerComponentUpdate update,
Component component)
Removes any render state that is associated with the component. |
protected void |
renderDisposeDirective(ServerMessage serverMessage,
java.lang.String elementId)
Renders a directive to the outgoing ServerMessage to
dispose the state of a MenuItem, performing tasks such as deregistering
event listeners on the client and deleting its JS object. |
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. |
| Methods inherited from class echopointng.ui.syncpeer.AbstractEchoPointContainerPeer |
|---|
renderUpdate |
| 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 MENU_ITEM_SERVICE
| Constructor Detail |
|---|
public MenuItemPeer()
| Method Detail |
|---|
public java.lang.String getContainerId(Component child)
AbstractEchoPointContainerPeer
getContainerId in interface ComponentSynchronizePeergetContainerId in class AbstractEchoPointContainerPeerchild - 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 performedAbstractEchoPointPeer.renderDispose(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate,
nextapp.echo2.app.Component)
public void renderHtml(RenderingContext rc,
org.w3c.dom.Node parentNode,
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 useparentNode - -
the parent Node to put content intocomponent - -
the component in questionAbstractEchoPointPeer.renderHtml(echopointng.ui.util.RenderingContext,
Node, nextapp.echo2.app.Component)
public org.w3c.dom.Element renderAsMenuItem(RenderingContext rc,
Component component)
This returns the top level element that is rendered
protected void renderCellIcon(TriCellTable tct,
org.w3c.dom.Element iconElement,
int cellIndex)
TriCellTable cell which
contains the menuItem's icon.
protected void renderCellText(RenderingContext rc,
TriCellTable tct,
org.w3c.dom.Text textNode,
Component component,
int cellIndex,
Style fallbackStyle)
TriCellTable cell which
contains the menuItem's text. Text is always rendered in cell #0 of the
table.
protected int convertIconTextPositionToOrientation(Alignment alignment,
Component component)
protected void createMenuItemInitDirective(RenderingContext rc,
Component component,
Style fallbackStyle)
ServerMessage to
initialize the state of a MenuItem, performing tasks such as registering
event listeners on the client and creating the EPMI JS object.
protected void renderDisposeDirective(ServerMessage serverMessage,
java.lang.String elementId)
ServerMessage to
dispose the state of a MenuItem, performing tasks such as deregistering
event listeners on the client and deleting its JS object.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||