|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.rngtng.launchpad.LColor
public class LColor
The Color class, to handle the MIDI Color and Mode codes
Field Summary | |
---|---|
static int |
BUFFERED
|
static int |
FLASHING
|
static int |
GREEN_HIGH
|
static int |
GREEN_LOW
|
static int |
GREEN_MEDIUM
|
static int |
GREEN_OFF
|
static int |
GREEN_OFFSET
|
static int |
HIGH
|
static int |
LOW
|
static int |
MEDIUM
|
static int |
NORMAL
|
static int |
OFF
|
static int |
RED_HIGH
|
static int |
RED_LOW
|
static int |
RED_MEDIUM
|
static int |
RED_OFF
|
static int |
YELLOW_HIGH
|
static int |
YELLOW_LOW
|
static int |
YELLOW_MEDIUM
|
static int |
YELLOW_OFF
|
Constructor Summary | |
---|---|
LColor()
creates default black color |
|
LColor(int _color)
creates color with given red/green and mode value |
|
LColor(int red,
int green)
creates color with given red and green value, green can be 0-3 or Constants |
|
LColor(int red,
int green,
int mode)
creates color with given red and green value, green can be 0-3 or Constants |
Method Summary | |
---|---|
int |
getGreen()
Returns the value of green |
int |
getMode()
Returns the value of mode |
int |
getRed()
Returns the value of Red |
boolean |
is(int color)
Compares color with given int value |
boolean |
is(LColor color)
Compares color with given LColor value |
boolean |
isGreen(int green)
Compares red color value with given int value |
boolean |
isMode(int mode)
Compares red color value with given int value |
boolean |
isRed(int red)
Compares red color value with given int value |
void |
setGreen(int green)
Set the value of green |
void |
setMode(int mode)
Set the value of mode |
void |
setRed(int red)
Set the value of Red |
int |
velocity()
Calculates the MIDI data 2 value (velocity) for given brightness and mode values. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OFF
public static final int LOW
public static final int MEDIUM
public static final int HIGH
public static final int RED_OFF
public static final int RED_LOW
public static final int RED_MEDIUM
public static final int RED_HIGH
public static final int GREEN_OFFSET
public static final int GREEN_OFF
public static final int GREEN_LOW
public static final int GREEN_MEDIUM
public static final int GREEN_HIGH
public static final int YELLOW_OFF
public static final int YELLOW_LOW
public static final int YELLOW_MEDIUM
public static final int YELLOW_HIGH
public static final int BUFFERED
public static final int FLASHING
public static final int NORMAL
Constructor Detail |
---|
public LColor()
public LColor(int red, int green)
red
- red valuegreen
- green valuepublic LColor(int red, int green, int mode)
red
- Red valuegreen
- Green valuemode
- Mode valuepublic LColor(int _color)
_color
- color valueMethod Detail |
---|
public int velocity()
public int getRed()
public void setRed(int red)
red
- public int getGreen()
public void setGreen(int green)
green
- public int getMode()
public void setMode(int mode)
mode
- public boolean is(int color)
color
-
public boolean is(LColor color)
color
-
public boolean isRed(int red)
red
-
public boolean isGreen(int green)
green
-
public boolean isMode(int mode)
mode
-
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |