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 class
NativeDevice.Button
static class
NativeDevice.ButtonState
static class
NativeDevice.DeviceType
static class
NativeDevice.DocViewButton
static class
NativeDevice.Mode
static class
NativeDevice.PadColor
defines 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 int
DEVICE_TYPE
static int
GUTTER_HORI_SIZE_PIXEL
static int
GUTTER_VERT_SIZE_PIXEL
protected purejavahidapi.HidDevice
hidDevice
static int
LCD_HEIGHT_PIXEL
static int
LCD_WIDTH_PIXEL
protected NativeDevice.Mode
mode
protected NativeBase
nativeBase
static int
SIGN_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 void
addButtonEventListener(SoHidDevice.ButtonEventListener buttonEventListener)
void
close()
void
disconnect(purejavahidapi.HidDevice hidDevice)
SoSigningDeviceCapabilities
getCapabilities()
Returns the device capabilities.static java.lang.Object[]
getDeviceInfo(purejavahidapi.HidDevice hidDevice)
static NativeDevice.DeviceType
getDeviceType(purejavahidapi.HidDevice hidDevice)
purejavahidapi.HidDevice
getHidDevice()
java.lang.String
getIdentifier()
Returns a unique identifier of the SigningDevice.SigningDeviceInfo
getInfo(java.util.Locale locale)
NativeBase
getNativeBase()
void
setMode(NativeDevice.Mode mode)
void
setMode(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:SigningDevice
Returns the device capabilities.- Specified by:
getCapabilities
in interfaceSigningDevice
- Overrides:
getCapabilities
in classSoSigningDevice
- Returns:
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:SigningDevice
Returns a unique identifier of the SigningDevice. TheSignatureServiceProvider
implementation has to ensure that all theSigningDevice
s it returns have a unique identifier. Identifiers forSigningDevice
s coming from differentSignatureServiceProvider
s might have overlapping identifiers.- Specified by:
getIdentifier
in interfaceSigningDevice
- Overrides:
getIdentifier
in classSoSigningDevice
- Returns:
-
getInfo
public SigningDeviceInfo getInfo(java.util.Locale locale)
- Specified by:
getInfo
in interfaceSigningDevice
- Overrides:
getInfo
in classSoSigningDevice
- Parameters:
locale
- the locale in which theSigningDeviceInfo
shall be returned. Iflocale
isnull
,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:
setMode
in interfaceSoHidDevice
- Throws:
java.io.IOException
-
setMode
public void setMode(NativeDevice.Mode mode, java.lang.Byte parameter) throws java.io.IOException
- Specified by:
setMode
in interfaceSoHidDevice
- Throws:
java.io.IOException
-
addButtonEventListener
public void addButtonEventListener(SoHidDevice.ButtonEventListener buttonEventListener)
- Specified by:
addButtonEventListener
in interfaceSoHidDevice
-
disconnect
public void disconnect(purejavahidapi.HidDevice hidDevice)
- Specified by:
disconnect
in interfaceSoHidDevice
-
close
public void close()
- Specified by:
close
in interfaceSigningDevice
- Overrides:
close
in classSoSigningDevice
-
getDeviceType
public static NativeDevice.DeviceType getDeviceType(purejavahidapi.HidDevice hidDevice)
-
getDeviceInfo
public static java.lang.Object[] getDeviceInfo(purejavahidapi.HidDevice hidDevice)
-
-