モジュール java.desktop
パッケージ java.beans.beancontext

インタフェースBeanContextChild

  • 既知のすべてのサブインタフェース:
    BeanContext, BeanContextServices
    既知のすべての実装クラス:
    BeanContextChildSupport, BeanContextServicesSupport, BeanContextSupport


    public interface BeanContextChild

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

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

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

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

    導入されたバージョン:
    1.2
    関連項目:
    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)。
    • メソッドの詳細

      • setBeanContext

        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

        BeanContext getBeanContext​()
        このBeanContextChildに関連付けられているBeanContextを取得します。
        戻り値:
        このBeanContextChildに関連付けられているBeanContext
      • addPropertyChangeListener

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

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

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

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