diva.canvas.interactor
Class SelectionEvent

java.lang.Object
  extended by java.util.EventObject
      extended by diva.canvas.interactor.SelectionEvent
All Implemented Interfaces:
java.io.Serializable

public class SelectionEvent
extends java.util.EventObject

An event representing a change in the graph selection model. The event contains all the information to mirror the selection model.

Version:
$Id: SelectionEvent.java 43472 2006-08-21 23:16:56Z cxh $
Author:
Michael Shilman
See Also:
Serialized Form

Field Summary
private  java.lang.Object[] _added
          The objects added to the selection.
private  java.lang.Object _primary
          The primary selected object.
private  java.lang.Object[] _removed
          The objects removed from the selection.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SelectionEvent(java.lang.Object source)
          Construct an empty Selection event from the given source.
SelectionEvent(java.lang.Object source, java.lang.Object[] added, java.lang.Object[] removed, java.lang.Object primary)
          Construct a new Selection event from the given source, representing the given selection additions, removals, and primary selection.
 
Method Summary
 java.lang.Object getPrimarySelection()
          Return the primary selection object.
 java.util.Iterator getSelectionAdditions()
          Return an iterator over the objects added to the selection model.
 java.util.Iterator getSelectionRemovals()
          Return an iterator over the objects removed from the selection model.
(package private)  void set(java.lang.Object[] added, java.lang.Object[] removed, java.lang.Object primary)
          Set the contents of the selection event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_added

private java.lang.Object[] _added
The objects added to the selection.


_removed

private java.lang.Object[] _removed
The objects removed from the selection.


_primary

private java.lang.Object _primary
The primary selected object.

Constructor Detail

SelectionEvent

public SelectionEvent(java.lang.Object source,
                      java.lang.Object[] added,
                      java.lang.Object[] removed,
                      java.lang.Object primary)
Construct a new Selection event from the given source, representing the given selection additions, removals, and primary selection.


SelectionEvent

SelectionEvent(java.lang.Object source)
Construct an empty Selection event from the given source.

Method Detail

getSelectionAdditions

public java.util.Iterator getSelectionAdditions()
Return an iterator over the objects added to the selection model.


getSelectionRemovals

public java.util.Iterator getSelectionRemovals()
Return an iterator over the objects removed from the selection model.


getPrimarySelection

public java.lang.Object getPrimarySelection()
Return the primary selection object.


set

void set(java.lang.Object[] added,
         java.lang.Object[] removed,
         java.lang.Object primary)
Set the contents of the selection event.