CIC iSign Version 1.2

InkTools
Class CicUtilsEx

java.lang.Object
  |
  +--InkTools.CicUtils
        |
        +--InkTools.CicUtilsEx
All Implemented Interfaces:
java.awt.print.Printable

public class CicUtilsEx
extends CicUtils
implements java.awt.print.Printable

This is the general utiliy class for Cic's InkTools package in its extended version.

Note: this class requires the JRE 1.3 and above, due to the PCL related Methods. Use CicUtils for JRE 1.1 compatibility.

It covers two areas: helper functions for what is called HTTP Tunneling and helper functions to convert signatures into images.

A HTTP form can communicate with a servlet through GET and POST requests. Java's 'java.net' package provides classes that can be utilized to establish a direct HTTP communication between an applet and a servlet, a technique known as HTTP Tunneling. If the URL of the servlet is known, an applet can simple call the functions 'httpGet' or 'httpPost' to send requests and receive the servlet response.

Often it is reqired to display ink data or signatures as an image rather than redisplay it in an InkControl. The 'createJpegImage' will create a Jpeg image from a signature, as does 'createGifImage' and 'createPclImage'.

Version:
1.1
Author:
CIC

Field Summary
static int CIC_PCL_NOERROR
           
static int CIC_PCL_NOPRINTSERVICE
           
static int CIC_PCL_PRINTERROR
           
static int CIC_PCL_PRINTTOFILENOTSUPPORTED
           
static int CIC_PCL_UNKNOWNMODE
           
 
Fields inherited from class InkTools.CicUtils
BMP_FILE, GIF_FILE, JPEG_FILE, PNG_FILE, TIFF_FILE
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
CicUtilsEx()
          Constructs a CicUtils object.
 
Method Summary
 int createPclImage(CicDoodle doodle, int width, int height, int mode, java.lang.String fileName)
          Creates a PCL image from the ink of a CicDoodle and writes it to disk.
 int print(java.awt.Graphics g, java.awt.print.PageFormat pf, int pageIndex)
          Called internally by createPclImage
 
Methods inherited from class InkTools.CicUtils
createGifImage, createGifImage, createGifImageEx, createJpegImage, createJpegImage, createJpegImageEx, createSignatureImage, createSignatureImageEx, getSigImage, getSigImage, getSigImageEx, httpGet, httpPost, setImageInkWidth, setImageOptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CIC_PCL_NOERROR

public static final int CIC_PCL_NOERROR
See Also:
Constant Field Values

CIC_PCL_NOPRINTSERVICE

public static final int CIC_PCL_NOPRINTSERVICE
See Also:
Constant Field Values

CIC_PCL_PRINTERROR

public static final int CIC_PCL_PRINTERROR
See Also:
Constant Field Values

CIC_PCL_UNKNOWNMODE

public static final int CIC_PCL_UNKNOWNMODE
See Also:
Constant Field Values

CIC_PCL_PRINTTOFILENOTSUPPORTED

public static final int CIC_PCL_PRINTTOFILENOTSUPPORTED
See Also:
Constant Field Values
Constructor Detail

CicUtilsEx

public CicUtilsEx()
Constructs a CicUtils object.

Method Detail

createPclImage

public int createPclImage(CicDoodle doodle,
                          int width,
                          int height,
                          int mode,
                          java.lang.String fileName)
Creates a PCL image from the ink of a CicDoodle and writes it to disk.

Note: This function requires Java 1.4

Parameters:
doodle - the ink which should get transformed into an image
width - the width of the image
height - the height of the image
mode - the display mode (FIT_TO_CONTROL or NORMAL_INK)
fileName - the file name under which the image should get written onto the hard disk
Returns:
a code indicating the action taken

print

public int print(java.awt.Graphics g,
                 java.awt.print.PageFormat pf,
                 int pageIndex)
Called internally by createPclImage

Specified by:
print in interface java.awt.print.Printable

CIC iSign Version 1.2