tit.observation.ObservationTableModel Class Reference

Inheritance diagram for tit.observation.ObservationTableModel:

tit.observation.ReproducableObservation tit.observation.Observation tit.observation.Observable List of all members.

Public Member Functions

 ObservationTableModel ()
synchronized void startObservation () throws ObservationInIllegalStateException
synchronized void stopObservation (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordFly (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordHop (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordPreen (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordBillwipe (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordPeckRing (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordBoink (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordTree1 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordTree2 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordTree3 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordTree4 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordTree5 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordWall1 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordWall2 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordWall3 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordWall4 (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordFloor (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordDoorOrWindow (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
synchronized void recordOtherLocation (long time) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
int getRowCount ()
int getColumnCount ()
String getColumnName (int column)
Class<?> getColumnClass (int column)
synchronized boolean isCellEditable (int row, int column)
synchronized Object getValueAt (int row, int column)
synchronized void setValueAt (Object value, int row, int column)
void addBehaviour (Behaviour behaviour) throws ObservationInIllegalStateException, ObservationsInWrongOrderException
void removeBehaviour (int index) throws ObservationInIllegalStateException
synchronized void addTableModelListener (TableModelListener listener)
synchronized void removeTableModelListener (TableModelListener listener)
void produceObservation (Observation observation) throws ObservationsInWrongOrderException, ObservationInIllegalStateException

Protected Member Functions

synchronized void notifyListeners ()

Private Attributes

EventListenerList listeners
List< Behaviourobservations
long stoptime

Static Private Attributes

static final int NUMBER_OF_COLUMNS = 2
static final int TIME_COLUMN = 0
static final int BEHAVIOUR_COMUMN = 1
static final String[] COLUMN_NAME = {"Time", "Behaviour"}
static final Class<?>[] COLUMN_CLASS = {String.class, String.class}
static final boolean[] COLUMN_EDITABLE_STARTED = {false, true}
static final boolean[] COLUMN_EDITABLE_STOPPED = {true, true}

Detailed Description

An Observation which also is a TableModel.
Author:
Bart Sas


Constructor & Destructor Documentation

tit.observation.ObservationTableModel.ObservationTableModel (  ) 

Construct a new ObservationTableModel.


Member Function Documentation

synchronized void tit.observation.ObservationTableModel.notifyListeners (  )  [protected]

Notify all listeners.

synchronized void tit.observation.ObservationTableModel.startObservation (  )  throws ObservationInIllegalStateException

Starts the observation.

Exceptions:
ObservationInIllegalStateException Is thrown when the measurement has already been started.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.stopObservation ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Stops the observation.

Parameters:
time The time (in ms) when the measurement is stopped.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement isn't started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordFly ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record a fly.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordHop ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record a hop.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordPreen ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record a preen.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordBillwipe ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record a billwipe.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordPeckRing ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record a peckring.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordBoink ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record a boink.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordTree1 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record tree 1.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordTree2 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record tree 2.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordTree3 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record tree 3.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordTree4 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record tree 4.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordTree5 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record tree 5.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordWall1 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record wall 1.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordWall2 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record wall 2.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordWall3 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record wall 3.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordWall4 ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record wall 4.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordFloor ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record the floor.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordDoorOrWindow ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record the door or window.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

synchronized void tit.observation.ObservationTableModel.recordOtherLocation ( long  time  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Record an other location.

Parameters:
time The time on which this behaviour is recorded.
Exceptions:
ObservationInIllegalStateException Is thrown when the measurement hasn't been started yet or has already been stopped.
ObservationsInWrongOrderException Is thrown when this method is called whith a time less than the time of a previous call.

Reimplemented from tit.observation.Observation.

int tit.observation.ObservationTableModel.getRowCount (  ) 

Returns the number of rows.

Returns:
The number of rows.

int tit.observation.ObservationTableModel.getColumnCount (  ) 

Returns the number of columns.

Returns:
The number of columns.

String tit.observation.ObservationTableModel.getColumnName ( int  column  ) 

Returns the name of a column.

Parameters:
column The column's index.
Returns:
Column column's name.

Class<?> tit.observation.ObservationTableModel.getColumnClass ( int  column  ) 

Returns the class of a column.

Parameters:
column The column's index.
Returns:
Column column's class.

synchronized boolean tit.observation.ObservationTableModel.isCellEditable ( int  row,
int  column 
)

Returns whether cell (row, column) is editable or not.

Parameters:
row The cell's row-index.
column The cell's column-index.
Returns:
true if cell (row, column) is editable, false otherwise.

synchronized Object tit.observation.ObservationTableModel.getValueAt ( int  row,
int  column 
)

Returns the value of cell (row, column).

Parameters:
row The cell's row-index.
column The cell's column-index.
Returns:
The value of cell (row, column).

synchronized void tit.observation.ObservationTableModel.setValueAt ( Object  value,
int  row,
int  column 
)

Changes the value of cell (row, column).

Parameters:
value The new value of cell (row, column).
row The cell's row-index.
column The cell's column-index.

void tit.observation.ObservationTableModel.addBehaviour ( Behaviour  behaviour  )  throws ObservationInIllegalStateException, ObservationsInWrongOrderException

Adds an observation.

Parameters:
behaviour The behaviour that is added.
Exceptions:
ObservationInIllegalStateException Is thrown if the observation is not stopped.
ObservationsInWrongOrderException Is thrown if behaviour's time is smaller than 0 or larger than the stoptime.

void tit.observation.ObservationTableModel.removeBehaviour ( int  index  )  throws ObservationInIllegalStateException

Removes a behaviour.

Parameters:
index The index of the behaviour to remove.
Exceptions:
ObservationInIllegalStateException Is thrown if the observation is not stopped.

synchronized void tit.observation.ObservationTableModel.addTableModelListener ( TableModelListener  listener  ) 

Adds a TableModelListener to this ObservationTableModel.

Parameters:
listener The listener we want to add.

synchronized void tit.observation.ObservationTableModel.removeTableModelListener ( TableModelListener  listener  ) 

Removes a TableModelListener from this ObservationTableModel.

Parameters:
listener The listener we want to remove.

void tit.observation.ObservationTableModel.produceObservation ( Observation  observation  )  throws ObservationsInWrongOrderException, ObservationInIllegalStateException

Produce an observation.

Parameters:
observation The Observation-object on which the observation is produced.
Exceptions:
ObservationsInWrongOrderException Can be thrown by observation.
ObservationInIllegalStateException Can be thrown by observation.

Implements tit.observation.Observable.


Member Data Documentation

final int tit.observation.ObservationTableModel.NUMBER_OF_COLUMNS = 2 [static, private]

The number of colums.

final int tit.observation.ObservationTableModel.TIME_COLUMN = 0 [static, private]

The index of the time-column.

final int tit.observation.ObservationTableModel.BEHAVIOUR_COMUMN = 1 [static, private]

The index of the behaviour column.

final String [] tit.observation.ObservationTableModel.COLUMN_NAME = {"Time", "Behaviour"} [static, private]

The names of the colums.

final Class<?> [] tit.observation.ObservationTableModel.COLUMN_CLASS = {String.class, String.class} [static, private]

The classes of the colums.

final boolean [] tit.observation.ObservationTableModel.COLUMN_EDITABLE_STARTED = {false, true} [static, private]

Which colums are editable when the measurement is started?

final boolean [] tit.observation.ObservationTableModel.COLUMN_EDITABLE_STOPPED = {true, true} [static, private]

Which colums are editable when the measurement is stopped?

EventListenerList tit.observation.ObservationTableModel.listeners [private]

This TableModel's listeners.

List<Behaviour> tit.observation.ObservationTableModel.observations [private]

The recorded behaviours.

long tit.observation.ObservationTableModel.stoptime [private]

The time on which this measurement is stopped.


The documentation for this class was generated from the following file:
Generated on Sun Jun 3 16:44:00 2007 by  doxygen 1.5.1