public class PropertiesResources
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,org.eclipse.swt.graphics.Color> |
colors
the colors
|
private java.util.Map<java.lang.String,org.eclipse.swt.graphics.Font> |
fonts
the fonts
|
Constructor and Description |
---|
PropertiesResources()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes the SWT resources.
|
org.eclipse.swt.graphics.Color |
getColor(java.lang.String key)
Gets the color associated with the given key.
|
org.eclipse.swt.graphics.Font |
getFont(java.lang.String key)
Gets the font associated with the given key.
|
void |
put(java.lang.String key,
org.eclipse.swt.graphics.Color color)
Puts the given color.
|
void |
put(java.lang.String key,
org.eclipse.swt.graphics.Font font)
Puts the given font.
|
void |
removeColor(java.lang.String key)
Removes the color associated with the given key.
|
void |
removeFont(java.lang.String key)
Removes the font associated with the given key.
|
private java.util.Map<java.lang.String,org.eclipse.swt.graphics.Font> fonts
private java.util.Map<java.lang.String,org.eclipse.swt.graphics.Color> colors
public org.eclipse.swt.graphics.Font getFont(java.lang.String key)
key
- the key associated with the font to getpublic org.eclipse.swt.graphics.Color getColor(java.lang.String key)
key
- the key associated with the color to getpublic void put(java.lang.String key, org.eclipse.swt.graphics.Font font)
When the resource won't be used, the resource should be disposed and removed.
key
- the key for given fontfont
- the font to be storedpublic void put(java.lang.String key, org.eclipse.swt.graphics.Color color)
key
- the key for given colorcolor
- the color to be storedpublic void removeFont(java.lang.String key)
key
- the key associated with the font to be removedpublic void removeColor(java.lang.String key)
key
- the key associated with the color to be removedpublic void dispose()