From: Anneli <an...@us...> - 2005-01-12 15:43:32
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22507/src/org/redpos/client/ui/plugin/function Modified Files: FindProductUI.java FindReceiptUI.java Log Message: Input field in search should not be editable when product/receipt has been choosen Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FindProductUI.java 10 Jan 2005 15:23:57 -0000 1.2 --- FindProductUI.java 12 Jan 2005 15:43:21 -0000 1.3 *************** *** 238,242 **** int index = productTable.getSelectionIndex(); if(index != -1) ! showProduct(index); } }; --- 238,245 ---- int index = productTable.getSelectionIndex(); if(index != -1) ! { ! inputField.setEditable(false); ! showProduct(index); ! } } }; *************** *** 314,317 **** --- 317,321 ---- public void handleEvent(Event arg0) { + inputField.setEditable(true); productInfoBackSelected(); } Index: FindReceiptUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindReceiptUI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FindReceiptUI.java 11 Jan 2005 17:11:39 -0000 1.1 --- FindReceiptUI.java 12 Jan 2005 15:43:21 -0000 1.2 *************** *** 49,52 **** --- 49,53 ---- import org.eclipse.swt.widgets.Listener; import org.redpos.amount.Amount; + import org.redpos.client.contract.receipt.ReceiptConstants; import org.redpos.client.contract.receipt.ReceiptData; import org.redpos.client.lang.contract.Language; *************** *** 79,82 **** --- 80,85 ---- private Label receiptAmountText; private Label receiptAmount; + private Label receiptTypeText; + private Label receiptType; *************** *** 218,222 **** --- 221,228 ---- int index = receiptTable.getSelectionIndex(); if (index != -1) + { + inputField.setEditable(false); showReceipt(index); + } } }; *************** *** 237,241 **** GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; ! gridLayout.verticalSpacing = 10; receiptInfo.setLayout(gridLayout); --- 243,247 ---- GridLayout gridLayout = new GridLayout(); gridLayout.numColumns = 2; ! gridLayout.verticalSpacing = 8; receiptInfo.setLayout(gridLayout); *************** *** 251,255 **** "ui.plugin.receipt.findreceipt.receiptid.text", "Receipt:")); - receiptId = new Label(receiptInfo, SWT.LEFT); receiptId.setBackground(getBackground()); --- 257,260 ---- *************** *** 259,262 **** --- 264,284 ---- receiptId.setLayoutData(receiptIdData); + receiptTypeText = new Label(receiptInfo, SWT.LEFT); + receiptTypeText.setFont(fontManager.getDefaultBoldFont()); + receiptTypeText.setBackground(getBackground()); + GridData receiptTypeTextData = new GridData(); + receiptTypeTextData.horizontalAlignment = GridData.BEGINNING; + receiptTypeTextData.verticalAlignment = GridData.CENTER; + receiptTypeText.setLayoutData(receiptTypeTextData); + receiptTypeText.setText(language.getString( + "ui.plugin.receipt.findreceipt.receipttype.text", "Receipt type:")); + + receiptType = new Label(receiptInfo, SWT.LEFT); + receiptType.setBackground(getBackground()); + GridData receiptTypeData = new GridData(); + receiptTypeData.horizontalAlignment = GridData.BEGINNING; + receiptTypeData.verticalAlignment = GridData.CENTER; + receiptType.setLayoutData(receiptTypeData); + receiptDateText= new Label(receiptInfo, SWT.RIGHT); receiptDateText.setFont(fontManager.getDefaultBoldFont()); *************** *** 390,393 **** --- 412,416 ---- { stack.topControl = receiptTable; + inputField.setEditable(true); centerStack.layout(); } *************** *** 477,481 **** receiptCashier.setText(receipt.receiptData.getCashier()); receiptAmount.setText(receipt.amountTotal.toString()); ! receiptInfo.layout(); --- 500,517 ---- receiptCashier.setText(receipt.receiptData.getCashier()); receiptAmount.setText(receipt.amountTotal.toString()); ! String type = ""; ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_NORMAL) ! type = language.getString( ! "ui.plugin.receipt.findreceipt.string3.text", "Sale"); ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_COMPLAINT) ! type = language.getString( ! "ui.plugin.receipt.findreceipt.string4.text", "Complaint"); ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_CORRECTION) ! type = language.getString( ! "ui.plugin.receipt.findreceipt.string5.text", "Correction"); ! if (receipt.receiptData.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_RETURN) ! type = language.getString( ! "ui.plugin.receipt.findreceipt.string6.text", "Return"); ! receiptType.setText(type); receiptInfo.layout(); |