|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This interface represents a single Key on a musical keyboard. It can be selected (pressed) or not.
| Field Summary | |
|---|---|
static int |
A
Constants for the number of a key inside one octave |
static int |
AIS
Constants for the number of a key inside one octave |
static int |
B
Constants for the number of a key inside one octave |
static int |
C
Constants for the number of a key inside one octave |
static int |
CIS
Constants for the number of a key inside one octave |
static int |
D
Constants for the number of a key inside one octave |
static int |
DIS
Constants for the number of a key inside one octave |
static int |
E
Constants for the number of a key inside one octave |
static int |
F
Constants for the number of a key inside one octave |
static int |
FIS
Constants for the number of a key inside one octave |
static int |
G
Constants for the number of a key inside one octave |
static int |
GIS
Constants for the number of a key inside one octave |
static int |
OCTAVE_0
Constants for the offsets of each octave |
static int |
OCTAVE_1
Constants for the offsets of each octave |
static int |
OCTAVE_2
Constants for the offsets of each octave |
static int |
OCTAVE_3
Constants for the offsets of each octave |
static int |
OCTAVE_4
Constants for the offsets of each octave |
static int |
OCTAVE_5
Constants for the offsets of each octave |
static int |
OCTAVE_6
Constants for the offsets of each octave |
static int |
OCTAVE_7
Constants for the offsets of each octave |
static int |
OCTAVE_8
Constants for the offsets of each octave |
static int |
OCTAVE_9
Constants for the offsets of each octave |
static int |
OCTAVE_MINUS_1
Constants for the offsets of each octave |
| Method Summary | |
|---|---|
void |
addKeyListener(KeyboardKeyListener listener)
Add a KeyListener that will be notified, when this key is pressed or released |
boolean |
getHold()
|
int |
getKey()
Get the note value represented by this key. |
boolean |
isPressed()
Return whether this key is currently pressed or not |
void |
press()
Press this key. |
void |
release()
Release this key.y |
void |
removeKeyListener(KeyboardKeyListener listener)
Remove a previously registeres KeyListener from this key |
void |
setHold(boolean hold)
|
| Field Detail |
|---|
static final int A
static final int AIS
static final int B
static final int C
static final int CIS
static final int D
static final int DIS
static final int E
static final int F
static final int FIS
static final int G
static final int GIS
static final int OCTAVE_0
static final int OCTAVE_1
static final int OCTAVE_2
static final int OCTAVE_3
static final int OCTAVE_4
static final int OCTAVE_5
static final int OCTAVE_6
static final int OCTAVE_7
static final int OCTAVE_8
static final int OCTAVE_9
static final int OCTAVE_MINUS_1
| Method Detail |
|---|
void addKeyListener(KeyboardKeyListener listener)
listener - The KeyListener to addboolean getHold()
int getKey()
OCTAVE_MINUS_1 + C) to 127
(OCTAVE_9 + G.boolean isPressed()
void press()
void release()
void removeKeyListener(KeyboardKeyListener listener)
listener - The KeyListener to removevoid setHold(boolean hold)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||