dguitar.gui
Class MusicCursorPosition

java.lang.Object
  extended bydguitar.gui.MusicCursorPosition

public class MusicCursorPosition
extends java.lang.Object

Author:
Mauricio Gracia Gutiérrez

Field Summary
private  boolean beat
          To know if the object is a beat or a bar
private  java.awt.Component guiComponent
          This object holds information about the GUI object where the MusciCursror will be draw.
private  int numBeat
          On which beat is the cursor located
private  int numMeasure
          On which measure is the cursor located
private  java.awt.Point point
          The point where this measure and beat is located
private  java.lang.Object songObject
          This object holds information about the current beat or bar
private  int width
          The graphical width of the Object
 
Constructor Summary
MusicCursorPosition()
          Creates en new MusicCursorPosition at measure 1 and beat 1
 
Method Summary
 java.awt.Component getGuiComponent()
           
 int getNumBeat()
           
 int getNumMeasure()
           
 java.awt.Point getPoint()
           
 java.lang.Object getSongObject()
           
 int getWidth()
           
 boolean isBeat()
           
 boolean isMTP()
           
 void setGuiComponent(java.awt.Component aGuiComponent)
           
 void setNumBeat(int numBeat)
           
 void setNumMeasure(int numMeasure)
           
 void setPoint(java.awt.Point point)
           
 boolean setSongObject(java.lang.Object obj)
           
 void setWidth(int width)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numMeasure

private int numMeasure
On which measure is the cursor located


numBeat

private int numBeat
On which beat is the cursor located


point

private java.awt.Point point
The point where this measure and beat is located


songObject

private java.lang.Object songObject
This object holds information about the current beat or bar


guiComponent

private java.awt.Component guiComponent
This object holds information about the GUI object where the MusciCursror will be draw.


beat

private boolean beat
To know if the object is a beat or a bar


width

private int width
The graphical width of the Object

Constructor Detail

MusicCursorPosition

public MusicCursorPosition()
Creates en new MusicCursorPosition at measure 1 and beat 1

Method Detail

getNumMeasure

public int getNumMeasure()
Returns:
Returns the numMeasure.

setNumBeat

public void setNumBeat(int numBeat)
Parameters:
numBeat - The numBeat to set.

setNumMeasure

public void setNumMeasure(int numMeasure)
Parameters:
numMeasure - The numMeasure to set.

getNumBeat

public int getNumBeat()
Returns:
Returns the numBeat.

toString

public java.lang.String toString()

setSongObject

public boolean setSongObject(java.lang.Object obj)
Parameters:
obj - The Bar or Beat you want the cursor to be associated with

isBeat

public boolean isBeat()
Returns:
Returns true if the cursor is linked to a beat.

isMTP

public boolean isMTP()
Returns:
Returns true if the cursor is linked to a bar

setPoint

public void setPoint(java.awt.Point point)
Parameters:
point - The point to set.

getPoint

public java.awt.Point getPoint()
Returns:
Returns the point.

setWidth

public void setWidth(int width)
Parameters:
width - The width to set.

getWidth

public int getWidth()
Returns:
Returns the width.

getSongObject

public java.lang.Object getSongObject()
Returns:
Returns the songObject.

setGuiComponent

public void setGuiComponent(java.awt.Component aGuiComponent)
Parameters:
aGuiComponent - The guiObject to set.

getGuiComponent

public java.awt.Component getGuiComponent()
Returns:
Returns the guiObject.