|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echoservlet.AbstractComponentPeer
public abstract class AbstractComponentPeer
The base class from which all component peers are derived.
Field Summary |
---|
Fields inherited from interface nextapp.echoservlet.ComponentPeer |
---|
IGNORE_PROPERTY_CHANGE |
Constructor Summary | |
---|---|
AbstractComponentPeer()
Creates a new ComponentPeer . |
Method Summary | |
---|---|
void |
addAncillaryService(Service service)
Adds an ancillary service to this ComponentPeer . |
Id |
generateId()
|
Color |
getCalculatedBackground()
Returns the background color in which the component will be rendered. |
Font |
getCalculatedFont()
Returns the font in which the component will be rendered. |
Color |
getCalculatedForeground()
Returns the foreground 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. |
Component |
getComponent()
Returns the component that is handled by this peer. |
java.lang.String |
getFocusedElementId()
|
Id |
getId()
Returns the Id by which this peer is identified on the
client. |
InstancePeer |
getInstancePeer()
Returns the InstancePeer |
ComponentPeer |
getParentComponentPeer()
Returns the peer of the associated component's component. |
ComponentPeer |
getPeer(Component component)
Returns the peer of the specified component. |
void |
redraw()
Requests that the component be redrawn on the client. |
void |
registerAncillaryServices()
Registers all ancillary services used by this component peer with the application container's service registry. |
void |
registered()
Called when the component is registered. |
void |
removeAncillaryService(Service service)
Removes an ancillary service from this ComponentPeer . |
void |
render(RenderingContext rc,
Element parent)
A method that should be overridden for the ComponentPeer to produce HTML output. |
void |
setComponent(Component component)
Sets the component with which the peer will be associated. |
void |
setId(Id id)
Sets the Id of the component. |
void |
setInstancePeer(InstancePeer instancePeer)
Sets the instance (peer) with which the peer will be associated. |
void |
unregisterAncillaryServices()
Unregisters all ancillary services used by this component peer from the application container's service registry. |
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 |
Constructor Detail |
---|
public AbstractComponentPeer()
ComponentPeer
.
Method Detail |
---|
public void addAncillaryService(Service service)
ComponentPeer
ComponentPeer
.
Ancillary services will be registered for the life of the
ComponentPeer
and 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 the
ServiceRegistry
as required.
addAncillaryService
in interface ComponentPeer
service
- The ancillary service to be added.public Color getCalculatedBackground()
ComponentPeer
getCalculatedBackground
in interface ComponentPeer
public Id generateId()
generateId
in interface ComponentPeer
protected int getChildCount()
protected ComponentPeer[] getChildren()
public Component getComponent()
ComponentPeer
getComponent
in interface ComponentPeer
public java.lang.String getFocusedElementId()
getFocusedElementId
in interface ComponentPeer
public Font getCalculatedFont()
ComponentPeer
getCalculatedFont
in interface ComponentPeer
public Color getCalculatedForeground()
ComponentPeer
getCalculatedForeground
in interface ComponentPeer
public Id getId()
ComponentPeer
Id
by which this peer is identified on the
client.
getId
in interface ComponentPeer
Id
by which this peer is identified on the
client.public InstancePeer getInstancePeer()
ComponentPeer
InstancePeer with which this peer is associated.
If the peer is unregistered, null will be returned.
- Specified by:
getInstancePeer
in interface ComponentPeer
- Returns:
- The
InstancePeer with which this peer is associated.
public ComponentPeer getParentComponentPeer()
getParentComponentPeer
in interface ComponentPeer
public ComponentPeer getPeer(Component component)
getPeer
in interface ComponentPeer
component
- The component whose peer is to be returned.
public void redraw()
ComponentPeer
redraw
in interface ComponentPeer
public void registerAncillaryServices()
registerAncillaryServices
in interface ComponentPeer
public void registered()
registered
in interface ComponentPeer
public void removeAncillaryService(Service service)
ComponentPeer
ComponentPeer
.
Ancillary services will be registered for the life of the
ComponentPeer
and 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 the
removeAncillaryService
in interface ComponentPeer
service
- The ancillary service to be removed.public void render(RenderingContext rc, Element parent)
ComponentPeer
render
in interface ComponentPeer
rc
- A rendering context provided by the Connection
.parent
- The element that will contain content rendered by this
ComponentPeer
.public void setComponent(Component component)
ComponentPeerFactory
object.
setComponent
in interface ComponentPeer
component
- The Component
that this peer represents.public void setId(Id id)
Id
of the component. This method is only called
once, by the ComponentPeerFactory
.
setId
in interface ComponentPeer
id
- The Id
of the peer.public void setInstancePeer(InstancePeer instancePeer)
setInstancePeer
in interface ComponentPeer
instancePeer
- The InstancePeer
with which this
ComponentPeer
will be associated.public void unregisterAncillaryServices()
unregisterAncillaryServices
in interface ComponentPeer
public void unregistered()
unregistered
in interface ComponentPeer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |