Class ResourcePool
java.lang.Object
org.eclipse.nebula.paperclips.core.internal.util.ResourcePool
public class ResourcePool
extends java.lang.Object
Manages a pool of graphics resources for a graphics device (fonts, colors).
-
Method Summary
Modifier and Type Method Description static ResourcePool
forDevice(org.eclipse.swt.graphics.Device device)
Returns a SharedGraphics which creates resources on the given device.org.eclipse.swt.graphics.Color
getColor(org.eclipse.swt.graphics.RGB rgb)
Returns a color for the passed in RGB.org.eclipse.swt.graphics.Font
getFont(org.eclipse.swt.graphics.FontData fontData)
Returns a font for the passed in FontData.
-
Method Details
-
forDevice
Returns a SharedGraphics which creates resources on the given device.- Parameters:
device
- the device which resources will be created on.- Returns:
- a SharedGraphics which creates resources on the given device.
-
getFont
public org.eclipse.swt.graphics.Font getFont(org.eclipse.swt.graphics.FontData fontData)Returns a font for the passed in FontData.- Parameters:
fontData
- FontData describing the required font.- Returns:
- a font for the passed in FontData.
-
getColor
public org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)Returns a color for the passed in RGB.- Parameters:
rgb
- RGB describing the required color.- Returns:
- a color for the passed in RGB.
-