holoedit.data
Class SDIFdataInstance

java.lang.Object
  extended by holoedit.data.SDIFdataInstance

public class SDIFdataInstance
extends java.lang.Object


Field Summary
private  int begTime
           
static int CURSOR_CUE
           
static int CURSOR_CUE_LOOP
           
private  double firstKey
           
private  GestionPistes gpRef
           
private  HoloSDIFdata hsdifdt
           
private  java.lang.String hxtdtName
           
private  int indexFirstKey
           
private  int indexLastKey
           
private  double lastKey
           
private  WaveFormInstance linkedWaveFormInstance
           
private  int listIDScore
           
private  int listIDTimeEditor
           
static int LOOP_AFTER_CUE
           
static int LOOP_BEGIN_CUE
           
static int LOOP_END_CUE
           
static int LOOP_IN_CUE
           
private  boolean performChangeOnTreeMap
           
private  boolean reversed
           
static int SPEC_CUE_NB
           
static int SPEC_CUE_OFFSET
           
private  boolean timeEdGUIdirty
           
 
Constructor Summary
SDIFdataInstance(GestionPistes gp, HoloSDIFdata hdt, int _beg)
           
SDIFdataInstance(GestionPistes gp, HoloSDIFdata hdt, int _beg, WaveFormInstance waveFormInstance)
           
SDIFdataInstance(GestionPistes gp, java.lang.String hdtName, int begin, int indexFirstKey, int indexLastKey, double firstKey, double lastKey, boolean reversed, WaveFormInstance linkedWaveFormInstance)
           
 
Method Summary
private  boolean createList(javax.media.opengl.GL gl, HoloSDIFdata holosdifdata)
           
 SDIFdataInstance cut(int dateBegin, int dateEnd)
          on enleve tous les points entre dateBegin & dateEnd on retourne une nouvelle instance basŽe sur la fin du sdif.
 SDIFdataInstance cutAt(int date)
           
 boolean cutBegin(int dateBegin)
          on enleve toutes les valeurs jusqu'ˆ dateBegin.
 boolean cutEnd(int dateEnd)
          on enleve toutes les valeurs ˆ partir de dateEnd.
 void drawMovedSquare(javax.media.opengl.GL gl, java.awt.Color c, int begin, int end, float b, float e, boolean type)
           
 void drawScore(javax.media.opengl.GL gl, java.awt.Color c, int begin, int end, boolean render, int tkNum, int seqNum, int selIndex, java.util.Vector<SDIFdataInstance> selDatas, int pixelNum, boolean nosmoothenabled, int selMode)
           
 void drawScoreSquare(javax.media.opengl.GL gl, HoloTrack tk, float dX)
           
 void drawTime(javax.media.opengl.GL gl, java.awt.Color color, int begin, int end, int pixelNum)
           
 SDIFdataInstance dupliquer()
           
 SDIFdataInstance dupliquer(WaveFormInstance wave)
           
 HoloSDIFdata getData()
           
 java.util.Vector<java.util.Vector<java.lang.Double>> getDataAtTime(double time)
          Returns the values corresponding to the given SCORE time in ms.
 double getDataAtTimeField(double time, int field)
          Returns the field value corresponding to this key if the given time is equal to a key of the holoSDIFdata's sdiftreeMap.
 int getDuration()
           
 java.util.Vector<java.lang.Double> getFieldAtTime(double time, int fieldIndex)
          Returns the field corresponding to the given time.
 int getFirstDate()
          return the date of the score at which the data begins
 int getLastDate()
           
 WaveFormInstance getLinkedWaveForm()
           
 java.lang.String getName()
           
 java.lang.Double[] getTimes()
           
 boolean hasDataAtTime(double time)
          Returns false is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.
 boolean isEmpty()
          Returns true if this SDIFdataInstance is empty.
 double localToScoreTime(double ltime)
           
 void move(int dateBegin)
          dŽplacement de tous les points ˆ la date de dŽpart dateBegin
 void moveBegin(int dateBegin)
           
 void moveEnd(int dateEnd)
           
 void performStrechNcutNreverse(int begin, int indexFirstKey, int indexLastKey, double firstKey, double lastKey, boolean reversed)
          used when creating an instance from a .holo File
 double scoreToLocalTime(double stime)
           
 void setBegTime(int i)
           
 void setDirty(boolean val)
          fonction de demande de mise ˆ jour gŽnŽrale
 void setDirty(int mask)
           
 void shiftDates(int date)
           
 java.lang.String toString()
           
 java.lang.String toString2()
          used to write in the .holo file
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOOP_BEGIN_CUE

public static final int LOOP_BEGIN_CUE
See Also:
Constant Field Values

LOOP_IN_CUE

public static final int LOOP_IN_CUE
See Also:
Constant Field Values

LOOP_END_CUE

public static final int LOOP_END_CUE
See Also:
Constant Field Values

LOOP_AFTER_CUE

public static final int LOOP_AFTER_CUE
See Also:
Constant Field Values

CURSOR_CUE_LOOP

public static final int CURSOR_CUE_LOOP
See Also:
Constant Field Values

CURSOR_CUE

public static final int CURSOR_CUE
See Also:
Constant Field Values

SPEC_CUE_NB

public static final int SPEC_CUE_NB
See Also:
Constant Field Values

SPEC_CUE_OFFSET

public static final int SPEC_CUE_OFFSET
See Also:
Constant Field Values

hsdifdt

private HoloSDIFdata hsdifdt

begTime

private int begTime

hxtdtName

private java.lang.String hxtdtName

gpRef

private GestionPistes gpRef

listIDScore

private int listIDScore

listIDTimeEditor

private int listIDTimeEditor

linkedWaveFormInstance

private WaveFormInstance linkedWaveFormInstance

timeEdGUIdirty

private boolean timeEdGUIdirty

performChangeOnTreeMap

private boolean performChangeOnTreeMap

indexFirstKey

private int indexFirstKey

indexLastKey

private int indexLastKey

firstKey

private double firstKey

lastKey

private double lastKey

reversed

private boolean reversed
Constructor Detail

SDIFdataInstance

public SDIFdataInstance(GestionPistes gp,
                        java.lang.String hdtName,
                        int begin,
                        int indexFirstKey,
                        int indexLastKey,
                        double firstKey,
                        double lastKey,
                        boolean reversed,
                        WaveFormInstance linkedWaveFormInstance)

SDIFdataInstance

public SDIFdataInstance(GestionPistes gp,
                        HoloSDIFdata hdt,
                        int _beg)

SDIFdataInstance

public SDIFdataInstance(GestionPistes gp,
                        HoloSDIFdata hdt,
                        int _beg,
                        WaveFormInstance waveFormInstance)
Method Detail

dupliquer

public SDIFdataInstance dupliquer()

dupliquer

public SDIFdataInstance dupliquer(WaveFormInstance wave)

update

public void update()

getData

public HoloSDIFdata getData()

isEmpty

public boolean isEmpty()
Returns true if this SDIFdataInstance is empty. An SDIFdataInstance is considered to be empty if the holoSDIFdata it refers to is empty.

Returns:
true if this SDIFdataInstance is empty.
See Also:
HoloSDIFdata.isEmpty()

scoreToLocalTime

public double scoreToLocalTime(double stime)

localToScoreTime

public double localToScoreTime(double ltime)

getDataAtTime

public java.util.Vector<java.util.Vector<java.lang.Double>> getDataAtTime(double time)
Returns the values corresponding to the given SCORE time in ms.
if the given time is equal to a key of the holoSDIFdata's sdiftreeMap.
If the given time is not equal to a key, it returns an interpolation of the two values corresponding to the two closest key.
'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


getDataAtTimeField

public double getDataAtTimeField(double time,
                                 int field)
Returns the field value corresponding to this key if the given time is equal to a key of the holoSDIFdata's sdiftreeMap. If the given time is not equal to a key, it returns an interpolation of the two values corresponding to the two closest key. 'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


hasDataAtTime

public boolean hasDataAtTime(double time)
Returns false is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


getTimes

public java.lang.Double[] getTimes()

getFieldAtTime

public java.util.Vector<java.lang.Double> getFieldAtTime(double time,
                                                         int fieldIndex)
Returns the field corresponding to the given time.
if the given time is equal to a key of the holoSDIFdata's sdiftreeMap.
If the given time is not equal to a key, it returns an interpolation of the two field corresponding to the two closest key.
'null' is returned if the sdifTreeMap is empty or if the time we look for is out of the treeMap keyset range.


getLinkedWaveForm

public WaveFormInstance getLinkedWaveForm()

getName

public java.lang.String getName()

getFirstDate

public int getFirstDate()
return the date of the score at which the data begins


getLastDate

public int getLastDate()

setBegTime

public void setBegTime(int i)

move

public void move(int dateBegin)
dŽplacement de tous les points ˆ la date de dŽpart dateBegin


shiftDates

public void shiftDates(int date)

getDuration

public int getDuration()

toString

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

toString2

public java.lang.String toString2()
used to write in the .holo file


drawScoreSquare

public void drawScoreSquare(javax.media.opengl.GL gl,
                            HoloTrack tk,
                            float dX)

drawMovedSquare

public void drawMovedSquare(javax.media.opengl.GL gl,
                            java.awt.Color c,
                            int begin,
                            int end,
                            float b,
                            float e,
                            boolean type)

drawScore

public void drawScore(javax.media.opengl.GL gl,
                      java.awt.Color c,
                      int begin,
                      int end,
                      boolean render,
                      int tkNum,
                      int seqNum,
                      int selIndex,
                      java.util.Vector<SDIFdataInstance> selDatas,
                      int pixelNum,
                      boolean nosmoothenabled,
                      int selMode)

drawTime

public void drawTime(javax.media.opengl.GL gl,
                     java.awt.Color color,
                     int begin,
                     int end,
                     int pixelNum)

createList

private boolean createList(javax.media.opengl.GL gl,
                           HoloSDIFdata holosdifdata)

setDirty

public void setDirty(boolean val)
fonction de demande de mise ˆ jour gŽnŽrale


setDirty

public void setDirty(int mask)

moveBegin

public void moveBegin(int dateBegin)

moveEnd

public void moveEnd(int dateEnd)

cut

public SDIFdataInstance cut(int dateBegin,
                            int dateEnd)
on enleve tous les points entre dateBegin & dateEnd on retourne une nouvelle instance basŽe sur la fin du sdif.


cutAt

public SDIFdataInstance cutAt(int date)

cutBegin

public boolean cutBegin(int dateBegin)
on enleve toutes les valeurs jusqu'ˆ dateBegin.


cutEnd

public boolean cutEnd(int dateEnd)
on enleve toutes les valeurs ˆ partir de dateEnd.


performStrechNcutNreverse

public void performStrechNcutNreverse(int begin,
                                      int indexFirstKey,
                                      int indexLastKey,
                                      double firstKey,
                                      double lastKey,
                                      boolean reversed)
                               throws java.lang.NullPointerException
used when creating an instance from a .holo File

Parameters:
begin -
indexFirstKey -
indexLastKey -
firstKey -
lastKey -
reversed -
Throws:
java.lang.NullPointerException