Package org.zkoss.zk.ui.impl

## Class ScopeListeners

- java.lang.Object
- - org.zkoss.zk.ui.impl.ScopeListeners

-     public class ScopeListeners
      extends java.lang.Object

  Utilities to implement `Scope.addScopeListener(org.zkoss.zk.ui.ext.ScopeListener)` and `Scope.removeScopeListener(org.zkoss.zk.ui.ext.ScopeListener)`.
  Since:
    5.0.0
  Author:
    tomyeh
  See Also:
    `SimpleScope`, `Scope`

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ScopeListeners​(Scope owner)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `addScopeListener​(ScopeListener listener)` | Adds a scope listener.
    `java.util.List<ScopeListener>` | `getListeners()` | Returns a list of all scope listeners (never null).
    `void` | `notifyAdded​(java.lang.String name, java.lang.Object value)` | Invokes `ScopeListener.attributeAdded(org.zkoss.zk.ui.ext.Scope, java.lang.String, java.lang.Object)` for registered listeners.
    `void` | `notifyIdSpaceChanged​(IdSpace newIdSpace)` | Invokes `ScopeListener.idSpaceChanged(org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.IdSpace)` for registered listeners.
    `void` | `notifyParentChanged​(Scope newparent)` | Invokes `ScopeListener.parentChanged(org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.ext.Scope)` for registered listeners.
    `void` | `notifyRemoved​(java.lang.String name)` | Invokes `ScopeListener.attributeRemoved(org.zkoss.zk.ui.ext.Scope, java.lang.String)` for registered listeners.
    `void` | `notifyReplaced​(java.lang.String name, java.lang.Object value)` | Invokes `ScopeListener.attributeReplaced(org.zkoss.zk.ui.ext.Scope, java.lang.String, java.lang.Object)` for registered listeners.
    `boolean` | `removeScopeListener​(ScopeListener listener)` | Adds a scope listener.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScopeListeners

          public ScopeListeners​(Scope owner)

      Constructor.
      Parameters:
        `owner` - the scope that is the owner (i.e., visible to the users).

  - ### Method Detail

    - #### addScopeListener

          public boolean addScopeListener​(ScopeListener listener)

      Adds a scope listener.

    - #### removeScopeListener

          public boolean removeScopeListener​(ScopeListener listener)

      Adds a scope listener.

    - #### getListeners

          public java.util.List<ScopeListener> getListeners()

      Returns a list of all scope listeners (never null).

    - #### notifyAdded

          public void notifyAdded​(java.lang.String name,
                                  java.lang.Object value)

      Invokes `ScopeListener.attributeAdded(org.zkoss.zk.ui.ext.Scope, java.lang.String, java.lang.Object)` for registered listeners.
      See Also:
        `addScopeListener(org.zkoss.zk.ui.ext.ScopeListener)`

    - #### notifyReplaced

          public void notifyReplaced​(java.lang.String name,
                                     java.lang.Object value)

      Invokes `ScopeListener.attributeReplaced(org.zkoss.zk.ui.ext.Scope, java.lang.String, java.lang.Object)` for registered listeners.
      See Also:
        `addScopeListener(org.zkoss.zk.ui.ext.ScopeListener)`

    - #### notifyRemoved

          public void notifyRemoved​(java.lang.String name)

      Invokes `ScopeListener.attributeRemoved(org.zkoss.zk.ui.ext.Scope, java.lang.String)` for registered listeners.
      See Also:
        `addScopeListener(org.zkoss.zk.ui.ext.ScopeListener)`

    - #### notifyParentChanged

          public void notifyParentChanged​(Scope newparent)

      Invokes `ScopeListener.parentChanged(org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.ext.Scope)` for registered listeners.
      See Also:
        `addScopeListener(org.zkoss.zk.ui.ext.ScopeListener)`

    - #### notifyIdSpaceChanged

          public void notifyIdSpaceChanged​(IdSpace newIdSpace)

      Invokes `ScopeListener.idSpaceChanged(org.zkoss.zk.ui.ext.Scope, org.zkoss.zk.ui.IdSpace)` for registered listeners.
      Since:
        5.0.1
      See Also:
        `addScopeListener(org.zkoss.zk.ui.ext.ScopeListener)`