Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.p13n.model
Class Model.ChangeSupport

    java.lang.Object
      com.bea.p13n.model.Model.ChangeSupport

Enclosing class:
  Model

    public static class Model.ChangeSupport

extends Object

Helper class for managing ChangeListeners.

Constructor Summary
`Model.ChangeSupport(Object source)` Constructor.

Method Summary
`void` | `add(Model.ChangeListener l)` Add a change listener, if it's not already in our list of listeners.
`boolean` | `contains(Model.ChangeListener l)` Determine if we contain the specified listener.
`void` | `fireChildAdded(Model parent, Model child)` Fire a child added event.
`void` | `fireChildChange(Model parent, Model child, boolean added)` Fire a child change event.
`void` | `fireChildRemoved(Model parent, Model child)` Fire a child removed event.
`void` | `fireParentChange(Model model, Model oldParent, Model newParent)`
`void` | `firePropertyChange(Model model, String propName, Object oldVal, Object newVal)` Fire a property change event.
`void` | `fireRootModelChange(Model oldRoot, Model newRoot)` Fire a root model change event.
`Model.ChangeListener[]` | `getChangeListeners()` Get the list of ChangeListeners, or null if none.
`boolean` | `remove(Model.ChangeListener l)` Remove a change listener.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Model.ChangeSupport

    public Model.ChangeSupport(Object source)

  Constructor.

  Parameters
    `source` - the originator of change events.

Method Detail

### add

    public void add(Model.ChangeListener l)

  Add a change listener, if it's not already in our list of listeners.

### remove

    public boolean remove(Model.ChangeListener l)

  Remove a change listener.

  Returns
    true if removed, false if not found.

### contains

    public boolean contains(Model.ChangeListener l)

  Determine if we contain the specified listener.

### getChangeListeners

    public Model.ChangeListener[] getChangeListeners()

  Get the list of ChangeListeners, or null if none.

### firePropertyChange

    public void firePropertyChange(Model model,
                                   String propName,
                                   Object oldVal,
                                   Object newVal)

  Fire a property change event.

  Parameters
    `model` - the model that changed.
    `propName` - the property name.
    `oldVal` - the previous value (null is valid).
    `newVal` - the new value (null is valid).

### fireChildChange

    public void fireChildChange(Model parent,
                                Model child,
                                boolean added)

  Fire a child change event.

  Parameters
    `parent` - the parent model.
    `child` - the child model.
    `added` - true if the child was added, false if removed.

### fireChildAdded

    public void fireChildAdded(Model parent,
                               Model child)

  Fire a child added event.

  Parameters
    `parent` - the parent model.
    `child` - the child model.

### fireChildRemoved

    public void fireChildRemoved(Model parent,
                                 Model child)

  Fire a child removed event.

  Parameters
    `parent` - the parent model.
    `child` - the child model.

### fireRootModelChange

    public void fireRootModelChange(Model oldRoot,
                                    Model newRoot)

  Fire a root model change event.

  Parameters
    `oldRoot` - the previous root model.
    `newRoot` - the new root model.

### fireParentChange

    public void fireParentChange(Model model,
                                 Model oldParent,
                                 Model newParent)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.