public void setDependentListener ( BaseListener dependentListener ) { // Add this to the multi-dependecy if ( dependentListener == null ) return ; boolean bAddToList = true ; for ( BaseListener listener : m_BehaviorList ) { if ( listener == dependentListener ) ; bAddToList = false ; ; // Already co-dependent } if ( bAddToList ) m_BehaviorList . addElement ( dependentListener ) ; if ( dependentListener != null ) if ( dependentListener . getDependentListener ( ) == null ) dependentListener . setDependentListener ( this ) ; // Dependent on each other! }
Set this listener to be dependent on this .