本文整理汇总了Java中com.openbravo.data.gui.MessageInf类的典型用法代码示例。如果您正苦于以下问题:Java MessageInf类的具体用法?Java MessageInf怎么用?Java MessageInf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MessageInf类属于com.openbravo.data.gui包,在下文中一共展示了MessageInf类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: deleteTicket
import com.openbravo.data.gui.MessageInf; //导入依赖的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();
}
示例2: btnCustomerActionPerformed
import com.openbravo.data.gui.MessageInf; //导入依赖的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);
}
示例3: m_jListTicketsActionPerformed
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
private void m_jListTicketsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jListTicketsActionPerformed
SwingUtilities.invokeLater(new Runnable() {
public void run() {
try {
List<SharedTicketInfo> l = dlReceipts.getSharedTicketList();
JTicketsBagSharedList listDialog = JTicketsBagSharedList.newJDialog(JTicketsBagShared.this);
String id = listDialog.showTicketsList(l);
if (id != null) {
saveCurrentTicket();
setActiveTicket(id);
}
} catch (BasicException e) {
new MessageInf(e).show(JTicketsBagShared.this);
newTicket();
}
}
});
}
示例4: incProductByCode
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
private void incProductByCode(String sCode) {
// 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
incProduct(oProduct);
}
} catch (BasicException eData) {
stateToZero();
new MessageInf(eData).show(this);
}
}
示例5: incProductByCodePrice
import com.openbravo.data.gui.MessageInf; //导入依赖的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);
}
}
示例6: incProduct
import com.openbravo.data.gui.MessageInf; //导入依赖的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);
}
}
示例7: m_jEditLineActionPerformed
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
private void m_jEditLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jEditLineActionPerformed
int i = m_ticketlines.getSelectedIndex();
if (i < 0){
Toolkit.getDefaultToolkit().beep(); // no line selected
} else {
try {
TicketLineInfo newline = JProductLineEdit.showMessage(this, m_App, m_oTicket.getLine(i));
if (newline != null) {
// line has been modified
paintTicketLine(i, newline);
}
} catch (BasicException e) {
new MessageInf(e).show(this);
}
}
}
示例8: btnCustomerActionPerformed
import com.openbravo.data.gui.MessageInf; //导入依赖的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();
}
示例9: jEditAttributesActionPerformed
import com.openbravo.data.gui.MessageInf; //导入依赖的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);
}
}
}
示例10: moveTicket
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
public void moveTicket() {
// guardamos el ticket
if (m_PlaceCurrent != null) {
try {
dlReceipts.updateSharedTicket(m_PlaceCurrent.getId(), m_panelticket.getActiveTicket());
} catch (BasicException e) {
new MessageInf(e).show(this);
}
// me guardo el ticket que quiero copiar.
m_PlaceClipboard = m_PlaceCurrent;
customer = null;
m_PlaceCurrent = null;
}
printState();
m_panelticket.setActiveTicket(null, null);
}
示例11: newTicket
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
public void newTicket() {
// guardamos el ticket
if (m_PlaceCurrent != null) {
try {
dlReceipts.updateSharedTicket(m_PlaceCurrent.getId(), m_panelticket.getActiveTicket());
} catch (BasicException e) {
new MessageInf(e).show(this); // maybe other guy deleted it
}
m_PlaceCurrent = null;
}
printState();
m_panelticket.setActiveTicket(null, null);
}
示例12: deleteTicket
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
public void deleteTicket() {
if (m_PlaceCurrent != null) {
String id = m_PlaceCurrent.getId();
try {
dlReceipts.deleteSharedTicket(id);
} catch (BasicException e) {
new MessageInf(e).show(this);
}
m_PlaceCurrent.setPeople(false);
m_PlaceCurrent = null;
}
printState();
m_panelticket.setActiveTicket(null, null);
}
示例13: loadTickets
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
public void loadTickets() {
Set<String> atickets = new HashSet<String>();
try {
java.util.List<SharedTicketInfo> l = dlReceipts.getSharedTicketList();
for (SharedTicketInfo ticket : l) {
atickets.add(ticket.getId());
}
} catch (BasicException e) {
new MessageInf(e).show(this);
}
for (Place table : m_aplaces) {
table.setPeople(atickets.contains(table.getId()));
}
}
示例14: actionPerformed
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
public void actionPerformed(ActionEvent evt) {
// String sPassword = m_actionuser.getPassword();
if (m_actionuser.authenticate()) {
// p'adentro directo, no tiene password
openAppView(m_actionuser);
} else {
// comprobemos la clave antes de entrar...
String sPassword = JPasswordDialog.showEditPassword(JRootApp.this,
AppLocal.getIntString("Label.Password"),
m_actionuser.getName(),
m_actionuser.getIcon());
if (sPassword != null) {
if (m_actionuser.authenticate(sPassword)) {
openAppView(m_actionuser);
} else {
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.BadPassword"));
msg.show(JRootApp.this);
}
}
}
}
示例15: processKey
import com.openbravo.data.gui.MessageInf; //导入依赖的package包/类
private void processKey(char c) {
if (c == '\n') {
AppUser user = null;
try {
user = m_dlSystem.findPeopleByCard(inputtext.toString());
} catch (BasicException e) {
e.printStackTrace();
}
if (user == null) {
// user not found
MessageInf msg = new MessageInf(MessageInf.SGN_WARNING, AppLocal.getIntString("message.nocard"));
msg.show(this);
} else {
openAppView(user);
}
inputtext = new StringBuffer();
} else {
inputtext.append(c);
}
}