edu.washington.biostr.sig.brainj3d.util.observables
Class ArrayObservableMatrix<E>

java.lang.Object
  extended by edu.washington.biostr.sig.brainj3d.util.observables.ObservableCollectionWrapper<V>
      extended by edu.washington.biostr.sig.brainj3d.util.observables.ObservableListWrapper<E[]>
          extended by edu.washington.biostr.sig.brainj3d.util.observables.ArrayObservableMatrix<E>
All Implemented Interfaces:
ObservableCollection<E[]>, ObservableList<E[]>, ObservableMatrix<E>, IdObject, Serializable, Iterable<E[]>, Collection<E[]>, List<E[]>

public class ArrayObservableMatrix<E>
extends ObservableListWrapper<E[]>
implements ObservableMatrix<E>

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.washington.biostr.sig.brainj3d.util.observables.ObservableListWrapper
ObservableListWrapper.CallbackLIterator
 
Constructor Summary
ArrayObservableMatrix(int width)
           
 
Method Summary
 boolean add(E[] o)
          Add a new row.
 void add(int index, E[] element)
          Add a new row.
 void addMatrixObserver(MatrixObserver<? super E> obs)
          Add the matrix observer.
 void addRow(E... column)
          Add a row of data.
protected  void fireMatrixObserver(int row, int col, E newdata, E olddata)
           
protected  void fireSet(int row, int column, E newvalue, E oldvalue)
           
 E get(int row, int column)
          Get the data at row, column
 Collection<MatrixObserver<? super E>> getMatrixObservers()
          Get all of the matrix observers
 int getWidth()
          Return the width (number of columns).
 void removeMatrixObserver(MatrixObserver<?> obs)
          Remove the matrix observer
 E set(int row, int column, E data)
          Optional Operation.
Set the data at row, column
 
Methods inherited from class edu.washington.biostr.sig.brainj3d.util.observables.ObservableListWrapper
addAll, addAll, addList, addListObserver, fireAdd, fireClear, fireRemove, fireSet, get, getListObservers, indexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeList, removeListObserver, set, subList
 
Methods inherited from class edu.washington.biostr.sig.brainj3d.util.observables.ObservableCollectionWrapper
addCollectionObserver, clear, contains, containsAll, equals, fireAdd, fireRemove, getCollectionObservers, getId, getIteratorLock, hashCode, isEmpty, iterator, removeAll, removeCollectionObserver, retainAll, setWriteObserver, size, toArray, toArray, wasAdded, wasCleared, wasRemoved
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.washington.biostr.sig.brainj3d.util.observables.ObservableMatrix
size
 
Methods inherited from interface edu.washington.biostr.sig.brainj3d.util.observables.ObservableList
addListObserver, getListObservers, removeListObserver
 
Methods inherited from interface java.util.List
addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 
Methods inherited from interface edu.washington.biostr.sig.brainj3d.util.observables.ObservableCollection
addCollectionObserver, getCollectionObservers, getIteratorLock, removeCollectionObserver
 
Methods inherited from interface edu.washington.biostr.sig.IdObject
getId, setWriteObserver
 

Constructor Detail

ArrayObservableMatrix

public ArrayObservableMatrix(int width)
Method Detail

getWidth

public int getWidth()
Description copied from interface: ObservableMatrix
Return the width (number of columns).

Specified by:
getWidth in interface ObservableMatrix<E>
Returns:

get

public E get(int row,
             int column)
Description copied from interface: ObservableMatrix
Get the data at row, column

Specified by:
get in interface ObservableMatrix<E>
Returns:

set

public E set(int row,
             int column,
             E data)
Description copied from interface: ObservableMatrix
Optional Operation.
Set the data at row, column

Specified by:
set in interface ObservableMatrix<E>
Returns:

fireSet

protected void fireSet(int row,
                       int column,
                       E newvalue,
                       E oldvalue)

addRow

public void addRow(E... column)
Description copied from interface: ObservableMatrix
Add a row of data.

Specified by:
addRow in interface ObservableMatrix<E>

add

public boolean add(E[] o)
Description copied from interface: ObservableMatrix
Add a new row.

Specified by:
add in interface ObservableMatrix<E>
Specified by:
add in interface Collection<E[]>
Specified by:
add in interface List<E[]>
Overrides:
add in class ObservableListWrapper<E[]>

add

public void add(int index,
                E[] element)
Description copied from interface: ObservableMatrix
Add a new row.

Specified by:
add in interface ObservableMatrix<E>
Specified by:
add in interface List<E[]>
Overrides:
add in class ObservableListWrapper<E[]>

addMatrixObserver

public void addMatrixObserver(MatrixObserver<? super E> obs)
Description copied from interface: ObservableMatrix
Add the matrix observer.

Specified by:
addMatrixObserver in interface ObservableMatrix<E>

removeMatrixObserver

public void removeMatrixObserver(MatrixObserver<?> obs)
Description copied from interface: ObservableMatrix
Remove the matrix observer

Specified by:
removeMatrixObserver in interface ObservableMatrix<E>

fireMatrixObserver

protected void fireMatrixObserver(int row,
                                  int col,
                                  E newdata,
                                  E olddata)

getMatrixObservers

public Collection<MatrixObserver<? super E>> getMatrixObservers()
Description copied from interface: ObservableMatrix
Get all of the matrix observers

Specified by:
getMatrixObservers in interface ObservableMatrix<E>
Returns:


Copyright © 2006 University of Washington. All Rights Reserved.