org.herac.tuxguitar.gui.tab

Class MeasureCoords


public class MeasureCoords
extends java.lang.Object

Field Summary

static int
DEFAULT_CLEF_SPAN
Espacio por defecto de la clave
static int
DEFAULT_LEFT_SPAN
Espacio por defecto a la izquierda
static int
DEFAULT_QUARTER_SPAN
Espacio por defecto entre negra y negra
static int
DEFAULT_RIGHT_SPAN
Espacio por defecto a la derecha
static int
DEFAULT_TIME_SIGNATURE_SPAN
Espacio por defecto del timeSignature
static int[]
SCORE_KEY_OFFSETS

Constructor Summary

MeasureCoords(SongManager songManager, Tablature tablature, Measure measure, SongTrackCoords trackCoords)

Method Summary

boolean
areInSameBeat(MeasureComponent arg0, MeasureComponent arg1)
void
calculateMeasureChanges(ViewLayout layout)
Calcula si debe pintar el TimeSignature
void
calculateTabHeight(ViewLayout layout)
Calcula el width del compas
void
calculateWidth()
Calcula el width del compas
void
create(ViewLayout layout)
Crea los valores necesarios
long
getBeatLength()
Caret
getCaret()
Retorna el Caret
int
getClefSpan()
MeasureComponent
getComponent(long start)
Retorna Un Componente en la posicion start
MeasureComponent
getComponent(long start, int string)
Retorna el Componente en la posicion Start, y en la cuerda
MeasureComponent
getComponentAt(int x)
Retorna el componente mas cercano a X
MeasureComponent
getComponentOrSilence(long start, int string)
Retorna el Componente en la posicion Start, y en la cuerda
List
getComponents()
List
getComponents(long start)
Retorna Todos los Componentes en la posicion Start
List
getComponentsBeforeEnd(long fromStart)
Retorna Todos los desde Start hasta el final del compas
List
getComponentsBetween(long start)
Retorna Todos los Componentes en la posicion Start
MeasureComponent
getFirstComponent()
Retorna el Primer Componente
int
getFirstNoteSpan()
int
getKeySignatureSpan()
MeasureComponent
getLastComponent()
Retorna el Ultimo Componente
int
getLastFromX()
Retorna la ultima posicion X asignada
int
getLastFromY()
Retorna la ultima posicion Y asignada
int
getMaxY()
Measure
getMeasure()
Retorna el Compas
int
getMinY()
MeasureComponent
getNextComponent(MeasureComponent component)
Retorna el Siguiente Componente
MeasureComponent
getNextNoteComponent(MeasureComponent component)
Retorna el Siguiente Componente que sea de una nota
MeasureComponent
getNextNoteComponent(MeasureComponent component, int string)
Retorna el Siguiente Componente en la cuerda.
MeasureComponent
getNextSilenceComponent(MeasureComponent component)
Retorna el Siguiente Componente que sea de un silencio
int
getPosX()
Retorna la posicion X dentro del compas
int
getPosY()
Retorna la posicion Y dentro del compas
MeasureComponent
getPreviousComponent(MeasureComponent component)
Retorna el Componente Anterior
int
getQuarterSpan()
Retorna el span de negras
int
getScoreSpan()
int
getSpan()
int
getSpanForComponent(MeasureComponent component)
InstrumentString
getStringAt(int y)
Retorna la cuerda en la posicion y
int
getTabHeight()
Retorna el alto de la tablatura
int
getTempoSpan()
int
getTimeSignatureSpan()
SongTrackCoords
getTrackCoords()
int
getTripletFeelSpan()
int
getWidth()
Retorna el ancho del Compas
boolean
hasCaret()
Retorna true si el Caret esta en este compas
boolean
hasTrack(int number)
boolean
isFirstMeasure()
Retorna true si es el primer compas
boolean
isFirstOfLine()
boolean
isLastMeasure()
Retorna true si es el ultimo compas
boolean
isOutOfBounds()
boolean
isPlaying()
Retorna true si se esta reproduciendo y la posicion del player esta en este compas.
void
paintCaret(ViewLayout layout, GC gc, int fromX, int fromY)
Pinta las notas
void
paintComponents(ViewLayout layout, GC gc, int fromX, int fromY, Rectangle clientArea)
Pinta las notas
void
paintMeasure(ViewLayout layout, GC gc, int fromX, int fromY, Rectangle clientArea)
void
paintMeasure(ViewLayout layout, GC gc, int fromX, int fromY, Rectangle clientArea, int spans)
Pinta el compas
void
playBeat(long start)
Reproduce las notas en el pulso
void
setCaret(Caret caret)
Asigna el Caret a este compas
void
setFirstOfLine(boolean firstOfLine)
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
setQuarterSpan(int quarterSpan)
Asigna el span de negras
void
setScoreSpan(int scoreSpan)
void
setSpan(int span)
void
update(ViewLayout layout)
Actualiza los valores para dibujar

Field Details

DEFAULT_CLEF_SPAN

public static final int DEFAULT_CLEF_SPAN
Espacio por defecto de la clave
Field Value:
40

DEFAULT_LEFT_SPAN

public static final int DEFAULT_LEFT_SPAN
Espacio por defecto a la izquierda
Field Value:
15

DEFAULT_QUARTER_SPAN

public static final int DEFAULT_QUARTER_SPAN
Espacio por defecto entre negra y negra
Field Value:
30

DEFAULT_RIGHT_SPAN

public static final int DEFAULT_RIGHT_SPAN
Espacio por defecto a la derecha
Field Value:
15

DEFAULT_TIME_SIGNATURE_SPAN

public static final int DEFAULT_TIME_SIGNATURE_SPAN
Espacio por defecto del timeSignature
Field Value:
40

SCORE_KEY_OFFSETS

public static final int[] SCORE_KEY_OFFSETS

Constructor Details

MeasureCoords

public MeasureCoords(SongManager songManager,
                     Tablature tablature,
                     Measure measure,
                     SongTrackCoords trackCoords)

Method Details

areInSameBeat

public boolean areInSameBeat(MeasureComponent arg0,
                             MeasureComponent arg1)

calculateMeasureChanges

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

calculateTabHeight

public void calculateTabHeight(ViewLayout layout)
Calcula el width del compas

calculateWidth

public void calculateWidth()
Calcula el width del compas

create

public void create(ViewLayout layout)
Crea los valores necesarios

getBeatLength

public long getBeatLength()

getCaret

public Caret getCaret()
Retorna el Caret

getClefSpan

public int getClefSpan()

getComponent

public MeasureComponent getComponent(long start)
Retorna Un Componente en la posicion start

getComponent

public MeasureComponent getComponent(long start,
                                     int string)
Retorna el Componente en la posicion Start, y en la cuerda

getComponentAt

public MeasureComponent getComponentAt(int x)
Retorna el componente mas cercano a X

getComponentOrSilence

public MeasureComponent getComponentOrSilence(long start,
                                              int string)
Retorna el Componente en la posicion Start, y en la cuerda

getComponents

public List getComponents()

getComponents

public List getComponents(long start)
Retorna Todos los Componentes en la posicion Start

getComponentsBeforeEnd

public List getComponentsBeforeEnd(long fromStart)
Retorna Todos los desde Start hasta el final del compas

getComponentsBetween

public List getComponentsBetween(long start)
Retorna Todos los Componentes en la posicion Start

getFirstComponent

public MeasureComponent getFirstComponent()
Retorna el Primer Componente

getFirstNoteSpan

public int getFirstNoteSpan()

getKeySignatureSpan

public int getKeySignatureSpan()

getLastComponent

public MeasureComponent getLastComponent()
Retorna el Ultimo Componente

getLastFromX

public int getLastFromX()
Retorna la ultima posicion X asignada

getLastFromY

public int getLastFromY()
Retorna la ultima posicion Y asignada

getMaxY

public int getMaxY()

getMeasure

public Measure getMeasure()
Retorna el Compas

getMinY

public int getMinY()

getNextComponent

public MeasureComponent getNextComponent(MeasureComponent component)
Retorna el Siguiente Componente

getNextNoteComponent

public MeasureComponent getNextNoteComponent(MeasureComponent component)
Retorna el Siguiente Componente que sea de una nota

getNextNoteComponent

public MeasureComponent getNextNoteComponent(MeasureComponent component,
                                             int string)
Retorna el Siguiente Componente en la cuerda. que sea de una nota

getNextSilenceComponent

public MeasureComponent getNextSilenceComponent(MeasureComponent component)
Retorna el Siguiente Componente que sea de un silencio

getPosX

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

getPosY

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

getPreviousComponent

public MeasureComponent getPreviousComponent(MeasureComponent component)
Retorna el Componente Anterior

getQuarterSpan

public int getQuarterSpan()
Retorna el span de negras

getScoreSpan

public int getScoreSpan()

getSpan

public int getSpan()

getSpanForComponent

public int getSpanForComponent(MeasureComponent component)

getStringAt

public InstrumentString getStringAt(int y)
Retorna la cuerda en la posicion y

getTabHeight

public int getTabHeight()
Retorna el alto de la tablatura

getTempoSpan

public int getTempoSpan()

getTimeSignatureSpan

public int getTimeSignatureSpan()

getTrackCoords

public SongTrackCoords getTrackCoords()

getTripletFeelSpan

public int getTripletFeelSpan()

getWidth

public int getWidth()
Retorna el ancho del Compas

hasCaret

public boolean hasCaret()
Retorna true si el Caret esta en este compas

hasTrack

public boolean hasTrack(int number)

isFirstMeasure

public boolean isFirstMeasure()
Retorna true si es el primer compas

isFirstOfLine

public boolean isFirstOfLine()

isLastMeasure

public boolean isLastMeasure()
Retorna true si es el ultimo compas

isOutOfBounds

public boolean isOutOfBounds()

isPlaying

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

paintCaret

public void paintCaret(ViewLayout layout,
                       GC gc,
                       int fromX,
                       int fromY)
Pinta las notas

paintComponents

public void paintComponents(ViewLayout layout,
                            GC gc,
                            int fromX,
                            int fromY,
                            Rectangle clientArea)
Pinta las notas

paintMeasure

public void paintMeasure(ViewLayout layout,
                         GC gc,
                         int fromX,
                         int fromY,
                         Rectangle clientArea)

paintMeasure

public void paintMeasure(ViewLayout layout,
                         GC gc,
                         int fromX,
                         int fromY,
                         Rectangle clientArea,
                         int spans)
Pinta el compas

playBeat

public void playBeat(long start)
Reproduce las notas en el pulso

setCaret

public void setCaret(Caret caret)
Asigna el Caret a este compas

setFirstOfLine

public void setFirstOfLine(boolean firstOfLine)

setOutOfBounds

public void setOutOfBounds(boolean outOfBounds)

setPosX

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

setPosY

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

setQuarterSpan

public void setQuarterSpan(int quarterSpan)
Asigna el span de negras

setScoreSpan

public void setScoreSpan(int scoreSpan)

setSpan

public void setSpan(int span)

update

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