com.cloudgarden.resource
Class SWTResourceManager
java.lang.Object
com.cloudgarden.resource.SWTResourceManager
public class SWTResourceManager
- extends java.lang.Object
Class to manage SWT resources (Font, Color, Image and Cursor)
There are no restrictions on the use of this code.
You may change this code and your changes will not be overwritten,
but if you change the version number below then this class will be
completely overwritten by Jigloo.
#SWTResourceManager:version4.0.0#
Method Summary |
static void |
dispose()
|
static org.eclipse.swt.graphics.Color |
getColor(int red,
int green,
int blue)
|
static org.eclipse.swt.graphics.Cursor |
getCursor(int type)
|
static org.eclipse.swt.graphics.Font |
getFont(java.lang.String name,
int size,
int style)
|
static org.eclipse.swt.graphics.Font |
getFont(java.lang.String name,
int size,
int style,
boolean strikeout,
boolean underline)
|
static org.eclipse.swt.graphics.Image |
getImage(java.lang.String url)
|
static org.eclipse.swt.graphics.Image |
getImage(java.lang.String url,
org.eclipse.swt.widgets.Control widget)
|
static void |
registerResourceUser(org.eclipse.swt.widgets.Widget widget)
This method should be called by *all* Widgets which use resources
provided by this SWTResourceManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SWTResourceManager
public SWTResourceManager()
registerResourceUser
public static void registerResourceUser(org.eclipse.swt.widgets.Widget widget)
- This method should be called by *all* Widgets which use resources
provided by this SWTResourceManager. When widgets are disposed,
they are removed from the "users" Vector, and when no more
registered Widgets are left, all resources are disposed.
If this method is not called for all Widgets then it should not be called
at all, and the "dispose" method should be explicitly called after all
resources are no longer being used.
dispose
public static void dispose()
getFont
public static org.eclipse.swt.graphics.Font getFont(java.lang.String name,
int size,
int style)
getFont
public static org.eclipse.swt.graphics.Font getFont(java.lang.String name,
int size,
int style,
boolean strikeout,
boolean underline)
getImage
public static org.eclipse.swt.graphics.Image getImage(java.lang.String url,
org.eclipse.swt.widgets.Control widget)
getImage
public static org.eclipse.swt.graphics.Image getImage(java.lang.String url)
getColor
public static org.eclipse.swt.graphics.Color getColor(int red,
int green,
int blue)
getCursor
public static org.eclipse.swt.graphics.Cursor getCursor(int type)
Copyright © 2007-2008 AGH University of Science and Technology. All Rights Reserved.