|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.ui.ColorCache
public class ColorCache
Provides a cache for Color
objects. Colors should be obtained
using the get()
method; subsequent calls will not create a new
color object for the same coordinates, rather simply return the previously
created one. Note that color objects are immutable and thus can be reused.
Constructor Summary | |
---|---|
ColorCache()
|
Method Summary | |
---|---|
void |
clear()
Clear the cache. |
Color |
get(int r,
int g,
int b)
Return a color for the given coordinates. |
Color |
get(int r,
int g,
int b,
int a)
Return a color for the given coordinates. |
int |
size()
Return the number of Color objects cached. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ColorCache()
Method Detail |
---|
public void clear()
public Color get(int r, int g, int b)
public Color get(int r, int g, int b, int a)
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |