本文整理汇总了Java中com.openbravo.pos.printer.TicketPrinterException类的典型用法代码示例。如果您正苦于以下问题:Java TicketPrinterException类的具体用法?Java TicketPrinterException怎么用?Java TicketPrinterException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TicketPrinterException类属于com.openbravo.pos.printer包,在下文中一共展示了TicketPrinterException类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: DevicePrinterESCPOS
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/**
*
* @param CommOutputPrinter
* @param codes
* @param trans
* @throws TicketPrinterException
*/
public DevicePrinterESCPOS(PrinterWritter CommOutputPrinter, Codes codes, UnicodeTranslator trans) throws TicketPrinterException {
m_sName = AppLocal.getIntString("Printer.Serial");
m_CommOutputPrinter = CommOutputPrinter;
m_codes = codes;
m_trans = trans;
// Inicializamos la impresora
m_CommOutputPrinter.init(ESCPOS.INIT);
m_CommOutputPrinter.write(ESCPOS.SELECT_PRINTER); // A la impresora
m_CommOutputPrinter.init(m_codes.getInitSequence());
m_CommOutputPrinter.write(m_trans.getCodeTable());
m_CommOutputPrinter.flush();
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:24,代码来源:DevicePrinterESCPOS.java
示例2: DeviceDisplayJavaPOS
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/** Creates a new instance of DeviceDisplayJavaPOS */
public DeviceDisplayJavaPOS(String sDeviceName) throws TicketPrinterException {
m_sName = sDeviceName;
m_ld = new LineDisplay();
try {
m_ld.open(m_sName);
m_ld.claim(10000);
m_ld.setDeviceEnabled(true);
} catch (JposException e) {
throw new TicketPrinterException(e.getMessage(), e);
}
m_displaylines = new DeviceDisplayBase(this);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:16,代码来源:DeviceDisplayJavaPOS.java
示例3: visorTicketLine
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
private void visorTicketLine(TicketLineInfo oLine){
if (oLine == null) {
m_App.getDeviceTicket().getDeviceDisplay().clearVisor();
} else {
try {
ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
script.put("ticketline", oLine);
m_TTP.printTicket(script.eval(dlSystem.getResourceAsXML("Printer.TicketLine")).toString());
// JG May 2013 replaced with Multicatch
} catch ( ScriptException | TicketPrinterException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotprintline"), e);
msg.show(JPanelTicket.this);
}
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:16,代码来源:JPanelTicket.java
示例4: printTicket
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
private void printTicket(String sresourcename, TicketInfo ticket, String table) {
if (ticket != null) {
try {
ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.VELOCITY);
script.put("ticket", ticket);
script.put("place",m_restaurant.getTableName());
m_TTP2.printTicket(script.eval(m_dlSystem.getResourceAsXML(sresourcename)).toString());
} catch ( ScriptException | TicketPrinterException e) {
JMessageDialog.showMessage(this, new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.cannotprint"), e));
}
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:13,代码来源:JTicketsBagRestaurant.java
示例5: printerStart
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
private void printerStart() {
String sresource = m_dlSystem.getResourceAsXML("Printer.Start");
if (sresource == null) {
m_TP.getDeviceDisplay().writeVisor(AppLocal.APP_NAME, AppLocal.APP_VERSION);
} else {
try {
m_TTP.printTicket(sresource);
} catch (TicketPrinterException eTP) {
m_TP.getDeviceDisplay().writeVisor(AppLocal.APP_NAME, AppLocal.APP_VERSION);
}
}
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:14,代码来源:JRootApp.java
示例6: DeviceDisplayJavaPOS
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/** Creates a new instance of DeviceDisplayJavaPOS
* @param sDeviceName
* @throws com.openbravo.pos.printer.TicketPrinterException */
public DeviceDisplayJavaPOS(String sDeviceName) throws TicketPrinterException {
m_sName = sDeviceName;
m_ld = new LineDisplay();
try {
m_ld.open(m_sName);
m_ld.claim(10000);
m_ld.setDeviceEnabled(true);
} catch (JposException e) {
throw new TicketPrinterException(e.getMessage(), e);
}
m_displaylines = new DeviceDisplayBase(this);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:18,代码来源:DeviceDisplayJavaPOS.java
示例7: DeviceFiscalPrinterJavaPOS
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/** Creates new form DeviceFiscalPrinterJavaPOSPanel */
public DeviceFiscalPrinterJavaPOS(String sDeviceFiscalPrinterName) throws TicketPrinterException {
m_sName = sDeviceFiscalPrinterName;
m_fiscal = new FiscalPrinter();
try {
m_fiscal.open(m_sName);
m_fiscal.claim(10000);
m_fiscal.setDeviceEnabled(true);
// m_printer.setMapMode(POSPrinterConst.PTR_MM_METRIC); // unit = 1/100 mm - i.e. 1 cm = 10 mm = 10 * 100 units
m_fiscal.setCheckTotal(false);
} catch (JposException e) {
throw new TicketPrinterException(e.getMessage(), e);
}
initComponents();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:23,代码来源:DeviceFiscalPrinterJavaPOS.java
示例8: PrinterWritterRXTX
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/** Creates a new instance of PrinterWritterComm
* @param sPortPrinter
* @throws com.openbravo.pos.printer.TicketPrinterException */
public PrinterWritterRXTX(String sPortPrinter) throws TicketPrinterException {
m_sPortPrinter = sPortPrinter;
m_out = null;
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:8,代码来源:PrinterWritterRXTX.java
示例9: DevicePrinterPlain
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/**
*
* @param CommOutputPrinter
* @throws TicketPrinterException
*/
public DevicePrinterPlain(PrinterWritter CommOutputPrinter) throws TicketPrinterException {
out = CommOutputPrinter;
trans = new UnicodeTranslatorStar(); // The star translator stands for the 437 int char page
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:11,代码来源:DevicePrinterPlain.java
示例10: DeviceFiscalPrinterJavaPOS
import com.openbravo.pos.printer.TicketPrinterException; //导入依赖的package包/类
/** Creates new form DeviceFiscalPrinterJavaPOSPanel
* @param sDeviceFiscalPrinterName
* @throws com.openbravo.pos.printer.TicketPrinterException */
public DeviceFiscalPrinterJavaPOS(String sDeviceFiscalPrinterName) throws TicketPrinterException {
m_sName = sDeviceFiscalPrinterName;
m_fiscal = new FiscalPrinter();
try {
m_fiscal.open(m_sName);
m_fiscal.claim(10000);
m_fiscal.setDeviceEnabled(true);
// m_printer.setMapMode(POSPrinterConst.PTR_MM_METRIC); // unit = 1/100 mm - i.e. 1 cm = 10 mm = 10 * 100 units
m_fiscal.setCheckTotal(false);
} catch (JposException e) {
throw new TicketPrinterException(e.getMessage(), e);
}
initComponents();
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:25,代码来源:DeviceFiscalPrinterJavaPOS.java
注:本文中的com.openbravo.pos.printer.TicketPrinterException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论