|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvitro.grid.GridAnnotation
public class GridAnnotation
GridAnnotations allow users to overlay an array of Colors on their Grid's View.
Field Summary | |
---|---|
Map<Point,Color> |
coloring
A mapping between positions on the Grid and their Color. |
Constructor Summary | |
---|---|
GridAnnotation(Collection<Location> colored,
Color color)
Create a new GridAnnotation. |
|
GridAnnotation(Map<Location,? extends Number> scaling,
Color colorMin,
Color colorMax)
Create a new GridAnnotation. |
|
GridAnnotation(Map<Location,Color> colored)
Create a new GridAnnotation. |
Method Summary | ||
---|---|---|
protected static
|
calculateScaling(Map<K,? extends Number> scaling,
Color colorMin,
Color colorMax)
Generate a scaled gradient between two colors based on the values specified in the "scaling" table. |
|
int |
compareTo(Object o)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Map<Point,Color> coloring
Constructor Detail |
---|
public GridAnnotation(Collection<Location> colored, Color color)
colored
- the Locations to Color.color
- a Color to apply to every specified Location.public GridAnnotation(Map<Location,Color> colored)
colored
- a mapping from Locations to their desired Color.public GridAnnotation(Map<Location,? extends Number> scaling, Color colorMin, Color colorMax)
scaling
- the values associated with specific Locations.colorMin
- the color to assign to the lowest value in values from scaling.colorMax
- the color to assign to the highest value in value from scaling.Method Detail |
---|
protected static <K> Map<K,Color> calculateScaling(Map<K,? extends Number> scaling, Color colorMin, Color colorMax)
scaling
- the values associated with specific Locations.colorMin
- the color to assign to the lowest value in values from scaling.colorMax
- the color to assign to the highest value in value from scaling.
public int compareTo(Object o)
compareTo
in interface Comparable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |