|
|||||||||
| Home >> All >> nextapp >> [ echoservlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
nextapp.echoservlet
Class ComponentPeer

java.lang.Objectnextapp.echoservlet.ComponentPeer
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AbstractPaneUI, WindowUI
- public abstract class ComponentPeer
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
The base class from which all component peers are derived.
| Field Summary | |
private java.util.Set |
ancillaryServices
A container of this peers ancillary services. |
private nextapp.echo.Component |
component
The Component that this peer represents. |
private Id |
id
The Id of the component peer. |
private InstancePeer |
instancePeer
The InstancePeer of the application. |
| Constructor Summary | |
ComponentPeer()
Creates a new ComponentPeer. |
|
| Method Summary | |
void |
addAncillaryService(Service service)
Adds an ancillary service to this ComponentPeer. |
Id |
generateId()
|
private java.lang.String |
getAncillaryServiceAlias()
Returns a unique identifier for an ancillary service. |
nextapp.echo.Color |
getBackground()
Returns the background color in which the component will be rendered. |
protected int |
getChildCount()
Returns the number of visible child components contained in this component. |
protected ComponentPeer[] |
getChildren()
Returns the peers for all of the referenced component's visible children. |
nextapp.echo.Component |
getComponent()
Returns the component that is handled by this peer. |
java.lang.String |
getFocusedElementId()
|
nextapp.echo.Font |
getFont()
Returns the font in which the component will be rendered. |
nextapp.echo.Color |
getForeground()
Returns the foreground color in which the component will be rendered. |
Id |
getId()
Returns the Id by which this peer is identified on the
client. |
InstancePeer |
getInstancePeer()
Returns the InstancePeer |
protected ComponentPeer |
getParent()
Returns the peer of the associated component's component. |
protected ComponentPeer |
getPeer(nextapp.echo.Component component)
Returns the peer of the specified component. |
int |
getTabIndex()
Returns the tab index of the component, recursively querying parent components for the information if the tab index of a component is not set. |
void |
redraw()
Requests that the component be redrawn on the client. |
(package private) void |
registerAncillaryServices()
Registers all ancillary services used by this component peer with the application container's service registry. |
protected void |
registered()
Called when the component is registered. |
void |
removeAncillaryService(Service service)
Removes an ancillary service from this ComponentPeer. |
void |
render(RenderingContext rc,
nextapp.echoservlet.html.Element parent)
A method that should be overridden for the ComponentPeer to produce HTML output. |
(package private) void |
setComponent(nextapp.echo.Component component)
Sets the component with which the peer will be associated. |
(package private) void |
setId(Id id)
Sets the Id of the component. |
(package private) void |
setInstancePeer(InstancePeer instancePeer)
Sets the instance (peer) with which the peer will be associated. |
(package private) void |
unregisterAncillaryServices()
Unregisters all ancillary services used by this component peer from the application container's service registry. |
protected void |
unregistered()
Called when the component is unregistered. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
id
private Id id
- The Id of the component peer.
component
private nextapp.echo.Component component
- The
Componentthat this peer represents.
instancePeer
private InstancePeer instancePeer
- The
InstancePeerof the application.
ancillaryServices
private java.util.Set ancillaryServices
- A container of this peers ancillary services.
| Constructor Detail |
ComponentPeer
public ComponentPeer()
- Creates a new
ComponentPeer.
| Method Detail |
addAncillaryService
public void addAncillaryService(Service service)
- Adds an ancillary service to this
ComponentPeer. Ancillary services will be registered for the life of theComponentPeerand automatically removed when it is unregistered. An ancillary service should be used by ONLY one peer, as the peer will register and unregister it from theServiceRegistryas required.
getAncillaryServiceAlias
private java.lang.String getAncillaryServiceAlias()
- Returns a unique identifier for an ancillary service.
getBackground
public nextapp.echo.Color getBackground()
- Returns the background color in which the component will be
rendered. The color will be determined by examining the represented
component and then its ancestors until a background color can be
determined.
generateId
public Id generateId()
getChildCount
protected int getChildCount()
- Returns the number of visible child components contained in
this component.
getChildren
protected ComponentPeer[] getChildren()
- Returns the peers for all of the referenced component's visible
children.
getComponent
public nextapp.echo.Component getComponent()
- Returns the component that is handled by this peer.
getFocusedElementId
public java.lang.String getFocusedElementId()
getFont
public nextapp.echo.Font getFont()
- Returns the font in which the component will be
rendered. The font will be determined by examining the represented
component and then its ancestors until a font can be
determined.
getForeground
public nextapp.echo.Color getForeground()
- Returns the foreground color in which the component will be
rendered. The color will be determined by examining the represented
component and then its ancestors until a foreground color can be
determined.
getId
public Id getId()
- Returns the
Idby which this peer is identified on the client.
getInstancePeer
public InstancePeer getInstancePeer()
- Returns the
InstancePeerwith which this peer is associated. If the peer is unregistered, null will be returned.
getParent
protected ComponentPeer getParent()
- Returns the peer of the associated component's component.
getPeer
protected ComponentPeer getPeer(nextapp.echo.Component component)
- Returns the peer of the specified component.
getTabIndex
public int getTabIndex()
- Returns the tab index of the component, recursively querying parent
components for the information if the tab index of a component is
not set.
redraw
public void redraw()
- Requests that the component be redrawn on the client.
registerAncillaryServices
void registerAncillaryServices()
- Registers all ancillary services used by this component peer
with the application container's service registry.
registered
protected void registered()
- Called when the component is registered.
This method should be overridden if necessary.
removeAncillaryService
public void removeAncillaryService(Service service)
- Removes an ancillary service from this
ComponentPeer. Ancillary services will be registered for the life of theComponentPeerand automatically removed when it is unregistered. An ancillary service should be used by ONLY one peer, as the peer will register and unregister it from theServiceRegistryas required.
render
public void render(RenderingContext rc, nextapp.echoservlet.html.Element parent)
- A method that should be overridden for the ComponentPeer to produce
HTML output.
setComponent
void setComponent(nextapp.echo.Component component)
- Sets the component with which the peer will be associated.
This method is only called once, by the
ComponentPeerFactoryobject.
setId
void setId(Id id)
- Sets the
Idof the component. This method is only called once, by theComponentPeerFactory.
setInstancePeer
void setInstancePeer(InstancePeer instancePeer)
- Sets the instance (peer) with which the peer will be associated.
unregisterAncillaryServices
void unregisterAncillaryServices()
- Unregisters all ancillary services used by this component peer
from the application container's service registry.
unregistered
protected void unregistered()
- Called when the component is unregistered.
This method should be overridden if necessary.
|
|||||||||
| Home >> All >> nextapp >> [ echoservlet overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
nextapp.echoservlet.ComponentPeer