|
ElegantJ Gauges Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.elegantj.gauges.Kit
com.elegantj.gauges.GfxKit
Utility class to draw the gauge
| Constructor Summary | |
GfxKit()
|
|
| Method Summary | |
static java.lang.String |
clipString(java.lang.String text,
java.awt.FontMetrics fm,
int availableWidth)
Clips the given string to the available width |
static void |
drawCenteredString(java.awt.Graphics g,
java.lang.String str,
java.awt.Dimension rect,
java.awt.FontMetrics fm)
Renders a String centered within a given rectangle |
static void |
drawCenteredString(java.awt.Graphics g,
java.lang.String str,
int width,
int height,
java.awt.FontMetrics fm)
Renders a String centered within a given rectangle |
static void |
drawCenteredString(java.awt.Graphics g,
java.lang.String str,
java.awt.Rectangle rect,
java.awt.FontMetrics fm)
Renders a String centered within a given rectangle |
static void |
drawHorizontal(java.awt.Graphics g,
int x1,
int x2,
int y)
Draws horizontal line |
static void |
drawPixel(java.awt.Graphics g,
int x,
int y)
Draws a single pixel |
static void |
drawVertical(java.awt.Graphics g,
int y1,
int y2,
int x)
Draws vertical line |
static java.awt.Image |
loadImage(java.lang.String imageFilename)
Load an image file (GIF or JPEG) |
static void |
wipeImage(java.awt.Image image,
java.awt.Color color,
java.awt.image.ImageObserver observer)
Wipes an image to some background color |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GfxKit()
| Method Detail |
public static void drawHorizontal(java.awt.Graphics g,
int x1,
int x2,
int y)
g - graphics contextx1 - x-cordinate of starting location of the linex2 - x-cordinate of ending location of the liney - y-cordinate of the line
public static void drawVertical(java.awt.Graphics g,
int y1,
int y2,
int x)
g - graphics contexty1 - y-cordinate of starting location of the liney2 - y-cordinate of ending location of the linex - x-cordinate of the line
public static void drawPixel(java.awt.Graphics g,
int x,
int y)
g - graphics contextx - x-cordinate of the pixely - y-cordinate of the pixel
public static void wipeImage(java.awt.Image image,
java.awt.Color color,
java.awt.image.ImageObserver observer)
image - a background imagecolor - color of the imageobserver - imageObserver is used to draw image
public static void drawCenteredString(java.awt.Graphics g,
java.lang.String str,
int width,
int height,
java.awt.FontMetrics fm)
g - graphics contextstr - a string which is drawnwidth - width of the rectangle in which string is renderedheight - height of the rectangle in which string is renderedfm - fontmetrics represents font
public static void drawCenteredString(java.awt.Graphics g,
java.lang.String str,
java.awt.Dimension rect,
java.awt.FontMetrics fm)
g - graphics contextstr - a string which is drawnrect - Specifies rectangle in which string is renderedfm - fontmetrics represents font
public static void drawCenteredString(java.awt.Graphics g,
java.lang.String str,
java.awt.Rectangle rect,
java.awt.FontMetrics fm)
g - graphics contextstr - a string which is drawnrect - Specifies rectangle in which string is renderedfm - fontmetrics represents fontpublic static java.awt.Image loadImage(java.lang.String imageFilename)
imageFilename - name of the image file
public static java.lang.String clipString(java.lang.String text,
java.awt.FontMetrics fm,
int availableWidth)
|
ElegantJ Gauges Java API Specification v1.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||