com.mindfusion.diagramming
Class BaseList<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
com.mindfusion.diagramming.BaseList<E>
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
- Direct Known Subclasses:
- AnchorPointList, CellList, ColumnList, CommandList, DiagramItemList, DiagramLinkList, DiagramNodeList, GroupList, PathList, PointList, RowList, ShapeList, ShapeNodeList, TreeItemList
public class BaseList<E>
- extends java.util.AbstractList<E>
- implements java.io.Externalizable
Implements common functionality of JDiagram List classes.
- See Also:
- Serialized Form
Field Summary |
protected java.util.ArrayList<E> |
list
|
protected com.mindfusion.diagramming.ListEvent<E> |
listEvent
|
protected boolean |
notifyParent
|
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
void |
add(int index,
E element)
Adds a new element to the list. |
void |
clear()
Removes all elements from the list. |
boolean |
contains(java.lang.Object element)
Determines if this list contains the specified element. |
E |
get(int index)
Gets the element at the specified position in this list. |
protected void |
raiseAdding(E item,
int index)
|
protected void |
raiseClearing()
|
protected void |
raiseRemoving(E item)
|
void |
readExternal(java.io.ObjectInput in)
|
E |
remove(int index)
|
boolean |
remove(java.lang.Object element)
|
void |
removeRange(int fromIndex,
int toIndex)
|
E |
set(int index,
E element)
Sets the element at the specified position in this list. |
int |
size()
|
void |
writeExternal(java.io.ObjectOutput out)
|
Methods inherited from class java.util.AbstractList |
add, addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
addAll, containsAll, isEmpty, removeAll, retainAll, toArray, toArray |
list
protected java.util.ArrayList<E> list
notifyParent
protected boolean notifyParent
listEvent
protected com.mindfusion.diagramming.ListEvent<E> listEvent
BaseList
protected BaseList()
BaseList
protected BaseList(int capacity)
BaseList
protected BaseList(java.util.Collection<E> c)
BaseList
protected BaseList(boolean notifyParent)
size
public int size()
- Specified by:
size
in interface java.util.Collection<E>
- Specified by:
size
in interface java.util.List<E>
- Specified by:
size
in class java.util.AbstractCollection<E>
get
public E get(int index)
- Gets the element at the specified position in this list.
- Specified by:
get
in interface java.util.List<E>
- Specified by:
get
in class java.util.AbstractList<E>
set
public E set(int index,
E element)
- Sets the element at the specified position in this list.
- Specified by:
set
in interface java.util.List<E>
- Overrides:
set
in class java.util.AbstractList<E>
add
public void add(int index,
E element)
- Adds a new element to the list.
- Specified by:
add
in interface java.util.List<E>
- Overrides:
add
in class java.util.AbstractList<E>
remove
public E remove(int index)
- Specified by:
remove
in interface java.util.List<E>
- Overrides:
remove
in class java.util.AbstractList<E>
remove
public boolean remove(java.lang.Object element)
- Specified by:
remove
in interface java.util.Collection<E>
- Specified by:
remove
in interface java.util.List<E>
- Overrides:
remove
in class java.util.AbstractCollection<E>
removeRange
public void removeRange(int fromIndex,
int toIndex)
- Overrides:
removeRange
in class java.util.AbstractList<E>
clear
public void clear()
- Removes all elements from the list.
- Specified by:
clear
in interface java.util.Collection<E>
- Specified by:
clear
in interface java.util.List<E>
- Overrides:
clear
in class java.util.AbstractList<E>
contains
public boolean contains(java.lang.Object element)
- Determines if this list contains the specified element.
- Specified by:
contains
in interface java.util.Collection<E>
- Specified by:
contains
in interface java.util.List<E>
- Overrides:
contains
in class java.util.AbstractCollection<E>
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
raiseAdding
protected void raiseAdding(E item,
int index)
raiseRemoving
protected void raiseRemoving(E item)
raiseClearing
protected void raiseClearing()