Clip arts are GIF in PNG, or JPEG images which the user can insert in his/her drawing. There are 2 methods to display cliparts for insertion.
Copy your clip art files in the subdirectory cliparts of the applet's directory
and specify their names with the parameter "cliparts", for example:
<param name="cliparts" value="flower.gif, bird.gif, cat.gif" >Note:
clipart_dir relative to the applet's directory.Clipart panel is a standalone (independant) applet included in the package.
It can hold clip arts arranged in rows and columns. You can place it on any web page (the same or another).
The user can drag the clip arts from the panel and drop them to the editor's canvas.
To put the clip art panel on a page use the following code:
<applet width="210" height="42" code="ClipartPanel.class" codebase="../applet" archive="clipartpanel.jar" >
<param name="clipart_dir" value="cliparts/">
<param name="cliparts" value="apple.gif, carrot.gif, cherry.gif, flower.gif, ladybird.gif" >
<param name="titles" value="Apple, Carrot, Cherry, Flower, Ladybird" >
</applet>
This will look as follows:
Parameters of the clipart panel:clipart_dir | The directory of clip art files.
It should be specfied as URL (either absolute or relative to the clipartpanel.jar).
By default the clip arts are searched in the subdirectory cliparts
of the applet's directory. |
cliparts | Comma separated list of clipart files. |
layout | Specifis how to layout cliparts on the panel.
Possible values: horizontal, vertical, grid.
The default is horizontal. |
rows | Number of rows for grid layout. |
cols | Number of columns for grid layout. |
gap | Gap between clip arts in pixels. The default gap is 1. |
bgcolor | The panel background color specified as #RRGGBB |
fgcolor | The color used to outline cliparts when mouse goes over (as #RRGGBB) |
titles | The list of labels to be displayed when the user moves the mouse over the clip arts. |