blob: 4fbbc2bc43655ce00e49a8d7efb78a16a3def65d [file] [log] [blame]
//------------------------------------------------------------------------------
//
// This software is provided "AS IS". The JavaPOS working group (including
// each of the Corporate members, contributors and individuals) MAKES NO
// REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE,
// EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
// WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NON-INFRINGEMENT. The JavaPOS working group shall not be liable for
// any damages suffered as a result of using, modifying or distributing this
// software or its derivatives.Permission to use, copy, modify, and distribute
// the software and its documentation for any purpose is hereby granted.
//
// POSPrinter.java - A JavaPOS 1.14.0 device control
//
//------------------------------------------------------------------------------
package jpos;
import jpos.events.*;
import jpos.services.*;
import java.util.Vector;
import jpos.loader.*;
public class POSPrinter
extends BaseJposControl
implements POSPrinterControl114, JposConst
{
//--------------------------------------------------------------------------
// Variables
//--------------------------------------------------------------------------
protected POSPrinterService12 service12;
protected POSPrinterService13 service13;
protected POSPrinterService14 service14;
protected POSPrinterService15 service15;
protected POSPrinterService16 service16;
protected POSPrinterService17 service17;
protected POSPrinterService18 service18;
protected POSPrinterService19 service19;
protected POSPrinterService110 service110;
protected POSPrinterService111 service111;
protected POSPrinterService112 service112;
protected POSPrinterService113 service113;
protected POSPrinterService114 service114;
protected Vector directIOListeners;
protected Vector errorListeners;
protected Vector outputCompleteListeners;
protected Vector statusUpdateListeners;
//--------------------------------------------------------------------------
// Constructor
//--------------------------------------------------------------------------
public POSPrinter()
{
// Initialize base class instance data
deviceControlDescription = "JavaPOS POSPrinter Device Control";
deviceControlVersion = deviceVersion114;
// Initialize instance data. Initializations are commented out for
// efficiency if the Java default is correct.
//service12 = null;
//service13 = null;
//service14 = null;
//service15 = null;
//service16 = null;
//service17 = null;
//service18 = null;
//service19 = null;
//service110 = null;
//service111 = null;
//service112 = null;
//service113 = null;
//service114 = null;
directIOListeners = new Vector();
errorListeners = new Vector();
outputCompleteListeners = new Vector();
statusUpdateListeners = new Vector();
}
//--------------------------------------------------------------------------
// Capabilities
//--------------------------------------------------------------------------
public int getCapCharacterSet()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapCharacterSet();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapConcurrentJrnRec()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapConcurrentJrnRec();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapConcurrentJrnSlp()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapConcurrentJrnSlp();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapConcurrentRecSlp()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapConcurrentRecSlp();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapCoverSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapCoverSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrn2Color()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrn2Color();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnBold()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnBold();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnDhigh()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnDhigh();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnDwide()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnDwide();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnDwideDhigh()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnDwideDhigh();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnEmptySensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnEmptySensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnItalic()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnItalic();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnNearEndSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnNearEndSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnPresent()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnPresent();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapJrnUnderline()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapJrnUnderline();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRec2Color()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRec2Color();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecBarCode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecBarCode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecBitmap()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecBitmap();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecBold()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecBold();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecDhigh()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecDhigh();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecDwide()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecDwide();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecDwideDhigh()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecDwideDhigh();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecEmptySensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecEmptySensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecItalic()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecItalic();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecLeft90()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecLeft90();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecNearEndSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecNearEndSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecPapercut()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecPapercut();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecPresent()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecPresent();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecRight90()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecRight90();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecRotate180()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecRotate180();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecStamp()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecStamp();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecUnderline()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapRecUnderline();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlp2Color()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlp2Color();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpBarCode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpBarCode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpBitmap()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpBitmap();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpBold()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpBold();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpDhigh()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpDhigh();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpDwide()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpDwide();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpDwideDhigh()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpDwideDhigh();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpEmptySensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpEmptySensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpFullslip()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpFullslip();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpItalic()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpItalic();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpLeft90()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpLeft90();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpNearEndSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpNearEndSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpPresent()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpPresent();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpRight90()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpRight90();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpRotate180()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpRotate180();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpUnderline()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapSlpUnderline();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapTransaction()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCapTransaction();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapPowerReporting()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.3.0
if(serviceVersion < deviceVersion13)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.3.0 compliant.");
}
// Perform the operation
try
{
return service13.getCapPowerReporting();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapJrnCartridgeSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapJrnCartridgeSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapJrnColor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapJrnColor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapRecCartridgeSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapRecCartridgeSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapRecColor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapRecColor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapRecMarkFeed()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapRecMarkFeed();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpBothSidesPrint()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapSlpBothSidesPrint();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapSlpCartridgeSensor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapSlpCartridgeSensor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapSlpColor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCapSlpColor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapMapCharacterSet()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.7.0
if(serviceVersion < deviceVersion17)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.7.0 compliant.");
}
// Perform the operation
try
{
return service17.getCapMapCharacterSet();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapStatisticsReporting()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.8.0
if(serviceVersion < deviceVersion18)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.8.0 compliant.");
}
// Perform the operation
try
{
return service18.getCapStatisticsReporting();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapUpdateStatistics()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.8.0
if(serviceVersion < deviceVersion18)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.8.0 compliant.");
}
// Perform the operation
try
{
return service18.getCapUpdateStatistics();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapCompareFirmwareVersion()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getCapCompareFirmwareVersion();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapConcurrentPageMode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getCapConcurrentPageMode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapRecPageMode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getCapRecPageMode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapSlpPageMode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getCapSlpPageMode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCapUpdateFirmware()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getCapUpdateFirmware();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapRecRuledLine()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.13.0
if(serviceVersion < deviceVersion113)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.13.0 compliant.");
}
// Perform the operation
try
{
return service113.getCapRecRuledLine();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCapSlpRuledLine()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.13.0
if(serviceVersion < deviceVersion113)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.13.0 compliant.");
}
// Perform the operation
try
{
return service113.getCapSlpRuledLine();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
//--------------------------------------------------------------------------
// Properties
//--------------------------------------------------------------------------
public boolean getAsyncMode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getAsyncMode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setAsyncMode(boolean asyncMode)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setAsyncMode(asyncMode);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCharacterSet()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCharacterSet();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setCharacterSet(int characterSet)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setCharacterSet(characterSet);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getCharacterSetList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCharacterSetList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getCoverOpen()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getCoverOpen();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getErrorLevel()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getErrorLevel();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getErrorStation()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getErrorStation();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getErrorString()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getErrorString();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getFlagWhenIdle()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getFlagWhenIdle();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setFlagWhenIdle(boolean flagWhenIdle)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setFlagWhenIdle(flagWhenIdle);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getFontTypefaceList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getFontTypefaceList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getJrnEmpty()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnEmpty();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getJrnLetterQuality()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnLetterQuality();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setJrnLetterQuality(boolean jrnLetterQuality)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setJrnLetterQuality(jrnLetterQuality);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getJrnLineChars()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnLineChars();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setJrnLineChars(int jrnLineChars)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setJrnLineChars(jrnLineChars);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getJrnLineCharsList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnLineCharsList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getJrnLineHeight()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnLineHeight();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setJrnLineHeight(int jrnLineHeight)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setJrnLineHeight(jrnLineHeight);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getJrnLineSpacing()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnLineSpacing();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setJrnLineSpacing(int jrnLineSpacing)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setJrnLineSpacing(jrnLineSpacing);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getJrnLineWidth()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnLineWidth();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getJrnNearEnd()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getJrnNearEnd();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getMapMode()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getMapMode();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setMapMode(int mapMode)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setMapMode(mapMode);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getOutputID()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getOutputID();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getRecBarCodeRotationList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecBarCodeRotationList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getRecEmpty()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecEmpty();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getRecLetterQuality()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLetterQuality();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setRecLetterQuality(boolean recLetterQuality)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setRecLetterQuality(recLetterQuality);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecLineChars()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLineChars();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setRecLineChars(int recLineChars)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setRecLineChars(recLineChars);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getRecLineCharsList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLineCharsList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecLineHeight()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLineHeight();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setRecLineHeight(int recLineHeight)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setRecLineHeight(recLineHeight);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecLineSpacing()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLineSpacing();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setRecLineSpacing(int recLineSpacing)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setRecLineSpacing(recLineSpacing);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecLinesToPaperCut()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLinesToPaperCut();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecLineWidth()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecLineWidth();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getRecNearEnd()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecNearEnd();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecSidewaysMaxChars()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecSidewaysMaxChars();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecSidewaysMaxLines()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRecSidewaysMaxLines();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRotateSpecial()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getRotateSpecial();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setRotateSpecial(int rotateSpecial)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setRotateSpecial(rotateSpecial);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getSlpBarCodeRotationList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpBarCodeRotationList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getSlpEmpty()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpEmpty();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getSlpLetterQuality()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLetterQuality();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setSlpLetterQuality(boolean recLetterQuality)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setSlpLetterQuality(recLetterQuality);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpLineChars()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLineChars();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setSlpLineChars(int recLineChars)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setSlpLineChars(recLineChars);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getSlpLineCharsList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLineCharsList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpLineHeight()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLineHeight();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setSlpLineHeight(int recLineHeight)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setSlpLineHeight(recLineHeight);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpLinesNearEndToEnd()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLinesNearEndToEnd();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpLineSpacing()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLineSpacing();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setSlpLineSpacing(int recLineSpacing)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setSlpLineSpacing(recLineSpacing);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpLineWidth()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpLineWidth();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpMaxLines()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpMaxLines();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getSlpNearEnd()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpNearEnd();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpSidewaysMaxChars()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpSidewaysMaxChars();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpSidewaysMaxLines()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
return service12.getSlpSidewaysMaxLines();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPowerNotify()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.3.0
if(serviceVersion < deviceVersion13)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.3.0 compliant.");
}
// Perform the operation
try
{
return service13.getPowerNotify();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setPowerNotify(int powerNotify)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.3.0
if(serviceVersion < deviceVersion13)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.3.0 compliant.");
}
// Perform the operation
try
{
service13.setPowerNotify(powerNotify);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPowerState()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.3.0
if(serviceVersion < deviceVersion13)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.3.0 compliant.");
}
// Perform the operation
try
{
return service13.getPowerState();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getCartridgeNotify()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getCartridgeNotify();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setCartridgeNotify(int notify)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
service15.setCartridgeNotify(notify);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getJrnCartridgeState()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getJrnCartridgeState();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getJrnCurrentCartridge()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getJrnCurrentCartridge();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setJrnCurrentCartridge(int cartridge)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
service15.setJrnCurrentCartridge(cartridge);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecCartridgeState()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getRecCartridgeState();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getRecCurrentCartridge()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getRecCurrentCartridge();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setRecCurrentCartridge(int cartridge)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
service15.setRecCurrentCartridge(cartridge);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpCartridgeState()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getSlpCartridgeState();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpCurrentCartridge()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getSlpCurrentCartridge();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setSlpCurrentCartridge(int cartridge)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
service15.setSlpCurrentCartridge(cartridge);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getSlpPrintSide()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
return service15.getSlpPrintSide();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public boolean getMapCharacterSet()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.7.0
if(serviceVersion < deviceVersion17)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.7.0 compliant.");
}
// Perform the operation
try
{
return service17.getMapCharacterSet();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setMapCharacterSet(boolean mapCharacterSet)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.7.0
if(serviceVersion < deviceVersion17)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.7.0 compliant.");
}
// Perform the operation
try
{
service17.setMapCharacterSet(mapCharacterSet);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getRecBitmapRotationList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.7.0
if(serviceVersion < deviceVersion17)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.7.0 compliant.");
}
// Perform the operation
try
{
return service17.getRecBitmapRotationList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getSlpBitmapRotationList()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.7.0
if(serviceVersion < deviceVersion17)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.7.0 compliant.");
}
// Perform the operation
try
{
return service17.getSlpBitmapRotationList();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getPageModeArea()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModeArea();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPageModeDescriptor()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModeDescriptor();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPageModeHorizontalPosition()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModeHorizontalPosition();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setPageModeHorizontalPosition(int position)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.setPageModeHorizontalPosition(position);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public String getPageModePrintArea()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModePrintArea();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setPageModePrintArea(String area)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.setPageModePrintArea(area);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPageModePrintDirection()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModePrintDirection();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setPageModePrintDirection(int direction)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.setPageModePrintDirection(direction);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPageModeStation()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModeStation();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setPageModeStation(int station)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.setPageModeStation(station);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public int getPageModeVerticalPosition()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
return service19.getPageModeVerticalPosition();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setPageModeVerticalPosition(int position)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.setPageModeVerticalPosition(position);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
//--------------------------------------------------------------------------
// Methods
//--------------------------------------------------------------------------
public void beginInsertion(int timeout)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.beginInsertion(timeout);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void beginRemoval(int timeout)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.beginRemoval(timeout);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void clearOutput()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.clearOutput();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void cutPaper(int percentage)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.cutPaper(percentage);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void endInsertion()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.endInsertion();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void endRemoval()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.endRemoval();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void printBarCode(int station, String data, int symbology, int height, int width, int alignment, int textPosition)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.printBarCode(station, data, symbology, height, width, alignment, textPosition);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void printBitmap(int station, String fileName, int width, int alignment)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.printBitmap(station, fileName, width, alignment);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void printImmediate(int station, String data)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.printImmediate(station, data);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void printNormal(int station, String data)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.printNormal(station, data);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void printTwoNormal(int stations, String data1, String data2)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.printTwoNormal(stations, data1, data2);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void rotatePrint(int station, int rotation)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.rotatePrint(station, rotation);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setBitmap(int bitmapNumber, int station, String fileName, int width, int alignment)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setBitmap(bitmapNumber, station, fileName, width, alignment);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void setLogo(int location, String data)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.setLogo(location, data);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void transactionPrint(int station, int control)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.transactionPrint(station, control);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void validateData(int station, String data)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Perform the operation
try
{
service12.validateData(station, data);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void changePrintSide(int side)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
service15.changePrintSide(side);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void markFeed(int type)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.5.0
if(serviceVersion < deviceVersion15)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.5.0 compliant.");
}
// Perform the operation
try
{
service15.markFeed(type);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void resetStatistics(String statisticsBuffer)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.8.0
if(serviceVersion < deviceVersion18)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.8.0 compliant.");
}
// Perform the operation
try
{
service18.resetStatistics(statisticsBuffer);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void retrieveStatistics(String[] statisticsBuffer)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.8.0
if(serviceVersion < deviceVersion18)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.8.0 compliant.");
}
// Perform the operation
try
{
service18.retrieveStatistics(statisticsBuffer);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void updateStatistics(String statisticsBuffer)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.8.0
if(serviceVersion < deviceVersion18)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.8.0 compliant.");
}
// Perform the operation
try
{
service18.updateStatistics(statisticsBuffer);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void clearPrintArea()
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.clearPrintArea();
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void compareFirmwareVersion(String firmwareFileName, int[] result)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.compareFirmwareVersion(firmwareFileName, result);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void pageModePrint(int control)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.pageModePrint(control);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void updateFirmware(String firmwareFileName)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.9.0
if(serviceVersion < deviceVersion19)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.9.0 compliant.");
}
// Perform the operation
try
{
service19.updateFirmware(firmwareFileName);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void printMemoryBitmap(int station, byte[] data, int type, int width, int alignment)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.10.0
if(serviceVersion < deviceVersion110)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.10.0 compliant.");
}
// Perform the operation
try
{
service110.printMemoryBitmap(station, data, type, width, alignment);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
public void drawRuledLine(int station, String positionList, int lineDirection, int lineWidth, int lineStyle, int lineColor)
throws JposException
{
// Make sure control is opened
if(!bOpen)
{
throw new JposException(JPOS_E_CLOSED, "Control not opened");
}
// Make sure service supports at least version 1.13.0
if(serviceVersion < deviceVersion113)
{
throw new JposException(JPOS_E_NOSERVICE,
"Device Service is not 1.13.0 compliant.");
}
// Perform the operation
try
{
service113.drawRuledLine(station, positionList, lineDirection, lineWidth, lineStyle, lineColor);
}
catch(JposException je)
{
throw je;
}
catch(Exception e)
{
throw new JposException(JPOS_E_FAILURE,
"Unhandled exception from Device Service", e);
}
}
//--------------------------------------------------------------------------
// Framework Methods
//--------------------------------------------------------------------------
// Create an EventCallbacks interface implementation object for this Control
protected EventCallbacks createEventCallbacks()
{
return new POSPrinterCallbacks();
}
// Store the reference to the Device Service
protected void setDeviceService(BaseService service, int nServiceVersion)
throws JposException
{
// Special case: service == null to free references
if(service == null)
{
service12 = null;
service13 = null;
service14 = null;
service15 = null;
service16 = null;
service17 = null;
service18 = null;
service19 = null;
service110 = null;
service111 = null;
service112 = null;
service113 = null;
service114 = null;
}
else
{
// Make sure that the service actually conforms to the interfaces it
// claims to.
if(serviceVersion >= deviceVersion12)
{
try
{
service12 = (POSPrinterService12)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService12 interface",
e);
}
}
if(serviceVersion >= deviceVersion13)
{
try
{
service13 = (POSPrinterService13)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService13 interface",
e);
}
}
if(serviceVersion >= deviceVersion14)
{
try
{
service14 = (POSPrinterService14)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService14 interface",
e);
}
}
if(serviceVersion >= deviceVersion15)
{
try
{
service15 = (POSPrinterService15)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService15 interface",
e);
}
}
if(serviceVersion >= deviceVersion16)
{
try
{
service16 = (POSPrinterService16)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService16 interface",
e);
}
}
if(serviceVersion >= deviceVersion17)
{
try
{
service17 = (POSPrinterService17)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService17 interface",
e);
}
}
if(serviceVersion >= deviceVersion18)
{
try
{
service18 = (POSPrinterService18)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService18 interface",
e);
}
}
if(serviceVersion >= deviceVersion19)
{
try
{
service19 = (POSPrinterService19)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService19 interface",
e);
}
}
if(serviceVersion >= deviceVersion110)
{
try
{
service110 = (POSPrinterService110)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService110 interface",
e);
}
}
if(serviceVersion >= deviceVersion111)
{
try
{
service111 = (POSPrinterService111)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService111 interface",
e);
}
}
if(serviceVersion >= deviceVersion112)
{
try
{
service112 = (POSPrinterService112)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService112 interface",
e);
}
}
if(serviceVersion >= deviceVersion113)
{
try
{
service113 = (POSPrinterService113)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService113 interface",
e);
}
}
if(serviceVersion >= deviceVersion114)
{
try
{
service114 = (POSPrinterService114)service;
}
catch(Exception e)
{
throw new JposException(JPOS_E_NOSERVICE,
"Service does not fully implement POSPrinterService114 interface",
e);
}
}
}
}
//--------------------------------------------------------------------------
// Event Listener Methods
//--------------------------------------------------------------------------
public void addDirectIOListener(DirectIOListener l)
{
synchronized(directIOListeners)
{
directIOListeners.addElement(l);
}
}
public void removeDirectIOListener(DirectIOListener l)
{
synchronized(directIOListeners)
{
directIOListeners.removeElement(l);
}
}
public void addErrorListener(ErrorListener l)
{
synchronized(errorListeners)
{
errorListeners.addElement(l);
}
}
public void removeErrorListener(ErrorListener l)
{
synchronized(errorListeners)
{
errorListeners.removeElement(l);
}
}
public void addOutputCompleteListener(OutputCompleteListener l)
{
synchronized(outputCompleteListeners)
{
outputCompleteListeners.addElement(l);
}
}
public void removeOutputCompleteListener(OutputCompleteListener l)
{
synchronized(outputCompleteListeners)
{
outputCompleteListeners.removeElement(l);
}
}
public void addStatusUpdateListener(StatusUpdateListener l)
{
synchronized(statusUpdateListeners)
{
statusUpdateListeners.addElement(l);
}
}
public void removeStatusUpdateListener(StatusUpdateListener l)
{
synchronized(statusUpdateListeners)
{
statusUpdateListeners.removeElement(l);
}
}
//--------------------------------------------------------------------------
// EventCallbacks inner class
//--------------------------------------------------------------------------
protected class POSPrinterCallbacks
implements EventCallbacks
{
public BaseControl getEventSource()
{
return (BaseControl)POSPrinter.this;
}
public void fireDataEvent(DataEvent e)
{
}
public void fireDirectIOEvent(DirectIOEvent e)
{
synchronized(POSPrinter.this.directIOListeners)
{
// deliver the event to all registered listeners
for(int x = 0; x < directIOListeners.size(); x++)
{
((DirectIOListener)directIOListeners.elementAt(x)).directIOOccurred(e);
}
}
}
public void fireErrorEvent(ErrorEvent e)
{
synchronized(POSPrinter.this.errorListeners)
{
// deliver the event to all registered listeners
for(int x = 0; x < errorListeners.size(); x++)
{
((ErrorListener)errorListeners.elementAt(x)).errorOccurred(e);
}
}
}
public void fireOutputCompleteEvent(OutputCompleteEvent e)
{
synchronized(POSPrinter.this.outputCompleteListeners)
{
// deliver the event to all registered listeners
for(int x = 0; x < outputCompleteListeners.size(); x++)
{
((OutputCompleteListener)outputCompleteListeners.elementAt(x)).outputCompleteOccurred(e);
}
}
}
public void fireStatusUpdateEvent(StatusUpdateEvent e)
{
synchronized(POSPrinter.this.statusUpdateListeners)
{
// deliver the event to all registered listeners
for(int x = 0; x < statusUpdateListeners.size(); x++)
{
((StatusUpdateListener)statusUpdateListeners.elementAt(x)).statusUpdateOccurred(e);
}
}
}
}
}