CONTENTS

Using clip arts

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.

Builtin clip art panel

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" >

You can keep your clip arts in another subdirectory. In that case specify it with the applet parameter clipart_dir relative to the applet's directory.

By default clip arts dropped on the canvas can be resized or rotated. If you don't want the user do it you can control this by the applet paramener paint_options, for example:

<param name="paint_options"  value="cliparts_resizable:false; cliparts_rotatable:true;" >

 

Standalone clip art panel

Clipart panel is a standalone (independant) applet included in the package. It can hold clip arts arranged in rows and columns. The panel can be placed anywhere on the web page (or in a different frame or iframe). The user can drag the clip arts and drop them to the editor's canvas.

Here is an example how to put the clip art panel on a page:

<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="tooltips" 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)
tooltips The list of labels to be displayed when the user moves the mouse over the clip arts.