kaapo.projectmanager
Class Selection

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<DiagramComponentWrapper>
              extended by kaapo.projectmanager.Selection
All Implemented Interfaces:
Serializable, Cloneable, Iterable<DiagramComponentWrapper>, Collection<DiagramComponentWrapper>, List<DiagramComponentWrapper>, RandomAccess

public class Selection
extends Vector<DiagramComponentWrapper>

A Selection keeps track of the selected DiagramComponentWrappers.

Author:
hprajani, iheikkin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Selection()
          Constructs an empty Selection.
Selection(DiagramComponentWrapper diagramcomponent)
          Constructs a Selection with only one selected DiagramComponent.
Selection(DiagramComponentWrapper[] diagramcomponents)
          Constructs a Selection with multiple selected DiagramComponents.
Selection(List<DiagramComponentWrapper> diagramcomponents)
          Constructs a Selection with multiple selected DiagramComponents.
 
Method Summary
 boolean add(DiagramComponentWrapper dcw)
          Adds the given wrapper to the selection.
 
Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Selection

public Selection()
Constructs an empty Selection.


Selection

public Selection(DiagramComponentWrapper diagramcomponent)
          throws NullPointerException
Constructs a Selection with only one selected DiagramComponent.

Parameters:
diagramcomponent - the current selected DiagramComponent
Throws:
NullPointerException

Selection

public Selection(DiagramComponentWrapper[] diagramcomponents)
          throws NullPointerException
Constructs a Selection with multiple selected DiagramComponents.

Parameters:
diagramcomponents -
Throws:
NullPointerException

Selection

public Selection(List<DiagramComponentWrapper> diagramcomponents)
          throws NullPointerException
Constructs a Selection with multiple selected DiagramComponents.

Parameters:
diagramcomponents -
Throws:
NullPointerException
Method Detail

add

public boolean add(DiagramComponentWrapper dcw)
            throws NullPointerException
Adds the given wrapper to the selection.

Specified by:
add in interface Collection<DiagramComponentWrapper>
Specified by:
add in interface List<DiagramComponentWrapper>
Overrides:
add in class Vector<DiagramComponentWrapper>
Parameters:
dcw - The wrapper to be added to the selection.
Returns:
Returns true if the wrapper could be added.
Throws:
NullPointerException