- java.lang.Object
-
- java.beans.beancontext.BeanContextChildSupport
-
- java.beans.beancontext.BeanContextSupport
-
- すべての実装されたインタフェース:
BeanContext,BeanContextChild,BeanContextServiceRevokedListener,BeanContextServicesListener,DesignMode,PropertyChangeListener,VetoableChangeListener,Visibility,Serializable,Iterable,Collection,EventListener
- 直系の既知のサブクラス:
BeanContextServicesSupport
public class BeanContextSupport extends BeanContextChildSupport implements BeanContext, Serializable, PropertyChangeListener, VetoableChangeListener
このヘルパー・クラスは、java.beans.beancontext.BeanContextインタフェースのユーティリティの実装を提供します。このクラスは、BeanContextインタフェースを直接実装するため、この実装をサブクラス化することによって、あるいはほかのインスタンスからこのクラスのインスタンスの特別な委譲を介すことによって使用されることを目的としています。
- 導入されたバージョン:
- 1.2
- 関連項目:
- 直列化された形式
-
-
ネストされたクラスのサマリー
ネストされたクラス 修飾子と型 クラス 説明 protected classBeanContextSupport.BCSChildprotected static classBeanContextSupport.BCSIteratorprotected finalサブクラス。イテレータをカプセル化しますが、何も行わないremove()メソッドを実装します。
-
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected ArrayList<BeanContextMembershipListener>bcmListenersprotected ArrayList bcmListenersフィールドへのすべてのアクセスは、そのオブジェクトで同期されます。protected HashMap<Object,BeanContextSupport.BCSChild>childrenprotected HashMap childrenフィールドへのすべてのアクセスは、そのオブジェクトで同期されます。protected booleandesignTimeこのオブジェクトが現在、設計時モードであるかどうかを示すboolean。protected LocalelocaleBeanContextの現在のロケールです。protected booleanokToUseGuiこのインスタンスがGUIを描画できるかどうかを示すboolean。-
クラス java.beans.beancontext.BeanContextChildSupportで宣言されたフィールド
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
-
インタフェース java.beans.beancontext.BeanContextで宣言されたフィールド
globalHierarchyLock
-
インタフェース java.beans.DesignModeで宣言されたフィールド
PROPERTYNAME
-
-
コンストラクタのサマリー
コンストラクタ コンストラクタ 説明 BeanContextSupport()ほかのオブジェクトの委譲でないインスタンスを生成します。BeanContextSupport(BeanContext peer)デフォルトのロケールを使ってインスタンスを生成します。BeanContextSupport(BeanContext peer, Locale lcle)指定されたロケールを使ってインスタンスを生成します。BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)指定されたロケールを使って設計モードでインスタンスを生成します。BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)BeanContextSupportのインスタンスを生成します。
-
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンス・メソッド 具象メソッド 修飾子と型 メソッド 説明 booleanadd(Object targetChild)このBeanContext内に子を追加、すなわち入れ子にします。booleanaddAll(Collection c)ChildrenのセットにCollectionを追加します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。voidaddBeanContextMembershipListener(BeanContextMembershipListener bcml)BeanContextMembershipListenerを追加します。booleanavoidingGui()BeanContextの子がGUIの使用を避けているかどうかを判断するために使われます。protected Iterator<BeanContextSupport.BCSChild>bcsChildren()このBeanContextのすべての子のイテレータを返します。protected voidbcsPreDeserializationHook(ObjectInputStream ois)defaultReadObject()のあと、子を直列化する前のreadObjectによって呼び出されます。protected voidbcsPreSerializationHook(ObjectOutputStream oos)defaultWriteObject()のあと、子を直列化する前のwriteObjectによって呼び出されます。protected voidchildDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)新しく直列化復元された子およびBCSChildを使ってreadObjectによって呼び出されます。protected voidchildJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)サブクラスはこのメソッドをオーバーライドして、子が追加されて、イベント通知が発生する前に、簡単にadd()セマンティックスを拡張できます。protected voidchildJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)サブクラスはこのメソッドをオーバーライドして、子が削除されて、イベント通知が発生する前に、簡単にremove()セマンティックスを拡張できます。protected static booleanclassEquals(Class<?> first, Class<?> second)2つのクラス・オブジェクトまたはそれらの名前が同じかどうかを判定します。voidclear()子をクリアします(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。booleancontains(Object o)指定されたオブジェクトが現在このBeanContextの子であるかどうかを判定します。booleancontainsAll(Collection c)指定されたCollection内のすべての子がこのBeanContextの子であるかどうかを調べます。booleancontainsKey(Object o)指定されたオブジェクトが現在このBeanContextの子であるかどうかを判定します。protected Object[]copyChildren()このBeanContextの子のコピーを取得します。protected BeanContextSupport.BCSChildcreateBCSChild(Object targetChild, Object peer)サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加するadd()メソッドやほかのCollectionメソッドをオーバーライドすることなく、Childの独自のサブクラスを挿入することができます。protected voiddeserialize(ObjectInputStream ois, Collection coll)コレクションを直列化復元するためにreadObjectによって使用されます。voiddontUseGui()このインスタンスにGUIを描画できないことを通知します。protected voidfireChildrenAdded(BeanContextMembershipEvent bcme)BeanContextMembershipListenerインタフェースのBeanContextshipEventをトリガーします。protected voidfireChildrenRemoved(BeanContextMembershipEvent bcme)BeanContextMembershipListenerインタフェースのBeanContextshipEventをトリガーします。BeanContextgetBeanContextPeer()このオブジェクトが実装を提供しているBeanContextのインスタンスを取得します。protected static BeanContextChildgetChildBeanContextChild(Object child)指定された子のBeanContextChild (存在する場合)を取得します。protected static BeanContextMembershipListenergetChildBeanContextMembershipListener(Object child)指定された子のBeanContextMembershipListener (存在する場合)を取得します。protected static PropertyChangeListenergetChildPropertyChangeListener(Object child)指定された子のPropertyChangeListener (存在する場合)を取得します。protected static SerializablegetChildSerializable(Object child)指定されたChildに関連したSerializable (存在する場合)を取得します。protected static VetoableChangeListenergetChildVetoableChangeListener(Object child)指定された子のVetoableChangeListener (存在する場合)を取得します。protected static VisibilitygetChildVisibility(Object child)指定された子に関連したComponent (存在する場合)を取得します。LocalegetLocale()このBeanContextのロケールを取得します。URLgetResource(String name, BeanContextChild bcc)java.lang.ClassLoader.getResource()と同じように、このメソッドによってBeanContext実装で子のComponentとベースとなるClassLoaderの間に動作を挿入できます。InputStreamgetResourceAsStream(String name, BeanContextChild bcc)java.lang.ClassLoader.getResourceAsStream()と同じように、このメソッドによってBeanContext実装で子のComponentとベースとなるClassLoaderの間に動作を挿入できます。protected voidinitialize()BeanContextSupportインスタンスの過渡状態を初期化するために、コンストラクタおよびreadObjectから呼び出されるprotectedメソッドです。ObjectinstantiateChild(String beanName)instantiateChildメソッドは、Beanを入れ子にしてBeanContextにインスタンスを生成するタスクを単純化するBeanContextの簡易フックです。booleanisDesignTime()このオブジェクトが現在、設計時モードかどうかを報告します。booleanisEmpty()このBeanContextが空かどうかを報告します。booleanisSerializing()このBeanContextは直列化の処理中ですか。Iterator<Object>iterator()このBeanContext内で現在入れ子になっているJavaBeanまたはBeanContextのインスタンスをすべて取得します。booleanneedsGui()通常、このメソッドは実装側がGUIを必要としているかどうかを判断するために、環境から呼び出されます。voidokToUseGui()このインスタンスにGUIを描画できることを通知します。voidpropertyChange(PropertyChangeEvent pce)サブクラスは、子のプロパティの変更を監視するために包括することがあります。voidreadChildren(ObjectInputStream ois)このクラスのインスタンスがBeanContextプロトコル(およびそのサブプロトコル)の実装の委譲として使用されるときには、直列化復元の際に「鶏が先か卵が先か」の問題が起こります。booleanremove(Object targetChild)このBeanContextから子を削除します。protected booleanremove(Object targetChild, boolean callChildSetBC)予期しないsetBeanContextあるいはremove()呼出しで削除が行われる場合に使用される内部削除。booleanremoveAll(Collection c)指定されたすべての子を削除します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。voidremoveBeanContextMembershipListener(BeanContextMembershipListener bcml)BeanContextMembershipListenerを削除します。booleanretainAll(Collection c)指定された子だけを保持します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。protected voidserialize(ObjectOutputStream oos, Collection<?> coll)コレクションを直列化するためにwriteObjectによって使用されます。voidsetDesignTime(boolean dTime)このBeanContext用に新しい設計時値を設定します。voidsetLocale(Locale newLocale)このBeanContextのロケールを設定します。intsize()このBeanContextで入れ子になった現在の子の個数を取得します。Object[]toArray()このBeanContext内で現在入れ子になっているJavaBeanまたはBeanContextのインスタンスをすべて取得します。Object[]toArray(Object[] arry)arryに含まれる型と一致する、このBeanContextのすべての子を含む配列を取得します。protected booleanvalidatePendingAdd(Object targetChild)このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextに追加される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。protected booleanvalidatePendingRemove(Object targetChild)このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextから削除される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。voidvetoableChange(PropertyChangeEvent pce)サブクラスは、子の拒否プロパティの変更を監視するために包括することがあります。voidwriteChildren(ObjectOutputStream oos)このBeanContextのすべての子を直列化するために使用されます。-
クラス java.beans.beancontext.BeanContextChildSupportで宣言されたメソッド
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
-
クラス java.lang.Objectで宣言されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
インタフェース java.beans.beancontext.BeanContextChildで宣言されたメソッド
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
-
インタフェース java.util.Collectionで宣言されたメソッド
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
フィールドの詳細
-
children
protected transient HashMap<Object,BeanContextSupport.BCSChild> children
protected HashMap childrenフィールドへのすべてのアクセスは、そのオブジェクトで同期されます。
-
bcmListeners
protected transient ArrayList<BeanContextMembershipListener> bcmListeners
protected ArrayList bcmListenersフィールドへのすべてのアクセスは、そのオブジェクトで同期されます。
-
locale
protected Locale locale
BeanContextの現在のロケールです。
-
okToUseGui
protected boolean okToUseGui
このインスタンスがGUIを描画できるかどうかを示すboolean。
-
designTime
protected boolean designTime
このオブジェクトが現在、設計時モードであるかどうかを示すboolean。
-
-
コンストラクタの詳細
-
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
BeanContextSupportのインスタンスを生成します。- パラメータ:
peer- 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnulllcle- このBeanContextの現在のロケール。lcleがnullの場合は、デフォルトのロケールがBeanContextインスタンスに割り当てられます。dTime- 初期状態、設計モードの場合はtrue、実行時の場合はfalse。visible- 初期状態での可視性。- 関連項目:
Locale.getDefault(),Locale.setDefault(java.util.Locale)
-
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
指定されたロケールを使って設計モードでインスタンスを生成します。- パラメータ:
peer- 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnulllcle- このBeanContextの現在のロケール。lcleがnullの場合は、デフォルトのロケールがBeanContextインスタンスに割り当てられます。dtime- 初期状態、設計モードの場合はtrue、実行時の場合はfalse。- 関連項目:
Locale.getDefault(),Locale.setDefault(java.util.Locale)
-
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle)
指定されたロケールを使ってインスタンスを生成します。- パラメータ:
peer- 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnulllcle- このBeanContextの現在のロケール。lcleがnullの場合は、デフォルトのロケールがBeanContextインスタンスに割り当てられます。- 関連項目:
Locale.getDefault(),Locale.setDefault(java.util.Locale)
-
BeanContextSupport
public BeanContextSupport(BeanContext peer)
デフォルトのロケールを使ってインスタンスを生成します。- パラメータ:
peer- 実装の提供先となるピアBeanContext、このオブジェクトが自身のピアである場合はnull
-
BeanContextSupport
public BeanContextSupport()
ほかのオブジェクトの委譲でないインスタンスを生成します。
-
-
メソッドの詳細
-
getBeanContextPeer
public BeanContext getBeanContextPeer()
このオブジェクトが実装を提供しているBeanContextのインスタンスを取得します。- 戻り値:
- BeanContextインスタンス
-
instantiateChild
public Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
instantiateChildメソッドは、Beanを入れ子にして
BeanContextにインスタンスを生成するタスクを単純化するBeanContextの簡易フックです。beanNameパラメータのセマンティックスは、java.beans.Beans.instantiateによって定義されます。
- 定義:
instantiateChild、インタフェースBeanContext- パラメータ:
beanName- このBeanContext内でインスタンスを生成するBeanの名前- 戻り値:
- 新規オブジェクト
- 例外:
IOException- Beanの直列化復元中に入出力エラーが発生した場合ClassNotFoundException- beanNameパラメータによって識別されたクラスが見つからない場合
-
size
public int size()
このBeanContextで入れ子になった現在の子の個数を取得します。- 定義:
size、インタフェースCollection- 戻り値:
- 子の数
-
isEmpty
public boolean isEmpty()
このBeanContextが空かどうかを報告します。 入れ子になった子がない場合、BeanContextは空とみなされます。- 定義:
isEmpty、インタフェースCollection- 戻り値:
- 子がないかどうか
-
contains
public boolean contains(Object o)
指定されたオブジェクトが現在このBeanContextの子であるかどうかを判定します。- 定義:
contains、インタフェースCollection- パラメータ:
o- 該当するオブジェクト- 戻り値:
- このオブジェクトが子の場合
-
containsKey
public boolean containsKey(Object o)
指定されたオブジェクトが現在このBeanContextの子であるかどうかを判定します。- パラメータ:
o- 該当するオブジェクト- 戻り値:
- このオブジェクトが子の場合
-
iterator
public Iterator<Object> iterator()
このBeanContext内で現在入れ子になっているJavaBeanまたはBeanContextのインスタンスをすべて取得します。- 定義:
iterator、インタフェースCollection- 定義:
iterator、インタフェースIterable- 戻り値:
- 入れ子になった子の
Iterator
-
toArray
public Object[] toArray()
このBeanContext内で現在入れ子になっているJavaBeanまたはBeanContextのインスタンスをすべて取得します。- 定義:
toArray、インタフェースCollection- 戻り値:
- 「ランタイム・コンポーネント・タイプ」が
Objectの配列。このコレクションのすべての要素を含む
-
toArray
public Object[] toArray(Object[] arry)
arryに含まれる型と一致する、このBeanContextのすべての子を含む配列を取得します。- 定義:
toArray、インタフェースCollection- パラメータ:
arry- 対象となるオブジェクト型の配列。- 戻り値:
- 子の配列
-
createBCSChild
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
サブクラスはこのメソッドをオーバーライドすることにより、セットに子を追加するadd()メソッドやほかのCollectionメソッドをオーバーライドすることなく、Childの独自のサブクラスを挿入することができます。
- パラメータ:
targetChild- 代わりにChildを作成する子peer- tragetChildとピアがBeanContextProxyの実装によって関連付けられている場合は、ピア- 戻り値:
- コレクション・メソッドをオーバーライドしない、子のサブ型固有のサブクラス
-
add
public boolean add(Object targetChild)
このBeanContext内に子を追加、すなわち入れ子にします。java.beans.Beans.instantiate()の副作用として呼び出されます。 子オブジェクトを追加する処理が正当でない場合、このメソッドはIllegalStateExceptionをスローします。
- 定義:
add、インタフェースCollection- パラメータ:
targetChild- このBeanContext内で入れ子になる子オブジェクト- 戻り値:
- 子の追加が成功した場合はtrue。
- 関連項目:
validatePendingAdd(java.lang.Object)
-
remove
public boolean remove(Object targetChild)
このBeanContextから子を削除します。 子オブジェクトを追加する処理が正当でない場合、このメソッドはIllegalStateExceptionをスローします。- 定義:
remove、インタフェースCollection- パラメータ:
targetChild- 削除される子オブジェクト- 戻り値:
- この呼出しの結果として要素が削除された場合は
true - 関連項目:
validatePendingRemove(java.lang.Object)
-
remove
protected boolean remove(Object targetChild, boolean callChildSetBC)
予期しないsetBeanContextあるいはremove()呼出しで削除が行われる場合に使用される内部削除。- パラメータ:
targetChild- 削除されるJavaBean、BeanContext、またはObjectcallChildSetBC- 子がこのBeanContextの入れ子でなくなったことを通知するべきであると示すために使用される。- 戻り値:
- 削除する前に存在したかどうか
-
containsAll
public boolean containsAll(Collection c)
指定されたCollection内のすべての子がこのBeanContextの子であるかどうかを調べます。- 定義:
containsAll、インタフェースCollection- パラメータ:
c- 指定されているCollection- 戻り値:
- コレクションのすべてのオブジェクトが、このBeanContextの子の場合は
true、そうでない場合はfalse。 - 関連項目:
Collection.contains(Object)
-
addAll
public boolean addAll(Collection c)
ChildrenのセットにCollectionを追加します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
addAll、インタフェースCollection- パラメータ:
c- このコレクションに追加される要素を含むコレクション- 戻り値:
- この実装では、無条件に
UnsupportedOperationExceptionがスローされます - 例外:
UnsupportedOperationException- この実装によって無条件にスローされる- 関連項目:
Collection.add(Object)
-
removeAll
public boolean removeAll(Collection c)
指定されたすべての子を削除します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
removeAll、インタフェースCollection- パラメータ:
c- このコレクションから削除される要素を含むコレクション- 戻り値:
- この実装では、無条件に
UnsupportedOperationExceptionがスローされます - 例外:
UnsupportedOperationException- この実装によって無条件にスローされる- 関連項目:
Collection.remove(Object),Collection.contains(Object)
-
retainAll
public boolean retainAll(Collection c)
指定された子だけを保持します(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
retainAll、インタフェースCollection- パラメータ:
c- このコレクションで保持される要素を含むコレクション- 戻り値:
- この実装では、無条件に
UnsupportedOperationExceptionがスローされます - 例外:
UnsupportedOperationException- この実装によって無条件にスローされる- 関連項目:
Collection.remove(Object),Collection.contains(Object)
-
clear
public void clear()
子をクリアします(サポートされていない)。実装では、階層のロックおよび「子」のprotectedフィールドについて同期をとる必要があります。- 定義:
clear、インタフェースCollection- 例外:
UnsupportedOperationException- この実装によって無条件にスローされる
-
addBeanContextMembershipListener
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
BeanContextMembershipListenerを追加します。- 定義:
addBeanContextMembershipListener、インタフェースBeanContext- パラメータ:
bcml- 追加されるBeanContextMembershipListener- 例外:
NullPointerException- 引数がnullの場合
-
removeBeanContextMembershipListener
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
BeanContextMembershipListenerを削除します。- 定義:
removeBeanContextMembershipListener、インタフェースBeanContext- パラメータ:
bcml- 削除するBeanContextMembershipListener- 例外:
NullPointerException- 引数がnullの場合
-
getResourceAsStream
public InputStream getResourceAsStream(String name, BeanContextChild bcc)
インタフェースからコピーされた説明:BeanContextjava.lang.ClassLoader.getResourceAsStream()と同じように、このメソッドによってBeanContext実装で子のComponentとベースとなるClassLoaderの間に動作を挿入できます。- 定義:
getResourceAsStream、インタフェースBeanContext- パラメータ:
name- リクエストされたリソースの名前。bcc- リクエストを行う子オブジェクト。- 戻り値:
- InputStreamとして要求されたリソース
- 例外:
NullPointerException- 引数がnullの場合
-
getResource
public URL getResource(String name, BeanContextChild bcc)
インタフェースからコピーされた説明:BeanContextjava.lang.ClassLoader.getResource()と同じように、このメソッドによってBeanContext実装で子のComponentとベースとなるClassLoaderの間に動作を挿入できます。- 定義:
getResource、インタフェースBeanContext- パラメータ:
name- リクエストされたリソースの名前。bcc- リクエストを行う子オブジェクト。- 戻り値:
- InputStreamとして要求されたリソース
-
setDesignTime
public void setDesignTime(boolean dTime)
このBeanContext用に新しい設計時値を設定します。- 定義:
setDesignTime、インタフェースDesignMode- パラメータ:
dTime- 新規designTime値- 関連項目:
BeanContext,BeanContextMembershipListener,PropertyChangeEvent
-
isDesignTime
public boolean isDesignTime()
このオブジェクトが現在、設計時モードかどうかを報告します。- 定義:
isDesignTime、インタフェースDesignMode- 戻り値:
- 設計時モードの場合は
true、それ以外の場合はfalse
-
setLocale
public void setLocale(Locale newLocale) throws PropertyVetoException
このBeanContextのロケールを設定します。- パラメータ:
newLocale- 新規ロケール。 newLocaleがnullの場合、このメソッド呼出しに効果はない。- 例外:
PropertyVetoException- 新規ロケールが拒否された場合
-
getLocale
public Locale getLocale()
このBeanContextのロケールを取得します。- 戻り値:
BeanContextの現在のLocale
-
needsGui
public boolean needsGui()
通常、このメソッドは実装側がGUIを必要としているかどうかを判断するために、環境から呼び出されます。
ここで使われているアルゴリズムはBeanContextPeerと、現在の子が自身をContainers、Componentsのどちらかを判断するのをテストします。Visibilityを実装している場合は、needsGui()== trueを返します。
- 定義:
needsGui、インタフェースVisibility- 戻り値:
- 実装側がGUIを必要とする場合は
true
-
dontUseGui
public void dontUseGui()
このインスタンスにGUIを描画できないことを通知します。- 定義:
dontUseGui、インタフェースVisibility
-
okToUseGui
public void okToUseGui()
このインスタンスにGUIを描画できることを通知します。- 定義:
okToUseGui、インタフェースVisibility
-
avoidingGui
public boolean avoidingGui()
BeanContextの子がGUIの使用を避けているかどうかを判断するために使われます。- 定義:
avoidingGui、インタフェースVisibility- 戻り値:
- このインスタンスがGUIの使用を避けるか
- 関連項目:
Visibility
-
isSerializing
public boolean isSerializing()
このBeanContextは直列化の処理中ですか。- 戻り値:
- この
BeanContextが現在直列化されている場合
-
bcsChildren
protected Iterator<BeanContextSupport.BCSChild> bcsChildren()
このBeanContextのすべての子のイテレータを返します。- 戻り値:
- 現在のすべてのBCSChild値のイテレータ
-
bcsPreSerializationHook
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
defaultWriteObject()のあと、子を直列化する前のwriteObjectによって呼び出されます。 スーパー・クラスが子を直列化する前の状態をカスタム直列化するサブクラスを使って、このメソッドをオーバーライドできます。 しかし、このメソッドは、writeObject()(がある場合)の独自の実装を置換するサブクラスで使用することはできません。- パラメータ:
oos- 直列化中に使用するObjectOutputStream- 例外:
IOException- 直列化に失敗した場合
-
bcsPreDeserializationHook
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
defaultReadObject()のあと、子を直列化する前のreadObjectによって呼び出されます。 スーパー・クラスが子を直列化する前の状態をカスタム直列化復元するサブクラスを使って、このメソッドをオーバーライドできます。 しかし、このメソッドは、readObject()(がある場合)独自の実装を置換するために、サブクラスで使用することはできません。- パラメータ:
ois- 直列化復元中に使用するObjectInputStream- 例外:
IOException- 直列化復元が失敗した場合ClassNotFoundException- 必要なクラスが見つからない場合
-
childDeserializedHook
protected void childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
新しく直列化復元された子およびBCSChildを使ってreadObjectによって呼び出されます。- パラメータ:
child- 新たに直列化復元された子bcsc- 新たに直列化復元されたBCSChild
-
serialize
protected final void serialize(ObjectOutputStream oos, Collection<?> coll) throws IOException
コレクションを直列化するためにwriteObjectによって使用されます。- パラメータ:
oos- 直列化中に使用するObjectOutputStreamcoll- 直列化するCollection- 例外:
IOException- 直列化に失敗した場合
-
deserialize
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException
コレクションを直列化復元するためにreadObjectによって使用されます。- パラメータ:
ois- 使用するObjectInputStreamcoll- コレクション- 例外:
IOException- 直列化復元が失敗した場合ClassNotFoundException- 必要なクラスが見つからない場合
-
writeChildren
public final void writeChildren(ObjectOutputStream oos) throws IOException
このBeanContextのすべての子を直列化するために使用されます。- パラメータ:
oos- 直列化中に使用するObjectOutputStream- 例外:
IOException- 直列化に失敗した場合
-
readChildren
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException
このクラスのインスタンスがBeanContextプロトコル(およびそのサブプロトコル)の実装の委譲として使用されるときには、直列化復元の際に「鶏が先か卵が先か」の問題が起こります。- パラメータ:
ois- 使用するObjectInputStream- 例外:
IOException- 直列化復元が失敗した場合ClassNotFoundException- 必要なクラスが見つからない場合
-
vetoableChange
public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException
サブクラスは、子の拒否プロパティの変更を監視するために包括することがあります。- 定義:
vetoableChange、インタフェースVetoableChangeListener- パラメータ:
pce- イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。- 例外:
PropertyVetoException- 受け取り側がプロパティ変更をロールバックすることを望んでいる場合。
-
propertyChange
public void propertyChange(PropertyChangeEvent pce)
サブクラスは、子のプロパティの変更を監視するために包括することがあります。- 定義:
propertyChange、インタフェースPropertyChangeListener- パラメータ:
pce- イベント・ソースと変更されたプロパティを記述したPropertyChangeEventオブジェクト。
-
validatePendingAdd
protected boolean validatePendingAdd(Object targetChild)
このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextに追加される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。
- パラメータ:
targetChild- 代わりにChildを作成する子- 戻り値:
- 子がこのBeanContextに追加された場合はtrue、そうでない場合はfalse。
-
validatePendingRemove
protected boolean validatePendingRemove(Object targetChild)
このクラスのサブクラスはこのメソッドをオーバーライドまたは包括して、BeanContextから削除される直前に、BeanContextが子オブジェクトを調べるための検証動作を追加できます。
- パラメータ:
targetChild- 代わりにChildを作成する子- 戻り値:
- 子がこのBeanContextから削除される場合はtrue、そうでない場合はfalse。
-
childJustAddedHook
protected void childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
サブクラスはこのメソッドをオーバーライドして、子が追加されて、イベント通知が発生する前に、簡単にadd()セマンティックスを拡張できます。 このメソッドは同期化されている子を使って呼び出されます。- パラメータ:
child- 子bcsc- BCSChild
-
childJustRemovedHook
protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
サブクラスはこのメソッドをオーバーライドして、子が削除されて、イベント通知が発生する前に、簡単にremove()セマンティックスを拡張できます。 このメソッドは同期化されている子を使って呼び出されます。- パラメータ:
child- 子bcsc- BCSChild
-
getChildVisibility
protected static final Visibility getChildVisibility(Object child)
指定された子に関連したComponent (存在する場合)を取得します。- パラメータ:
child- 指定された子- 戻り値:
- 指定された子に関連したComponent (存在する場合)。
-
getChildSerializable
protected static final Serializable getChildSerializable(Object child)
指定されたChildに関連したSerializable (存在する場合)を取得します。- パラメータ:
child- 指定された子- 戻り値:
- 指定されたChildに関連したSerializable (存在する場合)
-
getChildPropertyChangeListener
protected static final PropertyChangeListener getChildPropertyChangeListener(Object child)
指定された子のPropertyChangeListener (存在する場合)を取得します。- パラメータ:
child- 指定された子- 戻り値:
- 指定された子のPropertyChangeListener (存在する場合)
-
getChildVetoableChangeListener
protected static final VetoableChangeListener getChildVetoableChangeListener(Object child)
指定された子のVetoableChangeListener (存在する場合)を取得します。- パラメータ:
child- 指定された子- 戻り値:
- 指定された子のVetoableChangeListener (存在する場合)
-
getChildBeanContextMembershipListener
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child)
指定された子のBeanContextMembershipListener (存在する場合)を取得します。- パラメータ:
child- 指定された子- 戻り値:
- 指定された子のBeanContextMembershipListener (存在する場合)
-
getChildBeanContextChild
protected static final BeanContextChild getChildBeanContextChild(Object child)
指定された子のBeanContextChild (存在する場合)を取得します。- パラメータ:
child- 指定された子- 戻り値:
- 指定された子のBeanContextChild (存在する場合)
- 例外:
IllegalArgumentException- 子がBeanContextChildおよびBeanContextProxyの両方を実装している場合
-
fireChildrenAdded
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme)
BeanContextMembershipListenerインタフェースのBeanContextshipEventをトリガーします。- パラメータ:
bcme- トリガーするイベント
-
fireChildrenRemoved
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme)
BeanContextMembershipListenerインタフェースのBeanContextshipEventをトリガーします。- パラメータ:
bcme- トリガーするイベント
-
initialize
protected void initialize()
BeanContextSupportインスタンスの過渡状態を初期化するために、コンストラクタおよびreadObjectから呼び出されるprotectedメソッドです。 このクラスは、このメソッドを使用して、子のPropertyChangeおよびVetoableChangeイベントのモニターに使用される内部クラス・リスナーをインスタンス化します。サブクラスは独自の初期化動作を追加するためにこのメソッドを包括できます。
-
copyChildren
protected final Object[] copyChildren()
このBeanContextの子のコピーを取得します。- 戻り値:
- 現在の入れ子になった子のコピー
-
-