|
JavaTM 2 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 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。