public interface BeanContextChild
BeanContext サブインタフェースに定義されているように、入れ子になって実行環境 (コンテキスト) の参照を取得することが必要な JavaBeans には、このインタフェースを実装する必要があります。
仕様に準拠して実装された BeanContext は、BeanContextChild オブジェクト追加の副作用として、このインタフェースの setBeanContext() メソッドを使って自身への参照を渡します。
BeanContextChild は、応答として PropertyVetoedException をスローすることによって、状態の変更を拒否することもあります。
持続性メカニズムが多種多様な状況にわたって BeanContextChild のインスタンスで正しく機能するために、このインタフェースを実装するクラスは、入れ子になっている BeanContext インスタンスへの参照、または指定されていない任意のメカニズムを介して BeanContext から取得されたほかのリソースを格納または表現する一部またはすべてのフィールドやインスタンス変数を、一時的なものとして定義する必要があります。
BeanContext, PropertyChangeEvent, PropertyChangeListener, PropertyVetoException, VetoableChangeListener| 修飾子と型 | メソッドと説明 |
|---|---|
void |
addPropertyChangeListener(String name, PropertyChangeListener pcl)
指定されたプロパティーが変更になるたびに
PropertyChangeEvent を受け取るために、PropertyChangeListener をこの BeanContextChild に追加します。 |
void |
addVetoableChangeListener(String name, VetoableChangeListener vcl)
指定されたプロパティーが変更になるたびにイベントを受け取るために、
VetoableChangeListener をこの BeanContextChild に追加します。 |
BeanContext |
getBeanContext()
この
BeanContextChild に関連付けられている BeanContext を取得します。 |
void |
removePropertyChangeListener(String name, PropertyChangeListener pcl)
PropertyChangeListener をこの BeanContextChild から削除して、指定されたプロパティーが変更になったときに PropertyChangeEvents を受け取らないようにします。 |
void |
removeVetoableChangeListener(String name, VetoableChangeListener vcl)
VetoableChangeListener をこの BeanContextChild から削除して、指定されたプロパティーが変更になったときにイベントを受け取らないようにします。 |
void |
setBeanContext(BeanContext bc)
このインタフェースを実装するオブジェクトです。次のパラメータを使って java.beans.PropertyChangeEvent をトリガーします。
propertyName "beanContext"、oldValue (以前入れ子になっていた
BeanContext インスタンス、または null)、newValue (現在入れ子になっている BeanContext インスタンス、または null)。 |
void setBeanContext(BeanContext bc) throws PropertyVetoException
このインタフェースを実装するオブジェクトです。次のパラメータを使って java.beans.PropertyChangeEvent をトリガーします。
propertyName "beanContext"、oldValue (以前入れ子になっていた BeanContext インスタンス、または null)、newValue (現在入れ子になっている BeanContext インスタンス、または null)。
この BeanContextChild は、対応する例外をスローすることにより、入れ子になっている BeanContext プロパティーの値の変更を拒否することがあります。
bc - この BeanContextChild に関連した BeanContext。PropertyVetoException - 指定された BeanContext の追加を拒否された場合。PropertyVetoExceptionBeanContext getBeanContext()
BeanContextChild に関連付けられている BeanContext を取得します。BeanContextChild に関連付けられている BeanContext。void addPropertyChangeListener(String name, PropertyChangeListener pcl)
PropertyChangeEvent を受け取るために、PropertyChangeListener をこの BeanContextChild に追加します。name - 待機しているプロパティーの名前pcl - 追加する PropertyChangeListenervoid removePropertyChangeListener(String name, PropertyChangeListener pcl)
PropertyChangeListener をこの BeanContextChild から削除して、指定されたプロパティーが変更になったときに PropertyChangeEvents を受け取らないようにします。name - 待機していたプロパティーの名前pcl - 削除する PropertyChangeListenervoid addVetoableChangeListener(String name, VetoableChangeListener vcl)
VetoableChangeListener をこの BeanContextChild に追加します。name - 待機しているプロパティーの名前vcl - 追加する VetoableChangeListenervoid removeVetoableChangeListener(String name, VetoableChangeListener vcl)
VetoableChangeListener をこの BeanContextChild から削除して、指定されたプロパティーが変更になったときにイベントを受け取らないようにします。name - 待機していたプロパティーの名前。vcl - 削除する VetoableChangeListener。 バグまたは機能を送信
詳細な API リファレンスおよび開発者ドキュメントについては、Java SE のドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright © 1993, 2013, Oracle and/or its affiliates. All rights reserved.