Class powersoft.jcm.ui.UiUtil
All Packages Class Hierarchy This Package Previous Next Index
Class powersoft.jcm.ui.UiUtil
java.lang.Object
|
+----powersoft.jcm.ui.UiUtil
- public class UiUtil
- extends Object
Provides generic user interface related utility functions.
-
UiUtil()
-
-
createGrayedImage(Component, Image)
- Creates an image which is a grayed version of the given image.
-
drawGrayedString(Component, Graphics, String, int, int)
- Draws grayed text.
-
getEventDescription(Event, boolean)
-
-
paintFocusRect(Component, Graphics, int, int, int, int)
- Paints a focus rectangle.
-
waitForImage(Component, Image)
- Waits for the given image to be completely loaded before returning.
UiUtil
public UiUtil()
waitForImage
public static void waitForImage(Component comp,
Image image)
- Waits for the given image to be completely loaded before returning.
- Parameters:
- comp - The component with which the image is associated.
- image - The image to wait for.
paintFocusRect
public static void paintFocusRect(Component comp,
Graphics g,
int x,
int y,
int width,
int height)
- Paints a focus rectangle.
- Parameters:
- comp - The component with which the focus rectangle is associated.
- g - The graphics context on which to draw.
- x - The x coordinate of the rectangle.
- y - The y coordinate of the rectangle.
- width - The width of the rectangle.
- height - The height of the rectangle.
drawGrayedString
public static void drawGrayedString(Component comp,
Graphics g,
String str,
int x,
int y)
- Draws grayed text.
- Parameters:
- comp - The component on which the text is to be drawn.
- g - The graphics context on which to draw the text.
- str - The string to draw.
- x - The x coordinate of the text starting point.
- y - The y coordinate of the text starting point.
createGrayedImage
public static Image createGrayedImage(Component comp,
Image image)
- Creates an image which is a grayed version of the given image.
This method does not return until the image is completely created.
- Parameters:
- comp - The component with which the image is associated.
- image - The image for which a grayed version will be created.
getEventDescription
public static String getEventDescription(Event e,
boolean verbose)
- Returns:
- A string describing the given AWT event.
All Packages Class Hierarchy This Package Previous Next Index