Class AbstractDocumentViewer
- java.lang.Object
-
- com.stepover.opensignatureapi.viewer.AbstractDocumentViewer
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
SoDefaultDocumentViewer
public abstract class AbstractDocumentViewer extends java.lang.Object implements java.lang.Runnable
the base abstract class for all document viewers
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDeviceButton[]
buttons
The buttons.protected int
currentPage
The current page.protected DocumentRenderer
documentRenderer
The document renderer.protected boolean
forceRender
The is viewing.protected boolean
isViewing
The is viewing.static byte
LCD_BUTTON_NEXT_PAGE
The Constant LCD_BUTTON_NEXT_PAGE.static byte
LCD_BUTTON_PREV_PAGE
The Constant LCD_BUTTON_PREV_PAGE.static byte
LCD_BUTTON_ROTATE
The Constant LCD_BUTTON_ROTATE.static byte
LCD_BUTTON_START_SIGN
The Constant LCD_BUTTON_START_SIGN.static byte
LCD_BUTTON_ZOOM_IN
The Constant LCD_BUTTON_ZOOM_IN.static byte
LCD_BUTTON_ZOOM_OUT
The Constant LCD_BUTTON_ZOOM_OUT.protected java.util.logging.Logger
log
The log.protected int
maxZoom
The max zoom.protected int
pageCount
The page count.protected javax.imageio.stream.ImageInputStream[]
pageImages
The page images.protected SoSigningDevice
signingDevice
The signing device.protected boolean
softStop
The soft stop.protected int
zoomLevel
The zoom level.
-
Constructor Summary
Constructors Constructor Description AbstractDocumentViewer()
AbstractDocumentViewer(DocumentRenderer documentRenderer, SoSigningDevice signingDevice)
Instantiates a new abstract document viewer.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
forceRender()
Force render.int
getCurrentPage()
Gets the current page.int
getPageCount()
Gets the page count.int
getZoomLevel()
Gets the zoom level.void
handleButtons()
protected boolean
render()
Render.abstract void
run()
Run.void
setZoomLevel(int zoomLevel)
Sets the zoom level.void
stopViewing()
Stop viewing.void
stopViewingSoftly()
Stop viewing softly.
-
-
-
Field Detail
-
LCD_BUTTON_ZOOM_IN
public static final byte LCD_BUTTON_ZOOM_IN
The Constant LCD_BUTTON_ZOOM_IN.- See Also:
- Constant Field Values
-
LCD_BUTTON_ZOOM_OUT
public static final byte LCD_BUTTON_ZOOM_OUT
The Constant LCD_BUTTON_ZOOM_OUT.- See Also:
- Constant Field Values
-
LCD_BUTTON_NEXT_PAGE
public static final byte LCD_BUTTON_NEXT_PAGE
The Constant LCD_BUTTON_NEXT_PAGE.- See Also:
- Constant Field Values
-
LCD_BUTTON_PREV_PAGE
public static final byte LCD_BUTTON_PREV_PAGE
The Constant LCD_BUTTON_PREV_PAGE.- See Also:
- Constant Field Values
-
LCD_BUTTON_START_SIGN
public static final byte LCD_BUTTON_START_SIGN
The Constant LCD_BUTTON_START_SIGN.- See Also:
- Constant Field Values
-
LCD_BUTTON_ROTATE
public static final byte LCD_BUTTON_ROTATE
The Constant LCD_BUTTON_ROTATE.- See Also:
- Constant Field Values
-
pageImages
protected javax.imageio.stream.ImageInputStream[] pageImages
The page images.
-
buttons
protected AbstractDeviceButton[] buttons
The buttons.
-
documentRenderer
protected DocumentRenderer documentRenderer
The document renderer.
-
signingDevice
protected SoSigningDevice signingDevice
The signing device.
-
currentPage
protected int currentPage
The current page.
-
zoomLevel
protected int zoomLevel
The zoom level.
-
maxZoom
protected final int maxZoom
The max zoom.- See Also:
- Constant Field Values
-
pageCount
protected int pageCount
The page count.
-
log
protected java.util.logging.Logger log
The log.
-
isViewing
protected volatile boolean isViewing
The is viewing.
-
softStop
protected volatile boolean softStop
The soft stop.
-
forceRender
protected volatile boolean forceRender
The is viewing.
-
-
Constructor Detail
-
AbstractDocumentViewer
public AbstractDocumentViewer()
-
AbstractDocumentViewer
public AbstractDocumentViewer(DocumentRenderer documentRenderer, SoSigningDevice signingDevice)
Instantiates a new abstract document viewer.- Parameters:
documentRenderer
- the document renderer
-
-
Method Detail
-
stopViewing
public void stopViewing()
Stop viewing.
-
stopViewingSoftly
public void stopViewingSoftly()
Stop viewing softly.
-
forceRender
public void forceRender()
Force render.
-
getCurrentPage
public int getCurrentPage()
Gets the current page.- Returns:
- the current page
-
getPageCount
public int getPageCount()
Gets the page count.- Returns:
- the page count
-
getZoomLevel
public int getZoomLevel()
Gets the zoom level.- Returns:
- the zoom level
-
setZoomLevel
public void setZoomLevel(int zoomLevel)
Sets the zoom level.- Parameters:
zoomLevel
- the new zoom level
-
run
public abstract void run()
Run.- Specified by:
run
in interfacejava.lang.Runnable
-
render
protected boolean render()
Render.
-
handleButtons
public void handleButtons()
-
-