|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jtreemap.ktreemap.example.ResourceManager
public class ResourceManager
Utility class for managing OS resources associated with SWT controls such as
colors, fonts, images, etc. !!! IMPORTANT !!! Application code must
explicitly invoke the dispose()
method to release the
operating system resources managed by cached objects when those objects and
OS resources are no longer needed (e.g. on application shutdown) This class
may be freely distributed as part of any application or plugin.
Copyright (c) 2003, Instantiations, Inc.
All Rights Reserved
Constructor Summary | |
---|---|
ResourceManager()
|
Method Summary | |
---|---|
static org.eclipse.swt.graphics.Image |
decorateImage(org.eclipse.swt.graphics.Image baseImage,
org.eclipse.swt.graphics.Image decorator)
|
static void |
dispose()
Dispose of cached objects and their underlying OS resources. |
static void |
disposeColors()
dispose colors |
static void |
disposeCursors()
dispose cursors |
static void |
disposeFonts()
dispose fonts |
static void |
disposeImages()
dispose images |
static void |
fixCoolBarSize(org.eclipse.swt.widgets.CoolBar bar)
|
static org.eclipse.swt.graphics.Font |
getBoldFont(org.eclipse.swt.graphics.Font baseFont)
|
static org.eclipse.swt.graphics.Color |
getColor(int systemColorID)
|
static org.eclipse.swt.graphics.Color |
getColor(int r,
int g,
int b)
|
static org.eclipse.swt.graphics.Color |
getColor(org.eclipse.swt.graphics.RGB rgb)
|
static org.eclipse.swt.graphics.Cursor |
getCursor(int id)
|
static org.eclipse.swt.graphics.Font |
getFont(java.lang.String name,
int height,
int style)
|
static org.eclipse.swt.graphics.Image |
getImage(java.lang.Class clazz,
java.lang.String path)
|
static org.eclipse.swt.graphics.Image |
getImage(org.eclipse.jface.resource.ImageDescriptor descriptor)
|
static org.eclipse.swt.graphics.Image |
getImage(java.lang.String path)
|
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(java.lang.Class clazz,
java.lang.String path)
|
static org.eclipse.jface.resource.ImageDescriptor |
getImageDescriptor(java.lang.String path)
|
static org.eclipse.swt.graphics.Font |
getItalicFont(org.eclipse.swt.graphics.Font baseFont)
|
static org.eclipse.swt.graphics.Image |
getPluginImage(java.lang.Object plugin,
java.lang.String name)
|
static org.eclipse.jface.resource.ImageDescriptor |
getPluginImageDescriptor(java.lang.Object plugin,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ResourceManager()
Method Detail |
---|
public static org.eclipse.swt.graphics.Image decorateImage(org.eclipse.swt.graphics.Image baseImage, org.eclipse.swt.graphics.Image decorator)
baseImage
- decorator
-
public static void dispose()
public static void disposeColors()
public static void disposeCursors()
public static void disposeFonts()
public static void disposeImages()
public static void fixCoolBarSize(org.eclipse.swt.widgets.CoolBar bar)
bar
- public static org.eclipse.swt.graphics.Font getBoldFont(org.eclipse.swt.graphics.Font baseFont)
baseFont
-
public static org.eclipse.swt.graphics.Color getColor(int systemColorID)
systemColorID
-
public static org.eclipse.swt.graphics.Color getColor(int r, int g, int b)
r
- g
- b
-
public static org.eclipse.swt.graphics.Color getColor(org.eclipse.swt.graphics.RGB rgb)
rgb
-
public static org.eclipse.swt.graphics.Cursor getCursor(int id)
id
-
public static org.eclipse.swt.graphics.Font getFont(java.lang.String name, int height, int style)
name
- height
- style
-
public static org.eclipse.swt.graphics.Image getImage(java.lang.Class clazz, java.lang.String path)
clazz
- path
-
public static org.eclipse.swt.graphics.Image getImage(org.eclipse.jface.resource.ImageDescriptor descriptor)
descriptor
-
public static org.eclipse.swt.graphics.Image getImage(java.lang.String path)
path
-
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.Class clazz, java.lang.String path)
clazz
- path
-
public static org.eclipse.jface.resource.ImageDescriptor getImageDescriptor(java.lang.String path)
path
-
public static org.eclipse.swt.graphics.Font getItalicFont(org.eclipse.swt.graphics.Font baseFont)
baseFont
-
public static org.eclipse.swt.graphics.Image getPluginImage(java.lang.Object plugin, java.lang.String name)
plugin
- name
-
public static org.eclipse.jface.resource.ImageDescriptor getPluginImageDescriptor(java.lang.Object plugin, java.lang.String name)
plugin
- name
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |