Class PrintBarCode

All Implemented Interfaces:
Runnable

public class PrintBarCode extends OutputRequest
Output request executor for POSPrinter method PrintBarCode.
  • Constructor Details

    • PrintBarCode

      public PrintBarCode(JposCommonProperties props, int station, String data, int symbology, int height, int width, int alignment, int textPosition)
      Constructor. Stores given parameters for later use.
      Parameters:
      props - Property set of device service.
      station - The printer station to be used. May be either S_RECEIPT or S_SLIP.
      data - Character string to be bar coded.
      symbology - Bar code symbol type to use. See UPOS specification for method PrintBarCode for possible values.
      height - Bar code height. Expressed in the unit of measure given by MapMode.
      width - Bar code width. Expressed in the unit of measure given by MapMode.
      alignment - Placement of the bar code. One of BC_LEFT, BC_CENTER, BC_RIGHT or any other positive value as distance from left-most position in units of measure given by MapMode.
      textPosition - Placement of the readable character string. One of BC_TEXT_NONE, BC_TEXT_ABOVE or BC_TEXT_BELOW.
  • Method Details

    • getStation

      public int getStation()
      POSPrinter method PrintBarCode parameter station, see UPOS specification.
      Returns:
      PrintBarCode parameter station.
    • getData

      public String getData()
      POSPrinter method PrintBarCode parameter data, see UPOS specification.
      Returns:
      PrintBarCode parameter data.
    • getSymbology

      public int getSymbology()
      POSPrinter method PrintBarCode parameter symbology, see UPOS specification.
      Returns:
      PrintBarCode parameter symbology.
    • getHeight

      public int getHeight()
      POSPrinter method PrintBarCode parameter height, see UPOS specification.
      Returns:
      PrintBarCode parameter height.
    • getWidth

      public int getWidth()
      POSPrinter method PrintBarCode parameter width, see UPOS specification.
      Returns:
      PrintBarCode parameter width.
    • getAlignment

      public int getAlignment()
      POSPrinter method PrintBarCode parameter alignment, see UPOS specification.
      Returns:
      PrintBarCode parameter alignment.
    • getTextPosition

      public int getTextPosition()
      POSPrinter method PrintBarCode parameter textPosition, see UPOS specification.
      Returns:
      PrintBarCode parameter textPosition.
    • invoke

      public void invoke() throws jpos.JposException
      Description copied from class: JposOutputRequest
      Invokes the command. Must be implemented in derived class. Calls finished() to wake up potentially waiting threads.
      Overrides:
      invoke in class JposOutputRequest
      Throws:
      jpos.JposException - JposException thrown by the command to be executed.