|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcookxml.cookswt.util.SwtUtils
SWT useful utilities.
| Field Summary | |
static boolean |
autoDisposeColor
automatically dispose Color resource |
static boolean |
autoDisposeCursor
automatically dispose Image resource |
static boolean |
autoDisposeFont
automatically dispose Font resource |
static boolean |
autoDisposeImage
automatically dispose Image resource |
| Constructor Summary | |
SwtUtils()
|
|
| Method Summary | |
static void |
attachColorDisposeListener(Widget widget,
Color color)
Attach a DisposeListener that dispose the resource when the widget object is disposed. |
static void |
attachCursorDisposeListener(Widget widget,
Cursor cursor)
Attach a DisposeListener that dispose the resource when the widget object is disposed. |
static void |
attachFontDisposeListener(Widget widget,
Font font)
Attach a DisposeListener that dispose the resource when the widget object is disposed. |
static void |
attachImageDisposeListener(Widget widget,
Image image)
Attach a DisposeListener that dispose the resource when the widget object is disposed. |
static void |
attachToolItemDropDownMenu(ToolItem item,
Menu menu)
Attach a dropdown menu to a drop down ToolItem. |
static void |
disposeColor(Color color,
Device device)
Dispose a color if it is not a system color. |
static boolean |
disposeDebug(String msg)
This function is supposed to work in conjunction with assert to generate a debug message but does not really throw an Exception |
static void |
disposeImage(Image image,
Display device)
Dispose a color if it is not a system color. |
static boolean |
isSystemColor(Color color,
Device device)
Check if a color is a system color. |
static boolean |
isSystemCursor(Cursor cursor,
Display display)
Check if a color is a system color. |
static boolean |
isSystemFont(Font font,
Device device)
Check if a color is a system color. |
static boolean |
isSystemImage(Image image,
Display display)
Check if a color is a system color. |
static void |
showDisplay(Display display)
Open all the shells inside the Display object and dispose the Display after all shells are disposed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean autoDisposeColor
public static boolean autoDisposeFont
public static boolean autoDisposeImage
public static boolean autoDisposeCursor
| Constructor Detail |
public SwtUtils()
| Method Detail |
public static boolean isSystemColor(Color color,
Device device)
color - The color to be disposed.device - The device that contains the color.
public static boolean isSystemCursor(Cursor cursor,
Display display)
cursor - The cursor to be disposed.display - The display device.
public static boolean isSystemImage(Image image,
Display display)
image - The image to be disposed.display - The display device.
public static boolean isSystemFont(Font font,
Device device)
font - The font to be disposed.device - The display device.
public static void disposeColor(Color color,
Device device)
color - The color to be disposed.device - The device that contains the color.
public static void disposeImage(Image image,
Display device)
image - The image to be disposed.device - The device that contains the color.
public static void attachColorDisposeListener(Widget widget,
Color color)
widget - the widget to listen to.color - the resource to be disposed.
public static void attachCursorDisposeListener(Widget widget,
Cursor cursor)
widget - the widget to listen to.cursor - the resource to be disposed.
public static void attachFontDisposeListener(Widget widget,
Font font)
widget - the widget to listen to.font - the resource to be disposed.
public static void attachImageDisposeListener(Widget widget,
Image image)
widget - the widget to listen to.image - the resource to be disposed.
public static void attachToolItemDropDownMenu(ToolItem item,
Menu menu)
item - the drop down tool itemmenu - the drop down menupublic static void showDisplay(Display display)
display - the Display object.public static boolean disposeDebug(String msg)
msg - the message to be printed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||