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.Runnablethe base abstract class for all document viewers
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractDeviceButton[]buttonsThe buttons.protected intcurrentPageThe current page.protected DocumentRendererdocumentRendererThe document renderer.protected booleanforceRenderThe is viewing.protected booleanisViewingThe is viewing.static byteLCD_BUTTON_NEXT_PAGEThe Constant LCD_BUTTON_NEXT_PAGE.static byteLCD_BUTTON_PREV_PAGEThe Constant LCD_BUTTON_PREV_PAGE.static byteLCD_BUTTON_ROTATEThe Constant LCD_BUTTON_ROTATE.static byteLCD_BUTTON_START_SIGNThe Constant LCD_BUTTON_START_SIGN.static byteLCD_BUTTON_ZOOM_INThe Constant LCD_BUTTON_ZOOM_IN.static byteLCD_BUTTON_ZOOM_OUTThe Constant LCD_BUTTON_ZOOM_OUT.protected java.util.logging.LoggerlogThe log.protected intmaxZoomThe max zoom.protected intpageCountThe page count.protected javax.imageio.stream.ImageInputStream[]pageImagesThe page images.protected SoSigningDevicesigningDeviceThe signing device.protected booleansoftStopThe soft stop.protected intzoomLevelThe 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 voidforceRender()Force render.intgetCurrentPage()Gets the current page.intgetPageCount()Gets the page count.intgetZoomLevel()Gets the zoom level.voidhandleButtons()protected booleanrender()Render.abstract voidrun()Run.voidsetZoomLevel(int zoomLevel)Sets the zoom level.voidstopViewing()Stop viewing.voidstopViewingSoftly()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:
runin interfacejava.lang.Runnable
-
render
protected boolean render()
Render.
-
handleButtons
public void handleButtons()
-
-