|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.beans.beancontext.BeanContextChildSupport
public class BeanContextChildSupport
这是一个为实现 BeanContextChild 协议提供支持的一般支持类。 要为给定的组件实现此接口,可以直接为此类创建子类,也可以封装和委托此类。
BeanContext,
BeanContextServices,
BeanContextChild,
序列化表格| 字段摘要 | |
|---|---|
protected BeanContext |
beanContext
|
BeanContextChild |
beanContextChildPeer
在其中嵌套此 BeanContextChild 的 BeanContext。 |
protected PropertyChangeSupport |
pcSupport
与此 BeanContextChildSupport 相关联的 PropertyChangeSupport。 |
protected boolean |
rejectedSetBCOnce
一个标志,指示在试图执行 setBeanContext 操作时,至少已经抛出了一个 PropertyChangeVetoException。 |
protected VetoableChangeSupport |
vcSupport
与此 BeanContextChildSupport 相关联的 VetoableChangeSupport。 |
| 构造方法摘要 | |
|---|---|
BeanContextChildSupport()
构造一个 BeanContextChildSupport,其中已经为此类创建了子类以便实现 JavaBean 组件自身。 |
|
BeanContextChildSupport(BeanContextChild bcc)
构造一个 BeanContextChildSupport,其中 JavaBean 组件自身实现 BeanContextChild 并封装它,并将该接口委托给此实现 |
|
| 方法摘要 | |
|---|---|
void |
addPropertyChangeListener(String name,
PropertyChangeListener pcl)
为特定属性添加一个 PropertyChangeListener。 |
void |
addVetoableChangeListener(String name,
VetoableChangeListener vcl)
为特定属性添加一个 VetoableChangeListener。 |
void |
firePropertyChange(String name,
Object oldValue,
Object newValue)
向所有已注册的侦听器报告绑定 (bound) 属性更新。 |
void |
fireVetoableChange(String name,
Object oldValue,
Object newValue)
向所有已注册的侦听器报告 vetoable 属性更新。 |
BeanContext |
getBeanContext()
获得此 BeanContextChildSupport 的嵌套 BeanContext。 |
BeanContextChild |
getBeanContextChildPeer()
获得与此 BeanContextChildSupport 相关联的 BeanContextChild。 |
protected void |
initializeBeanContextResources()
子类可重写此方法来提供它们自己的初始化行为。 |
boolean |
isDelegated()
报告此类是否是另一个类的委托。 |
protected void |
releaseBeanContextResources()
子类可重写此方法来提供它们自己的释放行为。 |
void |
removePropertyChangeListener(String name,
PropertyChangeListener pcl)
为特定属性移除一个 PropertyChangeListener。 |
void |
removeVetoableChangeListener(String name,
VetoableChangeListener vcl)
移除一个 VetoableChangeListener。 |
void |
serviceAvailable(BeanContextServiceAvailableEvent bcsae)
可从嵌套 BeanContext 中获得新的服务。 |
void |
serviceRevoked(BeanContextServiceRevokedEvent bcsre)
由嵌套 BeanContext 提供的服务已经被取消。 |
void |
setBeanContext(BeanContext bc)
设置此 BeanContextChildSupport 的 BeanContext。 |
boolean |
validatePendingSetBeanContext(BeanContext newValue)
从 setBeanContext 调用,以验证(或相反)嵌套 BeanContext 属性值中的挂起更改。 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 字段详细信息 |
|---|
public BeanContextChild beanContextChildPeer
BeanContextChild 的 BeanContext。
protected PropertyChangeSupport pcSupport
protected VetoableChangeSupport vcSupport
protected transient BeanContext beanContext
protected transient boolean rejectedSetBCOnce
PropertyChangeVetoException。
| 构造方法详细信息 |
|---|
public BeanContextChildSupport()
public BeanContextChildSupport(BeanContextChild bcc)
| 方法详细信息 |
|---|
public void setBeanContext(BeanContext bc)
throws PropertyVetoException
BeanContextChildSupport 的 BeanContext。
BeanContextChild 中的 setBeanContextbc - 分配给 BeanContext 属性的新值
PropertyVetoException - 如果拒绝更改
PropertyVetoExceptionpublic BeanContext getBeanContext()
BeanContextChildSupport 的嵌套 BeanContext。
BeanContextChild 中的 getBeanContextBeanContextChildSupport 的嵌套 BeanContext。
public void addPropertyChangeListener(String name,
PropertyChangeListener pcl)
name 或 pcl 为 null,则不会抛出任何异常并且不执行任何操作。
BeanContextChild 中的 addPropertyChangeListenername - 要侦听的属性的名称pcl - 要添加的 PropertyChangeListener
public void removePropertyChangeListener(String name,
PropertyChangeListener pcl)
pcl 多次添加到指定属性的同一事件源,则在被移除之后,它获得的通知将减少一次。如果 name 为 null,则不会抛出任何异常并且不执行任何操作。如果 pcl 为 null,或者从不为指定属性添加 pcl,则不抛出任何异常并且不执行任何操作。
BeanContextChild 中的 removePropertyChangeListenername - 已被侦听的属性的名称pcl - 要移除的 PropertyChangeListener
public void addVetoableChangeListener(String name,
VetoableChangeListener vcl)
name 或 vcl 为 null,则不会抛出任何异常并且不执行任何操作。
BeanContextChild 中的 addVetoableChangeListenername - 要侦听的属性的名称vcl - 要添加的 VetoableChangeListener
public void removeVetoableChangeListener(String name,
VetoableChangeListener vcl)
VetoableChangeListener。如果将 pcl 多次添加到指定属性的同一事件源,则在被移除之后,它获得的通知将减少一次。如果 name 为 null,则不会抛出任何异常并且不执行任何操作。如果 vcl 为 null,或者从不为指定属性添加 pcl,则不抛出任何异常并且不执行任何操作。
BeanContextChild 中的 removeVetoableChangeListenername - 已被侦听的属性的名称vcl - 要移除的 VetoableChangeListenerpublic void serviceRevoked(BeanContextServiceRevokedEvent bcsre)
BeanContextServiceRevokedListener 中的 serviceRevokedbcsre - 由于取消服务而触发的 BeanContextServiceRevokedEventpublic void serviceAvailable(BeanContextServiceAvailableEvent bcsae)
BeanContextServicesListener 中的 serviceAvailablebcsae - 由于服务变得可用而触发的 BeanContextServiceAvailableEventpublic BeanContextChild getBeanContextChildPeer()
public boolean isDelegated()
public void firePropertyChange(String name,
Object oldValue,
Object newValue)
name - 已更改属性的编程名称oldValue - 属性的旧值newValue - 属性的新值
public void fireVetoableChange(String name,
Object oldValue,
Object newValue)
throws PropertyVetoException
如果新属性和旧属性相等并且是非 null 的,则不会触发事件。
name - 将更改属性的编程名称oldValue - 属性的旧值newValue - 属性的新值
PropertyVetoException - 如果接收方希望回滚属性更改。public boolean validatePendingSetBeanContext(BeanContext newValue)
newValue - 已为 BeanContext 属性请求的新值
trueprotected void releaseBeanContextResources()
protected void initializeBeanContextResources()
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。