|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexample.photoalbum.TestChart
class TestChart
A quick sample of graphics which generates a series of images that can be used as a sample animation. The animation consists of a title, a pie, and a bar chart. The charts are sized to the requested size so they will look good on devices with various screen sizes.
Field Summary | |
---|---|
(package private) int |
barSize
Size of the Bar chart used for width and height |
(package private) int |
fh
height of the font |
(package private) javax.microedition.lcdui.Font |
font
Font used for drawing text |
(package private) int |
frameno
The current frame number |
(package private) int |
h
Height of the canvas |
(package private) int |
pad
Padding used between items |
(package private) int |
pieSize
Size of the Pie chart used for width and height |
(package private) int |
titleHeight
Height of the title |
(package private) int |
w
Width of the canvas |
Constructor Summary | |
---|---|
TestChart(int width,
int height)
Initialize a new TestPattern to match the requested size. |
Method Summary | |
---|---|
java.util.Vector |
generateImages()
Generate the frames for this animated chart. |
void |
paint(javax.microedition.lcdui.Graphics g)
Draw the current frame. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
int w
int h
javax.microedition.lcdui.Font font
int fh
int titleHeight
int pad
int pieSize
int barSize
int frameno
Constructor Detail |
---|
public TestChart(int width, int height)
width
- the requested width of the Imagesheight
- the requested height of the ImagesMethod Detail |
---|
public java.util.Vector generateImages()
public void paint(javax.microedition.lcdui.Graphics g)
g
- the Graphics context
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |