|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.java4less.rchart.gc.GraphicsProvider
public class GraphicsProvider
Use this class to create graphic objects like fonts, colors and images. This class provides a layer on the graphic implementation which allows rchart to be independent of platform.
Constructor Summary | |
---|---|
GraphicsProvider()
|
Method Summary | |
---|---|
static ChartImage |
createImage(int w,
int h)
create a new image of the given size |
static ChartImage |
createTransparentImage(int w,
int h,
ChartColor transparent)
create a new transparent image of the given size |
static ChartColor |
getColor(int red,
int green,
int blue)
|
static ChartColor |
getColor(java.lang.String c)
|
static ChartColor |
getColorFromObject(java.lang.Object o)
|
static ChartFont |
getFont(java.lang.String c,
int style,
int size)
create font from string value |
static ChartFont |
getFontFromObject(java.lang.Object o)
|
static ChartGraphics |
getGraphics(java.lang.Object o)
create Graphic context from awt (java.awt.Graphics) or swt (GC) graphic context |
static ChartImage |
getImage(java.lang.Object o)
create Image from awt (java.awt.Image) or swt image |
static ChartImage |
getImageFromFile(java.lang.String file)
create Image from file |
static void |
startUIThread(java.lang.Runnable r)
this starts a thread which can execute UI operations (required by SWT) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphicsProvider()
Method Detail |
---|
public static ChartColor getColor(java.lang.String c)
public static ChartColor getColor(int red, int green, int blue)
public static ChartColor getColorFromObject(java.lang.Object o)
public static ChartFont getFont(java.lang.String c, int style, int size)
c
- name of the fontstyle
- ChartFont.PLAIN, ChartFont.BOLD or ChartFont.ITALICsize
- size of the font
public static ChartFont getFontFromObject(java.lang.Object o)
public static ChartGraphics getGraphics(java.lang.Object o)
o
-
public static ChartImage getImage(java.lang.Object o)
o
-
public static ChartImage getImageFromFile(java.lang.String file)
file
- filename
public static ChartImage createImage(int w, int h)
w
- widthh
- height
public static ChartImage createTransparentImage(int w, int h, ChartColor transparent)
w
- widthh
- height
public static void startUIThread(java.lang.Runnable r)
r
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |