org.herac.tuxguitar.gui.editors.tab
Class TGMeasureImpl

java.lang.Object
  extended by org.herac.tuxguitar.song.models.TGMeasure
      extended by org.herac.tuxguitar.gui.editors.tab.TGMeasureImpl

public class TGMeasureImpl
extends TGMeasure


Field Summary
static int[] ACCIDENTAL_FLAT_NOTES
           
static boolean[] ACCIDENTAL_NOTES
           
static int[] ACCIDENTAL_SHARP_NOTES
           
static int FLAT
           
static int[][] KEY_SIGNATURES
           
static int NATURAL
           
static int[] SCORE_KEY_FLAT_POSITIONS
           
static int[] SCORE_KEY_OFFSETS
           
static int[] SCORE_KEY_SHARP_POSITIONS
           
static int SHARP
           
 
Fields inherited from class org.herac.tuxguitar.song.models.TGMeasure
CLEF_ALTO, CLEF_BASS, CLEF_TENOR, CLEF_TREBLE, DEFAULT_CLEF, DEFAULT_KEY_SIGNATURE
 
Constructor Summary
TGMeasureImpl(TGMeasureHeader header)
           
 
Method Summary
 void calculateMeasureChanges(ViewLayout layout)
          Calcula si debe pintar el TimeSignature
 void calculateWidth(ViewLayout layout)
           
 boolean canJoin(TGSongManager manager, TGVoiceImpl b1, TGVoiceImpl b2)
           
 void create(ViewLayout layout)
          Crea los valores necesarios
 void dispose()
           
 void disposeMarkerColor()
           
 int getBeatSpacing(TGBeat beat)
           
 TGMeasureBuffer getBuffer()
           
 int getClefSpacing(ViewLayout layout)
           
 long getDivisionLength()
           
 int getFirstNoteSpacing(ViewLayout layout)
           
 TGMeasureHeaderImpl getHeaderImpl()
           
 int getKeySignatureSpacing(ViewLayout layout)
           
 int getLyricBeatIndex()
           
 Color getMarkerColor()
           
 int getMaxY()
           
 int getMinY()
           
 int getNoteAccidental(int noteValue)
           
 int getNotEmptyBeats()
           
 int getNotEmptyVoices()
           
 int getPosX()
          Retorna la posicion X dentro del compas
 int getPosY()
          Retorna la posicion Y dentro del compas
 int getSpacing()
           
 TGTrackImpl getTrackImpl()
           
 TrackSpacing getTs()
           
 int getWidth(ViewLayout layout)
          Retorna el ancho del Compas
 boolean hasTrack(int number)
           
 boolean isBufferCreated()
           
 boolean isDisposed()
           
 boolean isFirstOfLine()
           
 boolean isOutOfBounds()
           
 boolean isPaintClef()
           
 boolean isPaintKeySignature()
           
 boolean isPlaying(ViewLayout layout)
          Retorna true si se esta reproduciendo y la posicion del player esta en este compas.
 void paintComponents(ViewLayout layout, TGPainter painter, int fromX, int fromY)
          Pinta las notas
 void paintMeasure(ViewLayout layout, TGPainter painter)
           
 void paintRepeatEnding(ViewLayout layout, TGPainter painter)
           
 void registerSpacing(ViewLayout layout, TrackSpacing ts)
           
 void setBufferCreated(boolean bufferCreated)
           
 void setFirstOfLine(boolean firstOfLine)
           
 void setLyricBeatIndex(int lyricBeatIndex)
           
 void setOutOfBounds(boolean outOfBounds)
           
 void setPosX(int posX)
          Asigna la posicion X dentro del compas
 void setPosY(int posY)
          Asigna la posicion Y dentro del compas
 void setSpacing(int spacing)
           
 void setTs(TrackSpacing ts)
           
 void update(ViewLayout layout)
          Actualiza los valores para dibujar
 
Methods inherited from class org.herac.tuxguitar.song.models.TGMeasure
addBeat, clone, countBeats, getBeat, getBeats, getClef, getHeader, getKeySignature, getLength, getMarker, getNumber, getRepeatClose, getStart, getTempo, getTimeSignature, getTrack, getTripletFeel, hasMarker, isRepeatOpen, makeEqual, moveBeat, removeBeat, setClef, setHeader, setKeySignature, setTrack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NATURAL

public static final int NATURAL
See Also:
Constant Field Values

SHARP

public static final int SHARP
See Also:
Constant Field Values

FLAT

public static final int FLAT
See Also:
Constant Field Values

KEY_SIGNATURES

public static final int[][] KEY_SIGNATURES

ACCIDENTAL_SHARP_NOTES

public static final int[] ACCIDENTAL_SHARP_NOTES

ACCIDENTAL_FLAT_NOTES

public static final int[] ACCIDENTAL_FLAT_NOTES

ACCIDENTAL_NOTES

public static final boolean[] ACCIDENTAL_NOTES

SCORE_KEY_OFFSETS

public static final int[] SCORE_KEY_OFFSETS

SCORE_KEY_SHARP_POSITIONS

public static final int[] SCORE_KEY_SHARP_POSITIONS

SCORE_KEY_FLAT_POSITIONS

public static final int[] SCORE_KEY_FLAT_POSITIONS
Constructor Detail

TGMeasureImpl

public TGMeasureImpl(TGMeasureHeader header)
Method Detail

create

public void create(ViewLayout layout)
Crea los valores necesarios


update

public void update(ViewLayout layout)
Actualiza los valores para dibujar


calculateWidth

public void calculateWidth(ViewLayout layout)

canJoin

public boolean canJoin(TGSongManager manager,
                       TGVoiceImpl b1,
                       TGVoiceImpl b2)

calculateMeasureChanges

public void calculateMeasureChanges(ViewLayout layout)
Calcula si debe pintar el TimeSignature


getNoteAccidental

public int getNoteAccidental(int noteValue)

registerSpacing

public void registerSpacing(ViewLayout layout,
                            TrackSpacing ts)

paintMeasure

public void paintMeasure(ViewLayout layout,
                         TGPainter painter)

paintRepeatEnding

public void paintRepeatEnding(ViewLayout layout,
                              TGPainter painter)

paintComponents

public void paintComponents(ViewLayout layout,
                            TGPainter painter,
                            int fromX,
                            int fromY)
Pinta las notas


isPlaying

public boolean isPlaying(ViewLayout layout)
Retorna true si se esta reproduciendo y la posicion del player esta en este compas.


getBeatSpacing

public int getBeatSpacing(TGBeat beat)

hasTrack

public boolean hasTrack(int number)

getWidth

public int getWidth(ViewLayout layout)
Retorna el ancho del Compas


getFirstNoteSpacing

public int getFirstNoteSpacing(ViewLayout layout)

getClefSpacing

public int getClefSpacing(ViewLayout layout)

getKeySignatureSpacing

public int getKeySignatureSpacing(ViewLayout layout)

getDivisionLength

public long getDivisionLength()

isBufferCreated

public boolean isBufferCreated()

setBufferCreated

public void setBufferCreated(boolean bufferCreated)

getPosX

public int getPosX()
Retorna la posicion X dentro del compas


setPosX

public void setPosX(int posX)
Asigna la posicion X dentro del compas


getPosY

public int getPosY()
Retorna la posicion Y dentro del compas


setPosY

public void setPosY(int posY)
Asigna la posicion Y dentro del compas


getHeaderImpl

public TGMeasureHeaderImpl getHeaderImpl()

getSpacing

public int getSpacing()

setSpacing

public void setSpacing(int spacing)

isOutOfBounds

public boolean isOutOfBounds()

setOutOfBounds

public void setOutOfBounds(boolean outOfBounds)

isFirstOfLine

public boolean isFirstOfLine()

setFirstOfLine

public void setFirstOfLine(boolean firstOfLine)

getTrackImpl

public TGTrackImpl getTrackImpl()

getTs

public TrackSpacing getTs()

setTs

public void setTs(TrackSpacing ts)

getMaxY

public int getMaxY()

getMinY

public int getMinY()

getNotEmptyBeats

public int getNotEmptyBeats()

getNotEmptyVoices

public int getNotEmptyVoices()

getLyricBeatIndex

public int getLyricBeatIndex()

setLyricBeatIndex

public void setLyricBeatIndex(int lyricBeatIndex)

isPaintClef

public boolean isPaintClef()

isPaintKeySignature

public boolean isPaintKeySignature()

isDisposed

public boolean isDisposed()

getBuffer

public TGMeasureBuffer getBuffer()

getMarkerColor

public Color getMarkerColor()

disposeMarkerColor

public void disposeMarkerColor()

dispose

public void dispose()