Class NativeDevice
- java.lang.Object
 - 
- com.stepover.opensignatureapi.device.SoSigningDevice
 - 
- com.stepover.opensignatureapi.device.nat.NativeDevice
 
 
 
- 
- All Implemented Interfaces:
 MessageReceiver,SoHidDevice,SigningDevice
- Direct Known Subclasses:
 NativeColorDevice,NativeMonochromeDevice
public abstract class NativeDevice extends SoSigningDevice implements SigningDevice, MessageReceiver, SoHidDevice
the base class for all devices used by the native service provider 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNativeDevice.Buttonstatic classNativeDevice.ButtonStatestatic classNativeDevice.DeviceTypestatic classNativeDevice.DocViewButtonstatic classNativeDevice.Modestatic classNativeDevice.PadColordefines the color of signature pad buttons- 
Nested classes/interfaces inherited from interface org.jopensignature.sign.SigningDevice
SigningDevice.UnsupportedMessageException 
- 
Nested classes/interfaces inherited from interface com.stepover.opensignatureapi.device.nat.SoHidDevice
SoHidDevice.ButtonEventListener, SoHidDevice.ImageType 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description static intDEVICE_TYPEstatic intGUTTER_HORI_SIZE_PIXELstatic intGUTTER_VERT_SIZE_PIXELprotected purejavahidapi.HidDevicehidDevicestatic intLCD_HEIGHT_PIXELstatic intLCD_WIDTH_PIXELprotected NativeDevice.Modemodeprotected NativeBasenativeBasestatic intSIGN_INFO_HEIGHT- 
Fields inherited from class com.stepover.opensignatureapi.device.SoSigningDevice
bioData, capabilities, configuration, documentRenderer, documentViewer, GEN12, GEN13, identifier, log, signer, signingDeviceInfo, threads 
 - 
 
- 
Constructor Summary
Constructors Constructor Description NativeDevice()NativeDevice(purejavahidapi.HidDevice hidDevice) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddButtonEventListener(SoHidDevice.ButtonEventListener buttonEventListener)voidclose()voiddisconnect(purejavahidapi.HidDevice hidDevice)SoSigningDeviceCapabilitiesgetCapabilities()Returns the device capabilities.static java.lang.Object[]getDeviceInfo(purejavahidapi.HidDevice hidDevice)static NativeDevice.DeviceTypegetDeviceType(purejavahidapi.HidDevice hidDevice)purejavahidapi.HidDevicegetHidDevice()java.lang.StringgetIdentifier()Returns a unique identifier of the SigningDevice.SigningDeviceInfogetInfo(java.util.Locale locale)NativeBasegetNativeBase()voidsetMode(NativeDevice.Mode mode)voidsetMode(NativeDevice.Mode mode, java.lang.Byte parameter)- 
Methods inherited from class com.stepover.opensignatureapi.device.SoSigningDevice
getBioData, getConfiguration, getDocumentViewer, getRenderer, getSigner, getSignImage, getThreadExecuter, isGeneration, registerHandlers, send, setBioData, setDocumentViewer, setIdentifier, setRenderer, sleep 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface com.stepover.opensignatureapi.device.messages.MessageReceiver
send 
- 
Methods inherited from interface org.jopensignature.sign.SigningDevice
send 
- 
Methods inherited from interface com.stepover.opensignatureapi.device.nat.SoHidDevice
configureMode, setButtonState, setSignatureRectangle, startButtonEventThread, uploadImage 
 - 
 
 - 
 
- 
- 
Field Detail
- 
hidDevice
protected purejavahidapi.HidDevice hidDevice
 
- 
nativeBase
protected NativeBase nativeBase
 
- 
mode
protected NativeDevice.Mode mode
 
- 
DEVICE_TYPE
public static final int DEVICE_TYPE
- See Also:
 - Constant Field Values
 
 
- 
LCD_WIDTH_PIXEL
public static final int LCD_WIDTH_PIXEL
- See Also:
 - Constant Field Values
 
 
- 
LCD_HEIGHT_PIXEL
public static final int LCD_HEIGHT_PIXEL
- See Also:
 - Constant Field Values
 
 
- 
GUTTER_VERT_SIZE_PIXEL
public static final int GUTTER_VERT_SIZE_PIXEL
- See Also:
 - Constant Field Values
 
 
- 
GUTTER_HORI_SIZE_PIXEL
public static final int GUTTER_HORI_SIZE_PIXEL
- See Also:
 - Constant Field Values
 
 
- 
SIGN_INFO_HEIGHT
public static final int SIGN_INFO_HEIGHT
- See Also:
 - Constant Field Values
 
 
 - 
 
- 
Method Detail
- 
getHidDevice
public purejavahidapi.HidDevice getHidDevice()
 
- 
getNativeBase
public NativeBase getNativeBase()
 
- 
getCapabilities
public SoSigningDeviceCapabilities getCapabilities()
Description copied from interface:SigningDeviceReturns the device capabilities.- Specified by:
 getCapabilitiesin interfaceSigningDevice- Overrides:
 getCapabilitiesin classSoSigningDevice- Returns:
 
 
- 
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:SigningDeviceReturns a unique identifier of the SigningDevice. TheSignatureServiceProviderimplementation has to ensure that all theSigningDevices it returns have a unique identifier. Identifiers forSigningDevices coming from differentSignatureServiceProviders might have overlapping identifiers.- Specified by:
 getIdentifierin interfaceSigningDevice- Overrides:
 getIdentifierin classSoSigningDevice- Returns:
 
 
- 
getInfo
public SigningDeviceInfo getInfo(java.util.Locale locale)
- Specified by:
 getInfoin interfaceSigningDevice- Overrides:
 getInfoin classSoSigningDevice- Parameters:
 locale- the locale in which theSigningDeviceInfoshall be returned. Iflocaleisnull,Locale.getDefault()shall be used. If there is no matching translation is available, the implementation shall use the closest substitute. How a substitute is selected is up to the implementation. We encourage to follow the guidelines ofResourceBundle.
 
- 
setMode
public void setMode(NativeDevice.Mode mode) throws java.io.IOException
- Specified by:
 setModein interfaceSoHidDevice- Throws:
 java.io.IOException
 
- 
setMode
public void setMode(NativeDevice.Mode mode, java.lang.Byte parameter) throws java.io.IOException
- Specified by:
 setModein interfaceSoHidDevice- Throws:
 java.io.IOException
 
- 
addButtonEventListener
public void addButtonEventListener(SoHidDevice.ButtonEventListener buttonEventListener)
- Specified by:
 addButtonEventListenerin interfaceSoHidDevice
 
- 
disconnect
public void disconnect(purejavahidapi.HidDevice hidDevice)
- Specified by:
 disconnectin interfaceSoHidDevice
 
- 
close
public void close()
- Specified by:
 closein interfaceSigningDevice- Overrides:
 closein classSoSigningDevice
 
- 
getDeviceType
public static NativeDevice.DeviceType getDeviceType(purejavahidapi.HidDevice hidDevice)
 
- 
getDeviceInfo
public static java.lang.Object[] getDeviceInfo(purejavahidapi.HidDevice hidDevice)
 
 - 
 
 -