German English
German English

signoPAD-API Java - Starting Points

The starting points described below are possible for signature capture. The first step always entails selecting the facade based on the device, technology or connection type you wish to use. This facade is then used to create a SigPadDevice object which represents a connected signature device. In the final step, an instance of the SigPadApi class is generated for SigPadDevice. SigPadApi is the most important class when you are using the signature device.

See Interface description for details.

SigPadFacade

One of the three starting points is the de.signotec.stpad.api.SigPadFacade class. It provides general methods for initialising and using signoPAD-API Java and should always be used, provided the platform-dependent libraries for Windows and Linux can be used.

As this is a Singleton class, there is no public constructor; the call is via the getInstance() method. In a second step, initializeApi() must be called to initialise the interface. Step 3 is the calling of the getSignatureDevices() method, which returns all connected pads as SigPadDevice objects. With an object like this, the actual main functionality can then be called in the SigPadApi class. When all operations have finished, finalizeApi() is called to correctly end signoPAD-API Java. Applications, which only need occasional access to the signature device, can execute this process in full for each signature; however, the API should generally be initialised at the start of the application and finalised upon termination.

The call sequence is shown schematically below:

Java
SigPadFacade facade = SigPadFacade.getInstance();
// initialize
facade.initializeApi();
// search for devices
SigPadDevice[] pads = facade.getSignatureDevices();
// create API for device
SigPadApi padApi = new SigPadApi(pads[0]);
// some custom operations
padApi.XXX();
// clean up
facade.finalizeApi();

SigPadPureFacade

The second starting point is the de.signotec.stpad.api.SigPadPureFacade class. It provides general methods for initialising and using signoPAD-API Java and can only be used if a signotec LCD signature pad is connected via Ethernet in the LAN. The advantage of this starting point is that no platform-dependent libraries are used, which means there is no restriction to Windows and Linux.

As this is a Singleton class, there is no public constructor; the call is via the getInstance() method. In a second step, the getSignatureDevices() method must be called to search for a connected pad that can be returned as SigPadDevice. With this object, the actual main functionality can then be called in the SigPadApi class.

The call sequence is shown schematically below:

Java
SigPadPureFacade facade = SigPadPureFacade.getInstance();
// search for devices
String address = "192.168.100.100";
int port = 1002;
SigPadDevice[] pads = facade.getSignatureDevices(address, port, false);
// create API for device
SigPadApi padApi = new SigPadApi(pads[0]);
// some custom operations
padApi.XXX();

PenDisplayFacade

The third starting point is the de.signotec.stpad.api.PenDisplayFacade class. It provides the option to capture a signature using the pen on a pen display, such as the signotec Delta PD, or using the mouse on the desktop. The graphical Swing component SignatureJPanel or SignatureCanvas is used as an input area.

The pen signature differs greatly in quality from the mouse signature. The accuracy of the points captured with the mouse corresponds to the screen resolution. The accuracy is generally several times higher when using the pen, depending on the digitiser. The mouse only offers two pressure values (button pressed/button not pressed). Over 1,000 pressure values are possible with the pen.

Drivers are required for capturing with the pen. See the following sections: JPen library and JWinPointer library.

Using this class involves taking three steps.

  1. Creating a new instance with the getInstance() method.

  2. Configuring the pen display properties such as the serial number, size and resolution of the capture area and whether a pen and/or mouse is active.

  3. Calling the getSignatureDevice() method, which returns a SigPadDevice instance that can be used to call the actual main functionality in the SigPadApi class.

The call sequence is shown schematically below:

Java
SigPadApi.setSerialKey("myCompanyKey");
PenDisplayFacade facade = PenDisplayFacade.getInstance();
// set the serial number "1111" of the device
facade.setSerialNumber(1111L);
// use pen only, not the mouse
facade.setPenEnabled(true);
facade.setMouseEnabled(false);
// record the pen in area 320x240
facade.setDisplaySize(320, 240);
// create device
SigPadDevice device1 = facade.getSignatureDevice();
if (device1 != null) {
    SigPadApi padApi = new SigPadApi(device1);
    // open/connect device
    SignatureJPanel panel = new SignatureJPanel(padApi, 320, 240);
    padApi.openDevice(panel);
    // custom operations
    padApi.XXX();
}

The facade’s range of functions is restricted by a watermark when capturing and displaying the signature. The watermark can be removed by purchasing a licence from signotec GmbH. See section Licence keys.