本文整理汇总了Java中com.openbravo.pos.ticket.TicketLineInfo.setMultiply方法的典型用法代码示例。如果您正苦于以下问题:Java TicketLineInfo.setMultiply方法的具体用法?Java TicketLineInfo.setMultiply怎么用?Java TicketLineInfo.setMultiply使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.openbravo.pos.ticket.TicketLineInfo
的用法示例。
在下文中一共展示了TicketLineInfo.setMultiply方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: m_jbtnAddOneActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddOneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddOneActionPerformed
int index = ticketlines.getSelectedIndex();
if (index >= 0) {
TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(index);
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-1.0);
if (isMultiplyControl) {
oLine.setMultiply(oLine.getMultiply()-1.0);
ticketlines.setTicketLine(index, oLine);
ticketlines.setSelectedIndex(index);
if (oLine.getMultiply() == 0) {
ticketlines.removeTicketLine(index);
m_aLines.remove(index);
}
}
m_jTicketEdit.addTicketLine(oNewLine);
}
}
示例2: m_jbtnAddAllActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddAllActionPerformed
for (int i = 0; i < m_aLines.size(); i++) {
TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(i);
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-oLine.getMultiply());
m_jTicketEdit.addTicketLine(oNewLine);
}
}
示例3: m_jbtnAddOneActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddOneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddOneActionPerformed
int index = ticketlines.getSelectedIndex();
if (index >= 0) {
TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(index);
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-1.0);
m_jTicketEdit.addTicketLine(oNewLine);
}
}
示例4: m_jbtnAddLineActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddLineActionPerformed
int index = ticketlines.getSelectedIndex();
if (index >= 0) {
TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(index);
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-oLine.getMultiply());
m_jTicketEdit.addTicketLine(oNewLine);
}
}
示例5: m_jbtnAddAllActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddAllActionPerformed
for (Object m_aLine : m_aLines) {
TicketLineInfo oLine = (TicketLineInfo) m_aLine;
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-oLine.getMultiply());
m_jTicketEdit.addTicketLine(oNewLine);
}
}
示例6: m_jbtnAddAllActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddAllActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddAllActionPerformed
for (int i = 0; i < m_aLines.size(); i++) {
TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(i);
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-oLine.getMultiply());
m_jTicketEdit.addTicketLine(oNewLine);
if (isMultiplyControl) ticketlines.removeTicketLine(ticketlines.getSelectedIndex());
}
if (isMultiplyControl) m_aLines.clear();
}
示例7: m_jbtnAddLineActionPerformed
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
private void m_jbtnAddLineActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_m_jbtnAddLineActionPerformed
int index = ticketlines.getSelectedIndex();
if (index >= 0) {
TicketLineInfo oLine = (TicketLineInfo) m_aLines.get(index);
TicketLineInfo oNewLine = new TicketLineInfo(oLine);
oNewLine.setMultiply(-oLine.getMultiply());
m_jTicketEdit.addTicketLine(oNewLine);
if (isMultiplyControl) {
ticketlines.removeTicketLine(index);
m_aLines.remove(index);
}
}
}
示例8: getSelectedLinesUnit
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
public TicketLineInfo[] getSelectedLinesUnit() {
// never returns an empty array, or null, or an array with at least one element.
int i = findFirstNonAuxiliarLine();
if (i >= 0) {
TicketLineInfo line = ticket.getLine(i);
if (line.getMultiply() >= 1.0) {
List<TicketLineInfo> l = new ArrayList<TicketLineInfo>();
if (line.getMultiply() > 1.0) {
line.setMultiply(line.getMultiply() -1.0);
ticketlines.setTicketLine(i, line);
line = line.copyTicketLine();
line.setMultiply(1.0);
l.add(line);
i++;
} else { // == 1.0
l.add(line);
ticket.removeLine(i);
ticketlines.removeTicketLine(i);
}
// add also auxiliars
while (i < ticket.getLinesCount() && ticket.getLine(i).isProductCom()) {
l.add(ticket.getLine(i));
ticket.removeLine(i);
ticketlines.removeTicketLine(i);
}
printTotals();
return l.toArray(new TicketLineInfo[l.size()]);
} else { // < 1.0
return null;
}
} else {
return null;
}
}
示例9: getSelectedLinesUnit
import com.openbravo.pos.ticket.TicketLineInfo; //导入方法依赖的package包/类
/**
*
* @return
*/
public TicketLineInfo[] getSelectedLinesUnit() {
// never returns an empty array, or null, or an array with at least one element.
int i = findFirstNonAuxiliarLine();
if (i >= 0) {
TicketLineInfo line = ticket.getLine(i);
if (line.getMultiply() >= 1.0) {
List<TicketLineInfo> l = new ArrayList<>();
if (line.getMultiply() > 1.0) {
line.setMultiply(line.getMultiply() -1.0);
ticketlines.setTicketLine(i, line);
line = line.copyTicketLine();
line.setMultiply(1.0);
l.add(line);
i++;
} else { // == 1.0
l.add(line);
ticket.removeLine(i);
ticketlines.removeTicketLine(i);
}
// add also auxiliars
while (i < ticket.getLinesCount() && ticket.getLine(i).isProductCom()) {
l.add(ticket.getLine(i));
ticket.removeLine(i);
ticketlines.removeTicketLine(i);
}
printTotals();
return l.toArray(new TicketLineInfo[l.size()]);
} else { // < 1.0
return null;
}
} else {
return null;
}
}