org.eclipse.jpt.utility.model.event
Class TreeChangeEvent

java.lang.Object
  extended by java.util.EventObject
      extended by org.eclipse.jpt.utility.model.event.ChangeEvent
          extended by org.eclipse.jpt.utility.model.event.TreeEvent
              extended by org.eclipse.jpt.utility.model.event.TreeChangeEvent
All Implemented Interfaces:
java.io.Serializable

public final class TreeChangeEvent
extends TreeEvent

A "tree change" event gets delivered whenever a model changes a "bound" or "constrained" tree in a manner that is not easily characterized by the other tree events. A TreeChangeEvent is sent as an argument to the TreeChangeListener.

Provisional API: This class is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.

See Also:
Serialized Form

Constructor Summary
TreeChangeEvent(Model source, java.lang.String treeName, java.util.Collection<?> nodes)
          Construct a new tree change event.
 
Method Summary
 TreeChangeEvent clone(Model newSource)
           
 TreeChangeEvent clone(Model newSource, java.lang.String newTreeName)
          Return a copy of the event with the specified source and tree name replacing the current source and tree name.
 java.lang.Iterable<?> getNodes()
          Return the current nodes in the changed tree.
 int getNodesSize()
          Return the current nodes in the changed tree.
 
Methods inherited from class org.eclipse.jpt.utility.model.event.TreeEvent
getTreeName
 
Methods inherited from class org.eclipse.jpt.utility.model.event.ChangeEvent
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeChangeEvent

public TreeChangeEvent(Model source,
                       java.lang.String treeName,
                       java.util.Collection<?> nodes)
Construct a new tree change event.

Parameters:
source - The object on which the event initially occurred.
treeName - The programmatic name of the tree that was changed.
nodes - The current nodes in the changed tree.
Method Detail

getNodes

public java.lang.Iterable<?> getNodes()
Return the current nodes in the changed tree.


getNodesSize

public int getNodesSize()
Return the current nodes in the changed tree.


clone

public TreeChangeEvent clone(Model newSource)

clone

public TreeChangeEvent clone(Model newSource,
                             java.lang.String newTreeName)
Return a copy of the event with the specified source and tree name replacing the current source and tree name.