本文整理汇总了Java中com.openbravo.pos.util.ReportUtils类的典型用法代码示例。如果您正苦于以下问题:Java ReportUtils类的具体用法?Java ReportUtils怎么用?Java ReportUtils使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ReportUtils类属于com.openbravo.pos.util包,在下文中一共展示了ReportUtils类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: DevicePrinterPrinter
import com.openbravo.pos.util.ReportUtils; //导入依赖的package包/类
/**
* Creates a new instance of DevicePrinterPrinter
*
* @param printername - name of printer that will be called in the system
* @param isReceiptPrinter - string with boolean values if the printer is a receipt
*/
public DevicePrinterPrinter(Component parent, String printername, int imageable_x, int imageable_y, int imageable_width, int imageable_height, String mediasizename) {
this.parent = parent;
m_sName = "Printer"; // "AppLocal.getIntString("Printer.Screen");
m_ticketcurrent = null;
printservice = ReportUtils.getPrintService(printername);
this.imageable_x = imageable_x;
this.imageable_y = imageable_y;
this.imageable_width = imageable_width;
this.imageable_height = imageable_height;
this.media = getMedia(mediasizename);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:20,代码来源:DevicePrinterPrinter.java
示例2: DevicePrinterPrinter
import com.openbravo.pos.util.ReportUtils; //导入依赖的package包/类
/**
* Creates a new instance of DevicePrinterPrinter
*
* @param parent
* @param printername - name of printer that will be called in the system
* @param imageable_x
* @param imageable_y
* @param imageable_height
* @param imageable_width
* @param mediasizename
*/
public DevicePrinterPrinter(Component parent, String printername, int imageable_x, int imageable_y, int imageable_width, int imageable_height, String mediasizename) {
this.parent = parent;
m_sName = "Printer"; // "AppLocal.getIntString("Printer.Screen");
m_ticketcurrent = null;
printservice = ReportUtils.getPrintService(printername);
this.imageable_x = imageable_x;
this.imageable_y = imageable_y;
this.imageable_width = imageable_width;
this.imageable_height = imageable_height;
this.media = getMedia(mediasizename);
}
开发者ID:gnoopy,项目名称:wifepos,代码行数:25,代码来源:DevicePrinterPrinter.java
示例3: DevicePrinterPrinter
import com.openbravo.pos.util.ReportUtils; //导入依赖的package包/类
/**
* Creates a new instance of DevicePrinterPrinter
*
* @param printername - name of printer that will be called in the system
* @param isReceiptPrinter - string with boolean values if the printer is a receipt
*/
public DevicePrinterPrinter(Component parent, String printername, int imageable_x, int imageable_y, int imageable_width, int imageable_height, String mediasizename) {
this.parent = parent;
m_sName = "label.ReceiptPrinterPrinter";
m_ticketcurrent = null;
printservice = ReportUtils.getPrintService(printername);
this.imageable_x = imageable_x;
this.imageable_y = imageable_y;
this.imageable_width = imageable_width;
this.imageable_height = imageable_height;
this.media = getMedia(mediasizename);
}
开发者ID:nordpos,项目名称:nordpos,代码行数:20,代码来源:DevicePrinterPrinter.java
示例4: endReceipt
import com.openbravo.pos.util.ReportUtils; //导入依赖的package包/类
/**
* Method that is responsible for ending and printing a ticket<br>
* It manages to get a printerJob, set the name of the job, get a Book object<br>
* and print the receipt
*/
@Override
public void endReceipt() {
try {
PrintService ps;
if (printservice == null) {
String[] printers = ReportUtils.getPrintNames();
if (printers.length == 0) {
logger.warning(AppLocal.getIntString("message.noprinters"));
ps = null;
} else {
SelectPrinter selectprinter = SelectPrinter.getSelectPrinter(parent, printers);
selectprinter.setVisible(true);
if (selectprinter.isOK()) {
ps = ReportUtils.getPrintService(selectprinter.getPrintService());
} else {
ps = null;
}
}
} else {
ps = printservice;
}
if (ps != null) {
PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
aset.add(OrientationRequested.PORTRAIT);
aset.add(new JobName(AppLocal.APP_NAME + " - Document", null));
aset.add(media);
DocPrintJob printjob = ps.createPrintJob();
Doc doc = new SimpleDoc(new PrintableBasicTicket(m_ticketcurrent, imageable_x, imageable_y, imageable_width, imageable_height), DocFlavor.SERVICE_FORMATTED.PRINTABLE, null);
printjob.print(doc, aset);
}
} catch (PrintException ex) {
logger.log(Level.WARNING, AppLocal.getIntString("message.printererror"), ex);
JMessageDialog.showMessage(parent, new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.printererror"), ex));
}
//ticket is not needed any more
m_ticketcurrent = null;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:52,代码来源:DevicePrinterPrinter.java
示例5: JPanelConfigHardware
import com.openbravo.pos.util.ReportUtils; //导入依赖的package包/类
public JPanelConfigHardware() {
initComponents();
String[] printernames = ReportUtils.getPrintNames();
jcboMachineDisplay.addActionListener(dirty);
displayExtParams = new ParametersExtendDriver();
displayExtParams.addDirtyManager(dirty);
m_jDisplayParams.add(displayExtParams.getComponent(), "extended");
jcboMachineLabelPrinter.addActionListener(dirty);
labelExtParams = new ParametersExtendDriver();
labelExtParams.addDirtyManager(dirty);
m_jLabelPrinterParams.add(labelExtParams.getComponent(), "extended");
jcboMachineFiscalPrinter.addActionListener(dirty);
fiscalExtParams = new ParametersExtendDriver();
fiscalExtParams.addDirtyManager(dirty);
m_jFiscalPrinterParams.add(fiscalExtParams.getComponent(), "extended");
jcboMachinePrinter.addActionListener(dirty);
printer1PrinterParams = new ParametersPrinter(printernames);
printer1PrinterParams.addDirtyManager(dirty);
m_jPrinterParams1.add(printer1PrinterParams.getComponent(), "printer");
printer1ExtParams = new ParametersExtendDriver();
printer1ExtParams.addDirtyManager(dirty);
m_jPrinterParams1.add(printer1ExtParams.getComponent(), "extended");
jcboMachinePrinter2.addActionListener(dirty);
printer2PrinterParams = new ParametersPrinter(printernames);
printer2PrinterParams.addDirtyManager(dirty);
m_jPrinterParams2.add(printer2PrinterParams.getComponent(), "printer");
printer2ExtParams = new ParametersExtendDriver();
printer2ExtParams.addDirtyManager(dirty);
m_jPrinterParams2.add(printer2ExtParams.getComponent(), "extended");
jcboMachinePrinter3.addActionListener(dirty);
printer3PrinterParams = new ParametersPrinter(printernames);
printer3PrinterParams.addDirtyManager(dirty);
m_jPrinterParams3.add(printer3PrinterParams.getComponent(), "printer");
printer3ExtParams = new ParametersExtendDriver();
printer3ExtParams.addDirtyManager(dirty);
m_jPrinterParams3.add(printer3ExtParams.getComponent(), "extended");
jcboMachineScale.addActionListener(dirty);
scaleExtParams = new ParametersExtendDriver();
scaleExtParams.addDirtyManager(dirty);
m_jScaleParams.add(scaleExtParams.getComponent(), "extended");
jcboMachinePLUDevice.addActionListener(dirty);
pluExtParams = new ParametersExtendDriver();
pluExtParams.addDirtyManager(dirty);
m_jPLUParams.add(pluExtParams.getComponent(), "extended");
cboPrinters.addActionListener(dirty);
// Printers
cboPrinters.addItem("(Default)");
cboPrinters.addItem("(Show dialog)");
for (String name : printernames) {
cboPrinters.addItem(name);
}
}
开发者ID:nordpos,项目名称:nordpos,代码行数:65,代码来源:JPanelConfigHardware.java
注:本文中的com.openbravo.pos.util.ReportUtils类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论