to top
Datalogic APIs
public class

GoodReadOverlayManager

extends Object
java.lang.Object
   ↳ com.datalogic.decode.GoodReadOverlayManager

Class Overview

GoodReadOverlayManager is a class used to install and manage the Good Read's custom overlays.
When a new barcode is read and the property GOOD_READ_OVERLAY_ENABLE is enabled an overlay is show.
This class manage the custom overlays used when GOOD_READ_OVERLAY_SHAPE_POLICY set to CUSTOM. To select the overlay name (the filename excluding the extension) must be set in the propriety GOOD_READ_OVERLAY_CUSTOM_SHAPE_NAME_PROFILE.

Summary

Nested Classes
enum GoodReadOverlayManager.PersistenceType Enumerative representing the persistence type of the installed overlays. 
Public Methods
int add(String path, GoodReadOverlayManager.PersistenceType persistenceType)
Adds a new good read overlay image by specifying a png file.
List<String> getCustomOverlayNames()
Returns a list of the available custom overlays.
static GoodReadOverlayManager getInstance()
Gets an instance of the GoodReadOverlayImageInstaller, if it is supported by the platform.
int remove(String name)
Remove the custom overlay of the specified name.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public int add (String path, GoodReadOverlayManager.PersistenceType persistenceType)

Added in revision 41

Adds a new good read overlay image by specifying a png file. If the image share the same filename of another image already installed the second image will be overwritten.

Parameters
path The full path to a png file of the image.
persistenceType The type of persistence required for this overlay. Can only be reboot or enterprise reset persistent.
Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public List<String> getCustomOverlayNames ()

Added in revision 41

Returns a list of the available custom overlays. The names consist of the filename of the images installed (excluding the extensions).

Returns
  • The available custom overlay names, the list is empty if no custom overlay is available.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.

public static GoodReadOverlayManager getInstance ()

Added in revision 41

Gets an instance of the GoodReadOverlayImageInstaller, if it is supported by the platform.

Returns
  • A GoodReadOverlayImageInstaller object if supported, null otherwise.

public int remove (String name)

Added in revision 41

Remove the custom overlay of the specified name.

Parameters
name The Good Read Overlay's name. The name consists of the filename of the image installed (excluding the extension).
Returns
  • DecodeException.SUCCESS in case it succeeds, otherwise it returns an error code if the exceptions are disabled or throws a DecodeException in case the exceptions are enabled.
Throws
DecodeException in case of error, when exceptions are enabled through the ErrorManager singleton.