|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.jface.resource.ResourceRegistry
org.eclipse.jface.resource.ColorRegistry
com.tensegrity.gui.swt.SwtColorRegistry
This is the main class for administing colors within the SWT package. Every class which has to keep references to SWT Color objects, should use this class.
Right now we extend the ColorRegistry class provided by jface. Since this class does not provide a method for removing colors, we probably have to write our own registry class if memory consumption becomes a big problem.
| Field Summary |
| Fields inherited from class org.eclipse.jface.resource.ColorRegistry |
display, displayRunnable |
| Method Summary | |
boolean |
contains(org.eclipse.swt.graphics.RGB color)
Checks if the specified color is already known |
org.eclipse.swt.graphics.Color |
get(org.eclipse.swt.graphics.RGB color)
Returns a Color instance corresponding to the given RGB object, or null, if the registry doesn't have one |
static SwtColorRegistry |
getInstance()
Returns the used SwtColorRegistry instance. |
java.lang.String |
getKeyFor(org.eclipse.swt.graphics.RGB color)
Returns a key for the specified color |
java.lang.String |
put(org.eclipse.swt.graphics.RGB color)
Adds the specified color to the registry and returns a generate key |
| Methods inherited from class org.eclipse.jface.resource.ColorRegistry |
clearCaches, get, getKeySet, getRGB, hasValueFor, put |
| Methods inherited from class org.eclipse.jface.resource.ResourceRegistry |
addListener, fireMappingChanged, removeListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static final SwtColorRegistry getInstance()
public final java.lang.String put(org.eclipse.swt.graphics.RGB color)
color - an RGB instance which describes this color
public final org.eclipse.swt.graphics.Color get(org.eclipse.swt.graphics.RGB color)
color - an RGB object to create the color from
public final java.lang.String getKeyFor(org.eclipse.swt.graphics.RGB color)
color - RGB instance to create a key for
public final boolean contains(org.eclipse.swt.graphics.RGB color)
color - a RGB instance
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||