sound.piano
Class PianoKey

java.lang.Object
  extended by java.awt.geom.RectangularShape
      extended by java.awt.geom.Rectangle2D
          extended by java.awt.Rectangle
              extended by sound.piano.PianoKey
All Implemented Interfaces:
java.awt.Shape, java.io.Serializable, java.lang.Cloneable

public class PianoKey
extends java.awt.Rectangle

Copyright 2005, DocJava, Inc. User: dlyon Date: Oct 23, 2006 Time: 7:05:38 PM

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D
java.awt.geom.Rectangle2D.Double, java.awt.geom.Rectangle2D.Float
 
Field Summary
 
Fields inherited from class java.awt.Rectangle
height, width, x, y
 
Fields inherited from class java.awt.geom.Rectangle2D
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP
 
Constructor Summary
PianoKey(KeyboardPanel keyboardPanel, int x, int y, int width, int height, int num)
           
 
Method Summary
 int getNoteNumber()
           
 int getNoteState()
           
static int getVelocity()
           
 boolean isNoteOn()
           
 void off()
           
 void on()
           
 void setNoteNumber(int noteNumber)
           
 void setNoteState(int state)
           
 java.lang.String toString()
           
 
Methods inherited from class java.awt.Rectangle
add, add, add, contains, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, translate, union
 
Methods inherited from class java.awt.geom.Rectangle2D
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union
 
Methods inherited from class java.awt.geom.RectangularShape
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.awt.Shape
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects
 

Constructor Detail

PianoKey

public PianoKey(KeyboardPanel keyboardPanel,
                int x,
                int y,
                int width,
                int height,
                int num)
Method Detail

toString

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

isNoteOn

public boolean isNoteOn()

off

public void off()

on

public void on()

setNoteState

public void setNoteState(int state)

getVelocity

public static int getVelocity()

getNoteNumber

public int getNoteNumber()

setNoteNumber

public void setNoteNumber(int noteNumber)

getNoteState

public int getNoteState()