JavaTM 2 Platform
Std. Ed. v1.3

java.beans.beancontext
インタフェース BeanContextChild

既知のサブインタフェースの一覧:
BeanContext, BeanContextServices
既知の実装クラスの一覧:
BeanContextChildSupport

public interface BeanContextChild

BeanContext サブインタフェースによって定義されるように、入れ子になって、実行環境 (コンテキスト) への参照を取得することが必要な JavaBeans には、このインタフェースを実装する必要があります。

仕様に準拠して実装された BeanContext は、BeanContextChild オブジェクト追加の副作用として、このインタフェースの setBeanContext() メソッドを使って自身への参照を渡します。

BeanContextChild は、応答として PropertyVetoedException をスローすることによって、状態の変更を拒否することもあります。

持続性機構が多種多様な状況にわたって BeanContextChild のインスタンスで正しく機能するために、このインタフェースを実装するクラスは、入れ子になっている BeanContext インスタンスへの参照、または指定されていない任意の機構を介して BeanContext から取得されたほかのリソースを格納または表現する一部またはすべてのフィールドやインスタンス変数を、一時的なものとして定義する必要があります。

導入されたバージョン:
1.2

メソッドの概要
 void addPropertyChangeListener(String name, PropertyChangeListener pcl)
          指定されたプロパティが変更になるたびに PropertyChangeEvent を受信するために、この BeanContextChildPropertyChangeListener を追加します。
 void addVetoableChangeListener(String name, VetoableChangeListener vcl)
          指定されたプロパティが変更になるたびにイベントを受信するために、この BeanContextChildVetoableChangeListener を追加します。
 BeanContext getBeanContext()
          この BeanContextChild に関連した BeanContext を取得します。
 void removePropertyChangeListener(String name, PropertyChangeListener pcl)
          この BeanContextChild から PropertyChangeListener を削除して、指定されたプロパティが変更になったときに PropertyChangeEvents を受け取らないようにします。
 void removeVetoableChangeListener(String name, VetoableChangeListener vcl)
          この BeanContextChild から VetoableChangeListener を削除して、指定されたプロパティが変更になったときにイベントを受け取らないようにします。
 void setBeanContext(BeanContext bc)
           このインタフェースを実装するオブジェクトです。
 

メソッドの詳細

setBeanContext

public void setBeanContext(BeanContext bc)
                    throws PropertyVetoException

このインタフェースを実装するオブジェクトです。次のパラメータを使って java.beans.PropertyChangeEvent をトリガーします。 propertyName "beanContext"、oldValue (以前に入れ子になっていた BeanContext インスタンス、または null)、newValue (現在入れ子になっている BeanContext インスタンス、または null)

この BeanContextChild は、対応する例外をスローすることにより、入れ子になっている BeanContext プロパティの値の変更を拒否することがあります。

パラメータ:
bc - この BeanContextChild に関連した BeanContext
例外:
PropertyVetoException - 指定された BeanContext の追加を拒否された場合

getBeanContext

public BeanContext getBeanContext()
この BeanContextChild に関連した BeanContext を取得します。
戻り値:
この BeanContextChild に関連した BeanContext

addPropertyChangeListener

public void addPropertyChangeListener(String name,
                                      PropertyChangeListener pcl)
指定されたプロパティが変更になるたびに PropertyChangeEvent を受信するために、この BeanContextChildPropertyChangeListener を追加します。
パラメータ:
name - 待機しているプロパティの名前
pcl - 追加する PropertyChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(String name,
                                         PropertyChangeListener pcl)
この BeanContextChild から PropertyChangeListener を削除して、指定されたプロパティが変更になったときに PropertyChangeEvents を受け取らないようにします。
パラメータ:
name - 待機していたプロパティの名前
pcl - 削除する PropertyChangeListener

addVetoableChangeListener

public void addVetoableChangeListener(String name,
                                      VetoableChangeListener vcl)
指定されたプロパティが変更になるたびにイベントを受信するために、この BeanContextChildVetoableChangeListener を追加します。
パラメータ:
name - 待機しているプロパティの名前
vcl - 追加する VetoableChangeListener

removeVetoableChangeListener

public void removeVetoableChangeListener(String name,
                                         VetoableChangeListener vcl)
この BeanContextChild から VetoableChangeListener を削除して、指定されたプロパティが変更になったときにイベントを受け取らないようにします。
パラメータ:
name - 待機していたプロパティの名前
vcl - 削除する VetoableChangeListener

JavaTM 2 Platform
Std. Ed. v1.3

バグや機能要求の報告
さらに詳しい API リファレンスおよび開発者ドキュメントについては、 Java 2 SDK SE Developer Documentation を参照してください。このドキュメントには、概念、用語の定義、回避策、 実用的なコード例など、開発者を対象にした詳細な解説が掲載されています。

Java、Java 2D、JDBC は、米国およびその他の国における米国 Sun Microsystems, Inc. の商標もしくは登録商標です。
Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.