fi.helsinki.dacopan.model
Class Note

java.lang.Object
  extended by fi.helsinki.dacopan.model.Note
All Implemented Interfaces:
java.lang.Comparable

public class Note
extends java.lang.Object
implements java.lang.Comparable

This class represents a single textual note. If it is an ENC note, it is "attached" to a TransferUnit, if it's an MSC note, it's "attached" to a specific time value. In both cases it is stored in the NoteManager's hash maps.


Field Summary
static java.lang.String NULL_ENC_NOTE_TEXT
           
 
Constructor Summary
Note(Layer layer, float time, java.lang.String text)
          This constructor builds a note for MSC
Note(TransferUnit transferUnit, java.lang.String text)
          This constructor makes a note to use with encapsulation
 
Method Summary
 int compareTo(java.lang.Object o)
          We compare Notes by comparing their times.
 boolean equals(java.lang.Object o)
           
 Layer getLayer()
           
 java.lang.String getText()
           
 float getTime()
           
 TransferUnit getTransferUnit()
           
 void setText(java.lang.String text)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL_ENC_NOTE_TEXT

public static final java.lang.String NULL_ENC_NOTE_TEXT
Constructor Detail

Note

public Note(Layer layer,
            float time,
            java.lang.String text)
This constructor builds a note for MSC

Parameters:
layer -
time -
text -

Note

public Note(TransferUnit transferUnit,
            java.lang.String text)
This constructor makes a note to use with encapsulation

Parameters:
transferUnit -
time -
text -
Method Detail

setText

public void setText(java.lang.String text)

getTime

public float getTime()
Returns:
Returns the time.

getText

public java.lang.String getText()
Returns:
Returns the text.

getLayer

public Layer getLayer()
Returns:
Returns the layer.

getTransferUnit

public TransferUnit getTransferUnit()
Returns:
Returns the transferUnit.

compareTo

public int compareTo(java.lang.Object o)
We compare Notes by comparing their times.

Specified by:
compareTo in interface java.lang.Comparable

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


© Dacopan2 team, 2005-