|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdguitar.gui.ColorScheme
This class lets you associate durations of beats or notes to a color a ColorScheme has at this moment 8 colors inside or 1 unique color.
| Field Summary | |
private java.awt.Color[] |
colors
|
private java.awt.Color |
uniqueColor
|
| Constructor Summary | |
ColorScheme()
Creates a new instance of ColorScheme, withe de default colors |
|
ColorScheme(java.awt.Color c)
Creates a new instance of ColorScheme, where all colors are set to C |
|
| Method Summary | |
protected java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
java.awt.Color |
getColor()
returns the unique color |
java.awt.Color |
getColor(GPDuration duration)
returns the color for a Given GP duration |
java.awt.Color |
getColor(int pos)
returns the color for the position |
void |
gradientDarkerUntil(java.awt.Color base,
int delta)
the maximum value for delta is 31, asuming base is Color.BLACK ; |
void |
gradientLighterFrom(java.awt.Color base,
int delta)
the maximum value for delta is 31, asuming base is Color.BLACK ; |
boolean |
isUniqueColor()
|
void |
setColor(java.awt.Color color)
Sets the uniqueColor |
boolean |
setColor(java.awt.Color color,
int pos)
Sets the color for the position |
void |
setColors(java.awt.Color[] array)
|
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.awt.Color uniqueColor
private java.awt.Color[] colors
| Constructor Detail |
public ColorScheme()
public ColorScheme(java.awt.Color c)
| Method Detail |
public void gradientLighterFrom(java.awt.Color base,
int delta)
public void gradientDarkerUntil(java.awt.Color base,
int delta)
public void setColors(java.awt.Color[] array)
public boolean isUniqueColor()
public boolean setColor(java.awt.Color color,
int pos)
color for the position
public void setColor(java.awt.Color color)
public java.awt.Color getColor()
public java.awt.Color getColor(int pos)
public java.awt.Color getColor(GPDuration duration)
public boolean equals(java.lang.Object obj)
The equals method implements an equivalence relation on
non-null object references:
x,x.equals(x) should return
true.
x and y,x.equals(y) should
return true if and only if y.equals(x)
returns true.
x,y, and z, if
x.equals(y) returns true and
y.equals(z) returns true, then
x.equals(z) should return true.
x and y, multiple invocations of
x.equals(y) consistently return true or
consistently return false, provided no information used
in equals comparisons on the objects is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects; that
is, for any non-null reference values x and y,
this method returns true if and only if x
and y refer to the same object (x == y has
the value true).
Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.
obj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Object.hashCode(),
Hashtableprotected java.lang.Object clone()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||