本文整理汇总了Java中com.openbravo.pos.forms.AppLocal类的典型用法代码示例。如果您正苦于以下问题:Java AppLocal类的具体用法?Java AppLocal怎么用?Java AppLocal使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AppLocal类属于com.openbravo.pos.forms包,在下文中一共展示了AppLocal类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: deleteTicket
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
public void deleteTicket() {
if (m_ticketCopy != null) {
// Para editar borramos el ticket anterior
try {
m_dlSales.deleteTicket(m_ticketCopy, m_App.getInventoryLocation());
} catch (BasicException eData) {
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.nosaveticket"), eData);
msg.show(this);
}
}
m_ticket = null;
m_ticketCopy = null;
resetToTicket();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JTicketsBagTicket.java
示例2: btnCustomerActionPerformed
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private void btnCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCustomerActionPerformed
JCustomerFinder finder = JCustomerFinder.getCustomerFinder(this, dlCustomers);
finder.search(ticket.getCustomer());
finder.setVisible(true);
try {
ticket.setCustomer(finder.getSelectedCustomer() == null
? null
: dlSales.loadCustomerExt(finder.getSelectedCustomer().getId()));
} catch (BasicException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), e);
msg.show(this);
}
// The ticket name
m_jTicketId.setText(ticket.getName(ticketext));
refreshTicketTaxes();
// refresh the receipt....
setTicket(ticket, ticketext);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:SimpleReceipt.java
示例3: incProductByCodePrice
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private void incProductByCodePrice(String sCode, double dPriceSell) {
// precondicion: sCode != null
try {
ProductInfoExt oProduct = dlSales.getProductInfoByCode(sCode);
if (oProduct == null) {
Toolkit.getDefaultToolkit().beep();
new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noproduct")).show(this);
stateToZero();
} else {
// Se anade directamente una unidad con el precio y todo
if (m_jaddtax.isSelected()) {
// debemos quitarle los impuestos ya que el precio es con iva incluido...
TaxInfo tax = taxeslogic.getTaxInfo(oProduct.getTaxCategoryID(), m_oTicket.getDate(), m_oTicket.getCustomer());
addTicketLine(oProduct, 1.0, dPriceSell / (1.0 + tax.getRate()));
} else {
addTicketLine(oProduct, 1.0, dPriceSell);
}
}
} catch (BasicException eData) {
stateToZero();
new MessageInf(eData).show(this);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:JPanelTicket.java
示例4: incProduct
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private void incProduct(ProductInfoExt prod) {
if (prod.isScale() && m_App.getDeviceScale().existsScale()) {
try {
Double value = m_App.getDeviceScale().readWeight();
if (value != null) {
incProduct(value.doubleValue(), prod);
}
} catch (ScaleException e) {
Toolkit.getDefaultToolkit().beep();
new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.noweight"), e).show(this);
stateToZero();
}
} else {
// No es un producto que se pese o no hay balanza
incProduct(1.0, prod);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPanelTicket.java
示例5: btnCustomerActionPerformed
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private void btnCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCustomerActionPerformed
JCustomerFinder finder = JCustomerFinder.getCustomerFinder(this, dlCustomers);
finder.search(m_oTicket.getCustomer());
finder.setVisible(true);
try {
m_oTicket.setCustomer(finder.getSelectedCustomer() == null
? null
: dlSales.loadCustomerExt(finder.getSelectedCustomer().getId()));
} catch (BasicException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindcustomer"), e);
msg.show(this);
}
refreshTicket();
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:JPanelTicket.java
示例6: jEditAttributesActionPerformed
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private void jEditAttributesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jEditAttributesActionPerformed
int i = m_ticketlines.getSelectedIndex();
if (i < 0) {
Toolkit.getDefaultToolkit().beep(); // no line selected
} else {
try {
TicketLineInfo line = m_oTicket.getLine(i);
JProductAttEdit attedit = JProductAttEdit.getAttributesEditor(this, m_App.getSession());
attedit.editAttributes(line.getProductAttSetId(), line.getProductAttSetInstId());
attedit.setVisible(true);
if (attedit.isOK()) {
// The user pressed OK
line.setProductAttSetInstId(attedit.getAttributeSetInst());
line.setProductAttSetInstDesc(attedit.getAttributeSetInstDescription());
paintTicketLine(i, line);
}
} catch (BasicException ex) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotfindattributes"), ex);
msg.show(this);
}
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:25,代码来源:JPanelTicket.java
示例7: writeValues
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
public void writeValues(DataWrite dp) throws BasicException {
dp.setString(1, m_sTicket);
dp.setInt(2, new Integer(m_iLine));
dp.setString(3, productid);
dp.setString(4, attsetinstid);
dp.setDouble(5, new Double(multiply));
dp.setDouble(6, new Double(price));
dp.setString(7, tax.getId());
try {
ByteArrayOutputStream o = new ByteArrayOutputStream();
attributes.storeToXML(o, AppLocal.APP_NAME, "UTF-8");
dp.setBytes(8, o.toByteArray());
} catch (IOException e) {
dp.setBytes(8, null);
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:19,代码来源:TicketLineInfo.java
示例8: JPaymentMagcard
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
/** Creates new form JPaymentMagcard */
public JPaymentMagcard(AppView app, JPaymentNotifier notifier) {
initComponents();
m_notifier = notifier;
m_paymentgateway = PaymentGatewayFac.getPaymentGateway(app.getProperties());
if (m_paymentgateway == null) {
jlblMessage.setText(AppLocal.getIntString("message.nopaymentgateway"));
} else {
// Se van a poder efectuar pagos con tarjeta
m_cardpanel = PaymentPanelFac.getPaymentPanel(app.getProperties().getProperty("payment.magcardreader"), notifier);
add(m_cardpanel.getComponent(), BorderLayout.CENTER);
jlblMessage.setText(null);
// jlblMessage.setText(AppLocal.getIntString("message.nocardreader"));
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:20,代码来源:JPaymentMagcard.java
示例9: addTabPayment
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
protected void addTabPayment(JPaymentCreator jpay) {
if (app.getAppUserView().getUser().hasPermission(jpay.getKey())) {
JPaymentInterface jpayinterface = payments.get(jpay.getKey());
if (jpayinterface == null) {
jpayinterface = jpay.createJPayment();
payments.put(jpay.getKey(), jpayinterface);
}
jpayinterface.getComponent().applyComponentOrientation(getComponentOrientation());
m_jTabPayment.addTab(
AppLocal.getIntString(jpay.getLabelKey()),
new javax.swing.ImageIcon(getClass().getResource(jpay.getIconKey())),
jpayinterface.getComponent());
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:JPaymentSelect.java
示例10: JPaymentCashPos
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
/** Creates new form JPaymentCash */
public JPaymentCashPos(JPaymentNotifier notifier, DataLogicSystem dlSystem) {
m_notifier = notifier;
initComponents();
m_jTendered.addPropertyChangeListener("Edition", new RecalculateState());
m_jTendered.addEditorKeys(m_jKeys);
String code = dlSystem.getResourceAsXML("payment.cash");
if (code != null) {
try {
ScriptEngine script = ScriptFactory.getScriptEngine(ScriptFactory.BEANSHELL);
script.put("payment", new ScriptPaymentCash(dlSystem));
script.eval(code);
} catch (ScriptException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.cannotexecute"), e);
msg.show(this);
}
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:24,代码来源:JPaymentCashPos.java
示例11: initComponents
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel2 = new javax.swing.JLabel();
m_jName = new javax.swing.JTextField();
setLayout(null);
jLabel2.setText(AppLocal.getIntString("Label.Name")); // NOI18N
add(jLabel2);
jLabel2.setBounds(20, 20, 80, 15);
add(m_jName);
m_jName.setBounds(100, 20, 200, 19);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:TaxCustCategoriesEditor.java
示例12: readWeight
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
public Double readWeight() throws ScaleException {
if (m_scale == null) {
throw new ScaleException(AppLocal.getIntString("scale.notdefined"));
} else {
Double result = m_scale.readWeight();
if (result == null) {
return null; // Canceled by the user / scale
} else if (result.doubleValue() < 0.002) {
// invalid result. nothing on the scale
throw new ScaleException(AppLocal.getIntString("scale.invalidvalue"));
} else {
// valid result
return result;
}
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:DeviceScale.java
示例13: init
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
protected void init() {
row = new Row(
new Field("ID", Datas.STRING, Formats.STRING),
new Field(AppLocal.getIntString("Label.Name"), Datas.STRING, Formats.STRING, true, true, true)
);
Table table = new Table(
"ATTRIBUTESET",
new PrimaryKey("ID"),
new Column("NAME"));
lpr = row.getListProvider(app.getSession(), table);
spr = row.getSaveProvider(app.getSession(), table);
editor = new AttributeSetsEditor(dirty);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:AttributeSetsPanel.java
示例14: changePassword
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
public static String changePassword(Component parent) {
// Show the changePassword dialogs but do not check the old password
String sPassword = JPasswordDialog.showEditPassword(parent,
AppLocal.getIntString("Label.Password"),
AppLocal.getIntString("label.passwordnew"),
new ImageIcon(Hashcypher.class.getResource("/com/openbravo/images/password.png")));
if (sPassword != null) {
String sPassword2 = JPasswordDialog.showEditPassword(parent,
AppLocal.getIntString("Label.Password"),
AppLocal.getIntString("label.passwordrepeat"),
new ImageIcon(Hashcypher.class.getResource("/com/openbravo/images/password.png")));
if (sPassword2 != null) {
if (sPassword.equals(sPassword2)) {
return Hashcypher.hashString(sPassword);
} else {
JOptionPane.showMessageDialog(parent, AppLocal.getIntString("message.changepassworddistinct"), AppLocal.getIntString("message.title"), JOptionPane.WARNING_MESSAGE);
}
}
}
return null;
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:24,代码来源:Hashcypher.java
示例15: init
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
protected void init() {
row = new Row(
new Field("ID", Datas.STRING, Formats.STRING),
new Field(AppLocal.getIntString("Label.Name"), Datas.STRING, Formats.STRING, true, true, true)
);
Table table = new Table(
"ATTRIBUTE",
new PrimaryKey("ID"),
new Column("NAME"));
lpr = row.getListProvider(app.getSession(), table);
spr = row.getSaveProvider(app.getSession(), table);
editor = new AttributesEditor(dirty);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:18,代码来源:AttributesPanel.java
示例16: initComponents
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel2 = new javax.swing.JLabel();
m_jName = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
m_jAddress = new javax.swing.JTextField();
setLayout(null);
jLabel2.setText(AppLocal.getIntString("label.locationname"));
add(jLabel2);
jLabel2.setBounds(20, 20, 80, 15);
add(m_jName);
m_jName.setBounds(100, 20, 260, 19);
jLabel3.setText(AppLocal.getIntString("label.locationaddress"));
add(jLabel3);
jLabel3.setBounds(20, 50, 80, 15);
add(m_jAddress);
m_jAddress.setBounds(100, 50, 260, 19);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:LocationsView.java
示例17: refresh
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
public void refresh() {
List a;
try {
a = taxparentsent.list();
} catch (BasicException eD) {
MessageInf msg = new MessageInf(MessageInf.SGN_NOTICE, AppLocal.getIntString("message.cannotloadlists"), eD);
msg.show(this);
a = new ArrayList();
}
a.add(0, null); // The null item
taxparentmodel = new ComboBoxValModel(a);
m_jTaxParent.setModel(taxparentmodel);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:17,代码来源:TaxEditor.java
示例18: m_jBtnDeleteActionPerformed
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private void m_jBtnDeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jBtnDeleteActionPerformed
int res = JOptionPane.showConfirmDialog(this, AppLocal.getIntString("message.wannadelete"), AppLocal.getIntString("title.editor"), JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
if (res == JOptionPane.YES_OPTION) {
m_ticketsbagticket.deleteTicket();
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:9,代码来源:JTicketsBagTicketBag.java
示例19: evalScript
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
private Object evalScript(ScriptObject scr, String resource, ScriptArg... args) {
// resource here is guaratied to be not null
try {
scr.setSelectedIndex(m_ticketlines.getSelectedIndex());
return scr.evalScript(dlSystem.getResourceAsXML(resource), args);
} catch (ScriptException e) {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.cannotexecute"), e);
msg.show(this);
return msg;
}
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:13,代码来源:JPanelTicket.java
示例20: initComponents
import com.openbravo.pos.forms.AppLocal; //导入依赖的package包/类
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jPrinters = new javax.swing.JComboBox();
jReceiptPrinter = new javax.swing.JCheckBox();
jReceiptPrinter.setSelected(true);
jReceiptPrinter.setText(AppLocal.getIntString("label.receiptprinter")); // NOI18N
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 430, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jPrinters, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jReceiptPrinter)
.addContainerGap(129, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 61, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jPrinters, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jReceiptPrinter))
.addContainerGap(37, Short.MAX_VALUE))
);
}
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:38,代码来源:ParametersPrinter.java
注:本文中的com.openbravo.pos.forms.AppLocal类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论