| java.lang.Object example.photoalbum.TestChart
TestChart | class TestChart (Code) | | 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.
|
Constructor Summary | |
public | TestChart(int width, int height) Initialize a new TestPattern to match the requested size. |
Method Summary | |
public Vector | generateImages() Generate the frames for this animated chart. | public void | paint(Graphics g) Draw the current frame. |
barSize | int barSize(Code) | | Size of the Bar chart used for width and height
|
fh | int fh(Code) | | height of the font
|
font | Font font(Code) | | Font used for drawing text
|
frameno | int frameno(Code) | | The current frame number
|
h | int h(Code) | | Height of the canvas
|
pad | int pad(Code) | | Padding used between items
|
pieSize | int pieSize(Code) | | Size of the Pie chart used for width and height
|
titleHeight | int titleHeight(Code) | | Height of the title
|
w | int w(Code) | | Width of the canvas
|
TestChart | public TestChart(int width, int height)(Code) | | Initialize a new TestPattern to match the requested size.
Parameters: width - the requested width of the Images Parameters: height - the requested height of the Images |
generateImages | public Vector generateImages()(Code) | | Generate the frames for this animated chart.
It consists of hour frames with the first frame
containing only the base, and frame 2,3,4 adding
the colors to the bars of the bar chart.
the Vector of Images. |
paint | public void paint(Graphics g)(Code) | | Draw the current frame.
The field frameno contains the current frame number.
Parameters: g - the Graphics context |
|
|