You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(8) |
Dec
(155) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(50) |
Feb
(18) |
Mar
(18) |
Apr
|
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Anneli <an...@us...> - 2005-06-13 07:27:34
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24093/src/org/redpos/client/ui/plugin/function Modified Files: Pay.java Log Message: Receipt of type complaint, return, or correction does no longer cause problems when selecting a paymenttype that does not allow repay Index: Pay.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Pay.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Pay.java 2 May 2005 14:09:55 -0000 1.8 --- Pay.java 13 Jun 2005 07:27:10 -0000 1.9 *************** *** 300,306 **** private void handlePaymentSelected() { ! if(toPay.doubleValue() != 0) { ! // remove payment selector from ui if (paymentSelection != null) { --- 300,306 ---- private void handlePaymentSelected() { ! if(toPay.doubleValue() > 0) { ! // remove payment selector from ui if (paymentSelection != null) { *************** *** 537,540 **** --- 537,557 ---- getLog().warn("addPayment: payment exception: " + e.getMessage()); + + // if showPaySelectionUi is false and there are no paymentSelection object + // this receipt is a COMPLAINT, RETURN OR CORRECTION and the user has do choose + // another type of payment + if ((!showPaySelectionUI) && (paymentSelection == null)) + { + showPaySelectionUI = true; + + // create payment selector + paymentSelection = new PaymentSelection(parent, getLanguage(), this, + getAvailablePayments()); + paymentSelection.setFocus(); + paymentSelection.setPayTotal(toPay); + + parent.layout(); + + } } catch(Exception e) |
From: Anneli <an...@us...> - 2005-06-10 09:19:27
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13877/src/org/redpos/client/ui Modified Files: POSDashboardContext.java Log Message: No longer possible to press ESC when you are in logoff-dialog, bug 1108213 Index: POSDashboardContext.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSDashboardContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** POSDashboardContext.java 2 May 2005 09:16:55 -0000 1.4 --- POSDashboardContext.java 10 Jun 2005 09:19:18 -0000 1.5 *************** *** 208,225 **** Object response = mServer.invoke(logoffSession, "escLogoff", params, signature); ! ! if(((Boolean)response).booleanValue() == true) ! { } ! else ! { ! // enable other UI components ! UIDisabler.getInstance().fireEnable(); ! // go... ! home(); ! } ! } catch(Exception ex) { ! ex.printStackTrace(); } } --- 208,218 ---- Object response = mServer.invoke(logoffSession, "escLogoff", params, signature); ! } catch(Exception ex) { ! // enable other UI components ! UIDisabler.getInstance().fireEnable(); ! // go... ! home(); } } |
From: Anneli <an...@us...> - 2005-05-02 14:10:32
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3403/src/org/redpos/client/ui/plugin/function Modified Files: Pay.java Log Message: It it now possible to finalise a correction receipt with total discount in percentage, bug 1186486. Index: Pay.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Pay.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Pay.java 7 Mar 2005 11:14:00 -0000 1.7 --- Pay.java 2 May 2005 14:09:55 -0000 1.8 *************** *** 300,304 **** private void handlePaymentSelected() { ! if(toPay.doubleValue() > 0) { // remove payment selector from ui --- 300,304 ---- private void handlePaymentSelected() { ! if(toPay.doubleValue() != 0) { // remove payment selector from ui |
From: Anneli <an...@us...> - 2005-05-02 13:17:46
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23980/src/org/redpos/client Modified Files: POSEngine.java Log Message: It is now possible to give discount on a correction receipt, bug 1186489 Index: POSEngine.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/POSEngine.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** POSEngine.java 7 Mar 2005 11:13:59 -0000 1.8 --- POSEngine.java 2 May 2005 13:16:31 -0000 1.9 *************** *** 872,883 **** // confirm that discount limit is not exceeded ! if(percent != null ! && percent.doubleValue() > 1 ! || amount != null ! && amount.doubleValue() > (rr.getAmount().doubleValue() * rr.getQuantity())) { ! throw new POSEngineException( ! "Cannot add row discount, discount limit has been exceeded", ! POSEngineException.DISCOUNT_LIMIT_EXCEEDED_EXCEPTION); } --- 872,907 ---- // confirm that discount limit is not exceeded ! try { ! if (receiptSessionUtility.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_NORMAL) ! { ! if(percent != null && percent.doubleValue() > 1 ! || amount != null && amount.doubleValue() > (rr.getAmount().doubleValue() * rr.getQuantity())) ! { ! throw new POSEngineException( ! "Cannot add row discount, discount limit has been exceeded", ! POSEngineException.DISCOUNT_LIMIT_EXCEEDED_EXCEPTION); ! } ! } ! else ! { ! if (amount != null) ! amount.multiply(-1); ! if(percent != null && percent.doubleValue() > 1 ! || amount != null && amount.doubleValue() < (rr.getAmount().doubleValue() * rr.getQuantity())) ! { ! throw new POSEngineException( ! "Cannot add row discount, discount limit has been exceeded", ! POSEngineException.DISCOUNT_LIMIT_EXCEEDED_EXCEPTION); ! } ! } ! } ! catch(POSEngineException e) ! { ! log.error(e.getMessage(), e); ! } ! catch(JMException e) ! { ! log.error(e.getMessage(), e); } *************** *** 966,977 **** { Amount total = receiptSessionUtility.getTotal(); ! ! if(percent != null && percent.doubleValue() > 1 || amount != null && amount.doubleValue() > total.doubleValue()) ! { throw new POSEngineException( "Cannot add total discount, discount limit has been exceeded", POSEngineException.DISCOUNT_LIMIT_EXCEEDED_EXCEPTION); ! } } catch(JMException e1) --- 990,1015 ---- { Amount total = receiptSessionUtility.getTotal(); ! if (receiptSessionUtility.getReceiptType() == ReceiptConstants.TYPE_RECEIPT_NORMAL) ! { ! if(percent != null && percent.doubleValue() > 1 || amount != null && amount.doubleValue() > total.doubleValue()) ! { throw new POSEngineException( "Cannot add total discount, discount limit has been exceeded", POSEngineException.DISCOUNT_LIMIT_EXCEEDED_EXCEPTION); ! } ! } ! else ! { ! if (amount != null) ! amount.multiply(-1); ! if(percent != null && percent.doubleValue() > 1 || amount != null ! && amount.doubleValue() < total.doubleValue()) ! { ! throw new POSEngineException( ! "Cannot add total discount, discount limit has been exceeded", ! POSEngineException.DISCOUNT_LIMIT_EXCEEDED_EXCEPTION); ! } ! } } catch(JMException e1) *************** *** 983,986 **** --- 1021,1025 ---- } + // create discount receipt row DiscountReceiptRow discountRow; |
From: Anneli <an...@us...> - 2005-05-02 09:17:24
|
Update of /cvsroot/redpos/RedPOS/lang/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31802/lang/conf Modified Files: lang-en-EN.xml lang-sv-SE.xml Log Message: No longer possible to press ESC when you are in logoff-dialog, bug 1108213 Index: lang-sv-SE.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-sv-SE.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lang-sv-SE.xml 7 Mar 2005 11:13:48 -0000 1.7 --- lang-sv-SE.xml 2 May 2005 09:16:55 -0000 1.8 *************** *** 149,152 **** --- 149,153 ---- <string desc="UI main window message" name="ui.main.message.logoff1.text">* Det går inte att byta kassör när det finns ett pågående kvitto *</string> <string desc="UI main window message" name="ui.main.message.logoff2.text">! Det går inte att logga ut kassör när det finns ett pågående kvitto !</string> + <string desc="UI main window message" name="ui.main.message.logoff3.text">! Det går inte att trycka ESC, du måste logga in !</string> <string desc="UI main window message" name="ui.main.message.maketallyandreport1.text">! Avstämningen misslyckades !</string> <string desc="UI main window message" name="ui.main.message.maketallyandreport2.text">! Det går inte att skapa rapport !</string> Index: lang-en-EN.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-en-EN.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lang-en-EN.xml 7 Mar 2005 11:13:47 -0000 1.7 --- lang-en-EN.xml 2 May 2005 09:16:55 -0000 1.8 *************** *** 147,150 **** --- 147,151 ---- <string desc="UI main window message" name="ui.main.message.logoff1.text">* You can not change the cashier until you have finished this receipt *</string> <string desc="UI main window message" name="ui.main.message.logoff2.text">! The attempt to log out cashier failed !</string> + <string desc="UI main window message" name="ui.main.message.logoff3.text">! You can not press ESC, you have to login !</string> <string desc="UI main window message" name="ui.main.message.maketallyandreport1.text">! The reconsiliation failed !</string> <string desc="UI main window message" name="ui.main.message.maketallyandreport2.text">! The End-of-day report could not be created !</string> |
From: Anneli <an...@us...> - 2005-05-02 09:17:24
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31802/src/org/redpos/client/ui Modified Files: POSDashboardContext.java Log Message: No longer possible to press ESC when you are in logoff-dialog, bug 1108213 Index: POSDashboardContext.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSDashboardContext.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** POSDashboardContext.java 7 Mar 2005 11:13:56 -0000 1.3 --- POSDashboardContext.java 2 May 2005 09:16:55 -0000 1.4 *************** *** 198,208 **** if(e.character == SWT.ESC && !isAtHome) { ! // enable other UI components ! UIDisabler.getInstance().fireEnable(); ! // go... ! home(); } } }; display.addFilter(SWT.KeyUp, keyListener); --- 198,229 ---- if(e.character == SWT.ESC && !isAtHome) { ! try ! { ! ObjectName logoffSession = new ObjectName( ! "RedPOS.client.ui.plugin.function:service=Logoff"); ! Object[] params = {}; ! String[] signature = {}; ! ! // invoke method in ui service registry ! Object response = mServer.invoke(logoffSession, "escLogoff", params, ! signature); + if(((Boolean)response).booleanValue() == true) + { } + else + { + // enable other UI components + UIDisabler.getInstance().fireEnable(); + // go... + home(); + } + } + catch(Exception ex) + { + ex.printStackTrace(); + } } } + }; display.addFilter(SWT.KeyUp, keyListener); *************** *** 210,214 **** // } ! public void paymentSelected(PaymentInfo payment) { --- 231,235 ---- // } ! public void paymentSelected(PaymentInfo payment) { |
From: Anneli <an...@us...> - 2005-05-02 09:17:04
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31802/src/org/redpos/client/ui/plugin/function Modified Files: Logoff.java Log Message: No longer possible to press ESC when you are in logoff-dialog, bug 1108213 Index: Logoff.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Logoff.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Logoff.java 18 Mar 2005 14:15:43 -0000 1.3 --- Logoff.java 2 May 2005 09:16:55 -0000 1.4 *************** *** 34,37 **** --- 34,40 ---- import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; + import org.eclipse.swt.events.KeyAdapter; + import org.eclipse.swt.events.KeyEvent; + import org.eclipse.swt.events.KeyListener; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; *************** *** 71,75 **** private LoginUI loginUI; ! /** * @see org.redpos.client.ui.plugin.PluginFunctionMBean#invoke(org.eclipse.swt.widgets.Composite) --- 74,78 ---- private LoginUI loginUI; ! /** * @see org.redpos.client.ui.plugin.PluginFunctionMBean#invoke(org.eclipse.swt.widgets.Composite) *************** *** 134,138 **** // update parent composite parent.layout(); ! loginUI.setFocus(); } --- 137,141 ---- // update parent composite parent.layout(); ! loginUI.setFocus(); } *************** *** 172,175 **** --- 175,189 ---- return false; } + + /** + * Is logoff in use + * + * @jmx.managed-operation + */ + public boolean escLogoff() + { + return loginUI.getEscLogoff(); + } + /** *************** *** 343,346 **** --- 357,362 ---- private Color black; + + private boolean escLogoff = false; /** * @param arg0 *************** *** 451,454 **** --- 467,488 ---- usernameGridData.horizontalAlignment = GridData.FILL; usernameField.setLayoutData(usernameGridData); + // create input field key listener + KeyListener keyListener = new KeyAdapter() + { + + public void keyPressed(KeyEvent event) + { + if(event.character == SWT.ESC) + { + // send message to ui + String message = getLanguageString( + "ui.main.message.logoff3.text", "Cannot use ESC, you have to login"); + sendUIMessage(message); + setEscLogoff(true); + } + } + + }; + usernameField.addKeyListener(keyListener); // create title for password field Label passwordTitleLabel = new Label(centerComposite, SWT.LEFT); *************** *** 465,468 **** --- 499,520 ---- passwordGridData.horizontalAlignment = GridData.FILL; passwordField.setLayoutData(passwordGridData); + // create input field key listener + KeyListener keyListenerpw = new KeyAdapter() + { + + public void keyPressed(KeyEvent event) + { + if(event.character == SWT.ESC) + { + // send message to ui + String message = getLanguageString( + "ui.main.message.logoff3.text", "Cannot use ESC, you have to login"); + sendUIMessage(message); + setEscLogoff(true); + } + } + + }; + passwordField.addKeyListener(keyListenerpw); // create button composite *************** *** 507,510 **** --- 559,563 ---- public void handleEvent(Event arg0) { + setEscLogoff(false); okButtonSelected(); } *************** *** 529,533 **** cancelButton.setBackground(getBackground()); cancelButton.addFocusListener(buttonFocusListener); ! } --- 582,586 ---- cancelButton.setBackground(getBackground()); cancelButton.addFocusListener(buttonFocusListener); ! } *************** *** 568,572 **** layout(); } ! /** * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent) --- 621,634 ---- layout(); } ! ! public void setEscLogoff(boolean value) ! { ! escLogoff = value; ! } ! public boolean getEscLogoff() ! { ! return escLogoff; ! } ! /** * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent) |
From: Anneli <an...@us...> - 2005-03-18 14:15:52
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6369/src/org/redpos/client/ui/plugin/function Modified Files: Logoff.java FindReceiptUI.java UserInputUI.java FindProductUI.java ConfirmActionUI.java Log Message: Change color on buttons with focus Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** FindProductUI.java 1 Mar 2005 14:26:52 -0000 1.6 --- FindProductUI.java 18 Mar 2005 14:15:43 -0000 1.7 *************** *** 26,29 **** --- 26,32 ---- import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StackLayout; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 33,36 **** --- 36,40 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; *************** *** 93,96 **** --- 97,104 ---- private String lastFind; + private static Color blue; + private static Color black; + + /** * Constructor *************** *** 107,110 **** --- 115,121 ---- setBackground(parent.getBackground()); productSearch = productSearchInput; + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 302,305 **** --- 313,340 ---- productInfoSalesupportData.widthHint = 345; productInfoSalesupport.setLayoutData(productInfoSalesupportData); + + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; // create composite for the buttons *************** *** 328,331 **** --- 363,367 ---- }; productInfoBackButton.addListener(SWT.Selection, backButtonListener); + productInfoBackButton.addFocusListener(buttonFocusListener); productInfoToRegisterButton = new Button(buttonComposite, SWT.PUSH); *************** *** 344,347 **** --- 380,384 ---- productInfoToRegisterButton.addListener(SWT.Selection, toRegisterButtonListener); + productInfoToRegisterButton.addFocusListener(buttonFocusListener); // add traverse listeners to handle focus order Index: UserInputUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/UserInputUI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UserInputUI.java 23 Nov 2004 16:02:26 -0000 1.1 --- UserInputUI.java 18 Mar 2005 14:15:43 -0000 1.2 *************** *** 25,28 **** --- 25,31 ---- import org.eclipse.swt.SWT; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 30,33 **** --- 33,37 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; *************** *** 67,70 **** --- 71,78 ---- private Button cancelButton; + + private static Color blue; + + private static Color black; /** *************** *** 87,90 **** --- 95,101 ---- this.listener = listener; setBackground(parent.getBackground()); + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 212,215 **** --- 223,250 ---- } }); + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; + okButton.addFocusListener(buttonFocusListener); // set OK button as the default button *************** *** 228,231 **** --- 263,267 ---- } }); + cancelButton.addFocusListener(buttonFocusListener); // create a traverse listener for the cancel button Index: Logoff.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Logoff.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Logoff.java 19 Feb 2005 08:37:14 -0000 1.2 --- Logoff.java 18 Mar 2005 14:15:43 -0000 1.3 *************** *** 37,40 **** --- 37,41 ---- import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; *************** *** 338,341 **** --- 339,346 ---- private Composite parent; + + private Color blue; + + private Color black; /** * @param arg0 *************** *** 351,354 **** --- 356,362 ---- this.setBackground(parent.getBackground()); + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 467,471 **** buttonComposite.setBackground(getBackground()); ! // create ok button Button okButton = new Button(buttonComposite, SWT.PUSH); --- 475,502 ---- buttonComposite.setBackground(getBackground()); ! // create focus listener for button ! FocusListener buttonFocusListener = new FocusAdapter() ! { ! public void focusGained(FocusEvent e) ! { ! // when the button receives the focus, change color ! if(e.widget instanceof Button) ! { ! Button button = (Button)e.widget; ! button.setForeground(blue); ! } ! } ! ! public void focusLost(FocusEvent e) ! { ! // when the button receives the focus, go back to default color ! if(e.widget instanceof Button) ! { ! Button button = (Button)e.widget; ! button.setForeground(black); ! } ! } ! }; ! // create ok button Button okButton = new Button(buttonComposite, SWT.PUSH); *************** *** 481,484 **** --- 512,516 ---- okButton.addListener(SWT.Selection, okButtonListener); okButton.setBackground(getBackground()); + okButton.addFocusListener(buttonFocusListener); // create cancel button *************** *** 496,499 **** --- 528,533 ---- cancelButton.addListener(SWT.Selection, cancelButtonListener); cancelButton.setBackground(getBackground()); + cancelButton.addFocusListener(buttonFocusListener); + } Index: ConfirmActionUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/ConfirmActionUI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ConfirmActionUI.java 20 Feb 2005 11:05:42 -0000 1.3 --- ConfirmActionUI.java 18 Mar 2005 14:15:43 -0000 1.4 *************** *** 27,30 **** --- 27,33 ---- import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 32,35 **** --- 35,39 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; *************** *** 85,88 **** --- 89,96 ---- private Button noButton; + + private static Color blue; + + private static Color black; /** *************** *** 109,112 **** --- 117,123 ---- this.parent = parent; + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(message); *************** *** 173,176 **** --- 184,211 ---- buttonCompositeData.verticalAlignment = GridData.END; buttonComposite.setLayoutData(buttonCompositeData); + + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; if(type == YES_NO_SELECTION) *************** *** 181,184 **** --- 216,220 ---- yesButton.setData(new Integer(YES_OPTION)); yesButton.addListener(SWT.Selection, buttonListener); + yesButton.addFocusListener(buttonFocusListener); KeyListener yesButtonKeyListener = new KeyAdapter() *************** *** 202,205 **** --- 238,242 ---- noButton.setData(new Integer(NO_OPTION)); noButton.addListener(SWT.Selection, buttonListener); + noButton.addFocusListener(buttonFocusListener); KeyListener noButtonKeyListener = new KeyAdapter() *************** *** 261,264 **** --- 298,302 ---- okButton.setData(new Integer(OK_OPTION)); okButton.addListener(SWT.Selection, buttonListener); + okButton.addFocusListener(buttonFocusListener); KeyListener okButtonKeyListener = new KeyAdapter() Index: FindReceiptUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindReceiptUI.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FindReceiptUI.java 1 Mar 2005 14:26:52 -0000 1.4 --- FindReceiptUI.java 18 Mar 2005 14:15:43 -0000 1.5 *************** *** 30,33 **** --- 30,36 ---- import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StackLayout; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 37,40 **** --- 40,44 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridLayout; *************** *** 83,86 **** --- 87,92 ---- private Label receiptType; private ReceiptTableItemData receiptTableItemData; + private static Color blue; + private static Color black; *************** *** 97,100 **** --- 103,109 ---- setBackground(parent.getBackground()); + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 334,337 **** --- 343,370 ---- receiptCashier.setLayoutData(receiptCashierData); + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; + //create composite for the buttons Composite buttonComposite = new Composite(receiptInfo, SWT.NORMAL); *************** *** 358,361 **** --- 391,395 ---- }; receiptInfoBackButton.addListener(SWT.Selection, backButtonListener); + receiptInfoBackButton.addFocusListener(buttonFocusListener); //add to receipt button *************** *** 373,376 **** --- 407,411 ---- }; receiptInfoToRegisterButton.addListener(SWT.Selection, toRegisterButtonListener); + receiptInfoToRegisterButton.addFocusListener(buttonFocusListener); //add traverse listeners to handle focus order |
From: Anneli <an...@us...> - 2005-03-18 14:15:52
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6369/src/org/redpos/client/ui/plugin Modified Files: PluginFactory.java Log Message: Change color on buttons with focus Index: PluginFactory.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/PluginFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PluginFactory.java 23 Nov 2004 16:02:03 -0000 1.1 --- PluginFactory.java 18 Mar 2005 14:15:43 -0000 1.2 *************** *** 32,37 **** --- 32,41 ---- import org.eclipse.swt.SWT; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; *************** *** 55,58 **** --- 59,66 ---- private static PluginFactory theInstance = null; + + private static Color blue; + + private static Color black; /** *************** *** 90,93 **** --- 98,103 ---- PluginCategoryUtility categoryUtility) { + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); // create a vector for ze buttons Vector buttons = new Vector(); *************** *** 162,165 **** --- 172,200 ---- layoutData.verticalAlignment = GridData.FILL; button.setLayoutData(layoutData); + + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; + button.addFocusListener(buttonFocusListener); buttons.add(button); |
From: Lennart P. <le...@us...> - 2005-03-16 10:41:24
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6822/src/org/redpos/client/ui/plugin/function Modified Files: Tag: Branch_1_6_1 Logoff.java FindReceiptUI.java UserInputUI.java FindProductUI.java ConfirmActionUI.java Log Message: Change color on buttons with focus Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** FindProductUI.java 1 Mar 2005 14:26:52 -0000 1.6 --- FindProductUI.java 16 Mar 2005 10:41:13 -0000 1.6.2.1 *************** *** 26,29 **** --- 26,32 ---- import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StackLayout; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 33,36 **** --- 36,40 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; *************** *** 93,96 **** --- 97,104 ---- private String lastFind; + private static Color blue; + private static Color black; + + /** * Constructor *************** *** 107,110 **** --- 115,121 ---- setBackground(parent.getBackground()); productSearch = productSearchInput; + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 302,305 **** --- 313,340 ---- productInfoSalesupportData.widthHint = 345; productInfoSalesupport.setLayoutData(productInfoSalesupportData); + + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; // create composite for the buttons *************** *** 328,331 **** --- 363,367 ---- }; productInfoBackButton.addListener(SWT.Selection, backButtonListener); + productInfoBackButton.addFocusListener(buttonFocusListener); productInfoToRegisterButton = new Button(buttonComposite, SWT.PUSH); *************** *** 344,347 **** --- 380,384 ---- productInfoToRegisterButton.addListener(SWT.Selection, toRegisterButtonListener); + productInfoToRegisterButton.addFocusListener(buttonFocusListener); // add traverse listeners to handle focus order Index: UserInputUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/UserInputUI.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** UserInputUI.java 23 Nov 2004 16:02:26 -0000 1.1 --- UserInputUI.java 16 Mar 2005 10:41:13 -0000 1.1.2.1 *************** *** 25,28 **** --- 25,31 ---- import org.eclipse.swt.SWT; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 30,33 **** --- 33,37 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; *************** *** 67,70 **** --- 71,78 ---- private Button cancelButton; + + private static Color blue; + + private static Color black; /** *************** *** 87,90 **** --- 95,101 ---- this.listener = listener; setBackground(parent.getBackground()); + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 212,215 **** --- 223,250 ---- } }); + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; + okButton.addFocusListener(buttonFocusListener); // set OK button as the default button *************** *** 228,231 **** --- 263,267 ---- } }); + cancelButton.addFocusListener(buttonFocusListener); // create a traverse listener for the cancel button Index: Logoff.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Logoff.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** Logoff.java 19 Feb 2005 08:37:14 -0000 1.2 --- Logoff.java 16 Mar 2005 10:41:13 -0000 1.2.2.1 *************** *** 37,40 **** --- 37,41 ---- import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; *************** *** 338,341 **** --- 339,346 ---- private Composite parent; + + private Color blue; + + private Color black; /** * @param arg0 *************** *** 351,354 **** --- 356,362 ---- this.setBackground(parent.getBackground()); + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 467,471 **** buttonComposite.setBackground(getBackground()); ! // create ok button Button okButton = new Button(buttonComposite, SWT.PUSH); --- 475,502 ---- buttonComposite.setBackground(getBackground()); ! // create focus listener for button ! FocusListener buttonFocusListener = new FocusAdapter() ! { ! public void focusGained(FocusEvent e) ! { ! // when the button receives the focus, change color ! if(e.widget instanceof Button) ! { ! Button button = (Button)e.widget; ! button.setForeground(blue); ! } ! } ! ! public void focusLost(FocusEvent e) ! { ! // when the button receives the focus, go back to default color ! if(e.widget instanceof Button) ! { ! Button button = (Button)e.widget; ! button.setForeground(black); ! } ! } ! }; ! // create ok button Button okButton = new Button(buttonComposite, SWT.PUSH); *************** *** 481,484 **** --- 512,516 ---- okButton.addListener(SWT.Selection, okButtonListener); okButton.setBackground(getBackground()); + okButton.addFocusListener(buttonFocusListener); // create cancel button *************** *** 496,499 **** --- 528,533 ---- cancelButton.addListener(SWT.Selection, cancelButtonListener); cancelButton.setBackground(getBackground()); + cancelButton.addFocusListener(buttonFocusListener); + } Index: ConfirmActionUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/ConfirmActionUI.java,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** ConfirmActionUI.java 20 Feb 2005 11:05:42 -0000 1.3 --- ConfirmActionUI.java 16 Mar 2005 10:41:13 -0000 1.3.2.1 *************** *** 27,30 **** --- 27,33 ---- import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 32,35 **** --- 35,39 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; *************** *** 85,88 **** --- 89,96 ---- private Button noButton; + + private static Color blue; + + private static Color black; /** *************** *** 109,112 **** --- 117,123 ---- this.parent = parent; + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(message); *************** *** 173,176 **** --- 184,211 ---- buttonCompositeData.verticalAlignment = GridData.END; buttonComposite.setLayoutData(buttonCompositeData); + + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; if(type == YES_NO_SELECTION) *************** *** 181,184 **** --- 216,220 ---- yesButton.setData(new Integer(YES_OPTION)); yesButton.addListener(SWT.Selection, buttonListener); + yesButton.addFocusListener(buttonFocusListener); KeyListener yesButtonKeyListener = new KeyAdapter() *************** *** 202,205 **** --- 238,242 ---- noButton.setData(new Integer(NO_OPTION)); noButton.addListener(SWT.Selection, buttonListener); + noButton.addFocusListener(buttonFocusListener); KeyListener noButtonKeyListener = new KeyAdapter() *************** *** 261,264 **** --- 298,302 ---- okButton.setData(new Integer(OK_OPTION)); okButton.addListener(SWT.Selection, buttonListener); + okButton.addFocusListener(buttonFocusListener); KeyListener okButtonKeyListener = new KeyAdapter() Index: FindReceiptUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindReceiptUI.java,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** FindReceiptUI.java 1 Mar 2005 14:26:52 -0000 1.4 --- FindReceiptUI.java 16 Mar 2005 10:41:13 -0000 1.4.2.1 *************** *** 30,33 **** --- 30,36 ---- import org.eclipse.swt.SWT; import org.eclipse.swt.custom.StackLayout; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.KeyAdapter; import org.eclipse.swt.events.KeyEvent; *************** *** 37,40 **** --- 40,44 ---- import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridLayout; *************** *** 83,86 **** --- 87,92 ---- private Label receiptType; private ReceiptTableItemData receiptTableItemData; + private static Color blue; + private static Color black; *************** *** 97,100 **** --- 103,109 ---- setBackground(parent.getBackground()); + + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); init(); *************** *** 334,337 **** --- 343,370 ---- receiptCashier.setLayoutData(receiptCashierData); + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; + //create composite for the buttons Composite buttonComposite = new Composite(receiptInfo, SWT.NORMAL); *************** *** 358,361 **** --- 391,395 ---- }; receiptInfoBackButton.addListener(SWT.Selection, backButtonListener); + receiptInfoBackButton.addFocusListener(buttonFocusListener); //add to receipt button *************** *** 373,376 **** --- 407,411 ---- }; receiptInfoToRegisterButton.addListener(SWT.Selection, toRegisterButtonListener); + receiptInfoToRegisterButton.addFocusListener(buttonFocusListener); //add traverse listeners to handle focus order |
From: Lennart P. <le...@us...> - 2005-03-16 10:41:23
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6822/src/org/redpos/client/ui/plugin Modified Files: Tag: Branch_1_6_1 PluginFactory.java Log Message: Change color on buttons with focus Index: PluginFactory.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/PluginFactory.java,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** PluginFactory.java 23 Nov 2004 16:02:03 -0000 1.1 --- PluginFactory.java 16 Mar 2005 10:41:13 -0000 1.1.2.1 *************** *** 32,37 **** --- 32,41 ---- import org.eclipse.swt.SWT; + import org.eclipse.swt.events.FocusAdapter; + import org.eclipse.swt.events.FocusEvent; + import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.TraverseEvent; import org.eclipse.swt.events.TraverseListener; + import org.eclipse.swt.graphics.Color; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Button; *************** *** 55,58 **** --- 59,66 ---- private static PluginFactory theInstance = null; + + private static Color blue; + + private static Color black; /** *************** *** 90,93 **** --- 98,103 ---- PluginCategoryUtility categoryUtility) { + blue = new Color(parent.getDisplay(),51,51,255); + black = new Color(parent.getDisplay(),0,0,0); // create a vector for ze buttons Vector buttons = new Vector(); *************** *** 162,165 **** --- 172,200 ---- layoutData.verticalAlignment = GridData.FILL; button.setLayoutData(layoutData); + + // create focus listener for button + FocusListener buttonFocusListener = new FocusAdapter() + { + public void focusGained(FocusEvent e) + { + // when the button receives the focus, change color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(blue); + } + } + + public void focusLost(FocusEvent e) + { + // when the button receives the focus, go back to default color + if(e.widget instanceof Button) + { + Button button = (Button)e.widget; + button.setForeground(black); + } + } + }; + button.addFocusListener(buttonFocusListener); buttons.add(button); |
From: Lennart P. <le...@us...> - 2005-03-16 10:40:52
|
Update of /cvsroot/redpos/RedPOS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6668 Modified Files: Tag: Branch_1_6_1 build.xml Log Message: 1.6.1.2 Index: build.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/build.xml,v retrieving revision 1.16 retrieving revision 1.16.2.1 diff -C2 -d -r1.16 -r1.16.2.1 *** build.xml 1 Mar 2005 14:22:51 -0000 1.16 --- build.xml 16 Mar 2005 10:40:39 -0000 1.16.2.1 *************** *** 79,83 **** <property name="version.name" value="Zion"/> <!-- This must be set to the CVS tag for any release --> ! <property name="version.cvstag" value="Rel_1_6_1_1"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> --- 79,83 ---- <property name="version.name" value="Zion"/> <!-- This must be set to the CVS tag for any release --> ! <property name="version.cvstag" value="Rel_1_6_1_2"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> |
From: Lennart P. <le...@us...> - 2005-03-16 10:40:22
|
Update of /cvsroot/redpos/RedPOS/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6620/doc Modified Files: Tag: Branch_1_6_1 readme.txt Log Message: Version 1.6 Index: readme.txt =================================================================== RCS file: /cvsroot/redpos/RedPOS/doc/readme.txt,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** readme.txt 30 Nov 2004 16:33:09 -0000 1.2 --- readme.txt 16 Mar 2005 10:40:13 -0000 1.2.2.1 *************** *** 2,6 **** README RedPOS: The Rock Solid Retail Application ! Version 1.5 ------------------------------------------------------------------------ --- 2,6 ---- README RedPOS: The Rock Solid Retail Application ! Version 1.6 ------------------------------------------------------------------------ |
From: Anneli <an...@us...> - 2005-03-07 14:16:14
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10765/src/org/redpos/client/ui Modified Files: POSMenuShortCommand.java Log Message: Added functionality for short commands when selecting payment Index: POSMenuShortCommand.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSMenuShortCommand.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSMenuShortCommand.java 7 Mar 2005 11:13:56 -0000 1.1 --- POSMenuShortCommand.java 7 Mar 2005 14:16:02 -0000 1.2 *************** *** 40,47 **** /** ! * TODO Enter a description and also your mail address below * * @version <tt>$Revision$</tt> ! * @author <a href="mailto:ENTER-USER@ENTER-DOMAIN">annb</a> */ public class POSMenuShortCommand implements UIDisablerListener --- 40,47 ---- /** ! * The POSMenuShortCommand class represents the short command for registered payments. * * @version <tt>$Revision$</tt> ! * @author <a href="mailto:an...@us...">anba</a> */ public class POSMenuShortCommand implements UIDisablerListener |
From: Anneli <an...@us...> - 2005-03-07 11:14:38
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/contract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/src/org/redpos/client/payment/contract Modified Files: PaymentInfo.java PaymentUtility.java Log Message: Added functionality for short commands when selecting payment Index: PaymentInfo.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/contract/PaymentInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PaymentInfo.java 23 Nov 2004 16:03:07 -0000 1.1 --- PaymentInfo.java 7 Mar 2005 11:13:57 -0000 1.2 *************** *** 52,55 **** --- 52,63 ---- public String code; + /** The service UI accelerator id **/ + public int accelerator; + + /** The service UI statemask id **/ + public int statemask; + + public String id; + /** * *************** *** 58,62 **** --- 66,82 ---- { } + + /** + * + */ + public PaymentInfo(String n, ObjectName sn, int acc, int state) + { + serviceName = sn; + accelerator = acc; + id = serviceName.getCanonicalName(); + statemask = state; + } + public String toString() { Index: PaymentUtility.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/contract/PaymentUtility.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PaymentUtility.java 23 Nov 2004 16:03:07 -0000 1.1 --- PaymentUtility.java 7 Mar 2005 11:13:57 -0000 1.2 *************** *** 151,154 **** return response.booleanValue(); } ! } \ No newline at end of file --- 151,176 ---- return response.booleanValue(); } ! ! /** ! * Returns accelerator key id of service ! * ! * @return accelerator key id ! */ ! public int getAccelerator() throws JMException ! { ! Integer acceleratorInteger = (Integer)this.getAttribute("Accelerator"); ! return acceleratorInteger.intValue(); ! } ! ! /** ! * Returns statemask key id of service ! * ! * @return statemask key id ! */ ! public int getStatemask() throws JMException ! { ! Integer statemaskInteger = (Integer)this.getAttribute("Statemask"); ! return statemaskInteger.intValue(); ! } ! } \ No newline at end of file |
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/src/org/redpos/client/ui Modified Files: UIShellKeyListener.java POSMenuFactory.java UIShell.java POSDashboard.java POSMenuAction.java POSDashboardContext.java Added Files: POSMenuShortCommand.java Log Message: Added functionality for short commands when selecting payment Index: POSMenuFactory.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSMenuFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSMenuFactory.java 23 Nov 2004 16:02:09 -0000 1.1 --- POSMenuFactory.java 7 Mar 2005 11:13:56 -0000 1.2 *************** *** 30,33 **** --- 30,34 ---- import org.redpos.client.lang.contract.Language; + import org.redpos.client.payment.contract.PaymentInfo; import org.redpos.client.ui.plugin.contract.PluginCategoryInfo; *************** *** 46,49 **** --- 47,52 ---- private Vector services = null; + + private Vector payments = null; /** *************** *** 73,78 **** --- 76,103 ---- e.printStackTrace(); } + + // get available payments from PaymentRegistry + try + { + ObjectName paymentRegistry = new ObjectName( + "RedPOS.client.payment:service=PaymentRegistry"); + + Object[] params = {}; + String[] signature = {}; + + // call pos core method + Object response = server.invoke(paymentRegistry, "loadPayments", params, + signature); + if(response != null) + payments = (Vector)response; + } + catch(Exception e) + { + e.printStackTrace(); + } } + + /** * Creates the menu actions *************** *** 98,100 **** --- 123,148 ---- return actions; } + + /** + * Creates the payment actions + * + * @return + */ + public POSMenuAction[] createActionsPayment() + { + if(payments == null) + return null; + + // create an array of actions + POSMenuAction[] actions = new POSMenuAction[payments.size()]; + // parse payments into actions + for(int i = 0; i < payments.size(); i++) + { + PaymentInfo paymentInfo = (PaymentInfo)payments.get(i); + actions[i] = new POSMenuAction(paymentInfo.id, paymentInfo.name, paymentInfo.accelerator, + paymentInfo.statemask, paymentInfo); + } + + return actions; + } } \ No newline at end of file Index: UIShellKeyListener.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/UIShellKeyListener.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** UIShellKeyListener.java 23 Nov 2004 16:02:09 -0000 1.1 --- UIShellKeyListener.java 7 Mar 2005 11:13:56 -0000 1.2 *************** *** 72,76 **** public void keyPressed(KeyEvent event) { ! Integer keyId = new Integer(event.keyCode); // see if we have a key listener for the pressed key if(keyListeners.containsKey(keyId)) --- 72,76 ---- public void keyPressed(KeyEvent event) { ! Integer keyId = new Integer(event.keyCode); // see if we have a key listener for the pressed key if(keyListeners.containsKey(keyId)) *************** *** 81,84 **** --- 81,95 ---- listener.handleEvent(new Event()); } + + int keyCode = event.keyCode; + int statemask = event.stateMask; + Integer accelerator = new Integer(keyCode + statemask); + if (keyListeners.containsKey(accelerator)) + { + //get listener + Listener listener = (Listener)keyListeners.get(accelerator); + // invoked handleEvent(..) on listener + listener.handleEvent(new Event()); + } } *************** *** 104,107 **** keyListeners.put(new Integer(keyId), listener); } ! } \ No newline at end of file --- 115,118 ---- keyListeners.put(new Integer(keyId), listener); } ! } \ No newline at end of file Index: POSMenuAction.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSMenuAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSMenuAction.java 23 Nov 2004 16:02:09 -0000 1.1 --- POSMenuAction.java 7 Mar 2005 11:13:56 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.ui; + import org.redpos.client.payment.contract.PaymentInfo; import org.redpos.client.ui.plugin.contract.PluginCategoryInfo; *************** *** 46,49 **** --- 47,54 ---- private String text; + private PaymentInfo paymentInfo; + + private int statemask; + /** * Constructs a new instance *************** *** 58,61 **** --- 63,79 ---- serviceInfo = uis; } + + /** + * Constructs a new instance + */ + public POSMenuAction(String id, String text, int acc, int state, + PaymentInfo payment) + { + this.id = id; + this.text = text; + accelerator = acc; + paymentInfo = payment; + statemask = state; + } /** *************** *** 88,91 **** --- 106,119 ---- return accelerator; } + + /** + * Returns action statemask + * + * @return + */ + public int getStatemask() + { + return statemask; + } /** *************** *** 115,118 **** --- 143,156 ---- return serviceInfo; } + + /** + * Returns payment info object + * + * @return + */ + public PaymentInfo getPaymentInfo() + { + return paymentInfo; + } } \ No newline at end of file --- NEW FILE: POSMenuShortCommand.java --- /* * RedPOS, the OpenSource Point of Sale * * Copyright (C) 2004-2007 Redpill AB * * This application is free software; you can redistribute * it and/or modify it under the terms of the GNU Lesser * General Public License as published by the Free Software * Foundation; either version 2.1 of the License, or * (at your option) any later version. * * This application is distributed in the hope that it will be * useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this application; if not, it can be downloaded * from http://www.gnu.org/licenses/lgpl.html. * * For more information and contacts, please visit http://www.redpos.org * */ package org.redpos.client.ui; import java.util.Iterator; import java.util.Vector; import javax.management.MBeanServer; import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Widget; import org.redpos.client.lang.contract.Language; /** * TODO Enter a description and also your mail address below * * @version <tt>$Revision: 1.1 $</tt> * @author <a href="mailto:ENTER-USER@ENTER-DOMAIN">annb</a> */ public class POSMenuShortCommand implements UIDisablerListener { private MBeanServer server; private Vector listeners; /** The UI object **/ private Composite widget; /** The UI language **/ private Language lang; /** Array of all buttons in menu */ private Button[] menuButtonsPayment; /** * */ public POSMenuShortCommand(Composite parent, Language lang, MBeanServer s) { // create widget widget = new Composite(parent, SWT.NORMAL); this.lang = lang; server = s; // listen to events triggerd by the UIDisabler class UIDisabler.getInstance().addListener(this); init(); } /** * Initializes this class * */ private void init() { // set layout GridLayout layout = new GridLayout(); layout.makeColumnsEqualWidth = true; layout.horizontalSpacing = 0; layout.verticalSpacing = 0; layout.numColumns = 12; layout.marginHeight = 0; layout.marginWidth = 0; widget.setLayout(layout); // create button listener object Listener buttonListener = new Listener() { public void handleEvent(Event arg0) { buttonSelected(arg0.widget); } }; // create factory and use it to get pos menu actions POSMenuFactory factory = new POSMenuFactory(lang, server); // use factory and get payment actions POSMenuAction[] actionsPayment = factory.createActionsPayment(); menuButtonsPayment = new Button[actionsPayment.length]; for(int i = 0; actionsPayment != null && i < actionsPayment.length; i++) { // create button for action Button actionButton = new Button(widget, SWT.PUSH); actionButton.setText(actionsPayment[i].getText()); actionButton.setData(actionsPayment[i]); // create layout data for button GridData layoutData = new GridData(); layoutData.grabExcessHorizontalSpace = true; layoutData.grabExcessVerticalSpace = true; layoutData.horizontalAlignment = GridData.FILL; layoutData.verticalAlignment = GridData.FILL; actionButton.setLayoutData(layoutData); // add listener to button actionButton.addListener(SWT.Selection, buttonListener); // register key event for button UIShellKeyListener.getInstance().register(actionsPayment[i].getAccelerator() + actionsPayment[i].getStatemask(), new ButtonTrigger(actionButton)); // add button to array of buttons menuButtonsPayment[i] = actionButton; } } /** * Invoked when user presses a button in the menu * * @param button */ private void buttonSelected(Widget button) { // get action object related to button POSMenuAction action = (POSMenuAction)button.getData(); // notify listeners of the selected action this.actionSelected(action); } /** * Returns this class UI object * * @return */ public Composite getWidget() { return widget; } /** * Adds a listener * * @param listener */ public void addListener(POSMenuListener listener) { if(listeners == null) listeners = new Vector(); // check if listener hasnt been added before if(!listeners.contains(listener)) listeners.add(listener); } /** * Removes a listener * * @param listener */ public void removeListener(POSMenuListener listener) { if(listeners == null) return; if(listeners.contains(listener)) listeners.remove(listener); } /** * Sends actions to all registered listeners * * @param actionId */ private void actionSelected(POSMenuAction action) { if(listeners == null) return; // invoke action on all listeners for(Iterator iter = listeners.iterator(); iter.hasNext();) { POSMenuListener element = (POSMenuListener)iter.next(); element.somePOSMenuActionSelected(action); } } /** * Inner class implemented as a listener takes a button and selects it when triggered * * @author mats */ private class ButtonTrigger implements Listener { private Button button; public ButtonTrigger(Button b) { button = b; } /** * * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets.Event) */ public void handleEvent(Event arg0) { buttonSelected(button); } } /** * @see org.redpos.client.ui.UIDisablerListener#enableUI() */ public void enableUI() { // enable all buttons // for(int i = 0; i < menuButtonsPayment.length; i++) { menuButtonsPayment[i].setEnabled(true); } } /** * @see org.redpos.client.ui.UIDisablerListener#disableUI() */ public void disableUI() { // disable all buttons // for(int i = 0; i < menuButtonsPayment.length; i++) { menuButtonsPayment[i].setEnabled(false); } } } Index: POSDashboardContext.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSDashboardContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** POSDashboardContext.java 17 Dec 2004 12:10:48 -0000 1.2 --- POSDashboardContext.java 7 Mar 2005 11:13:56 -0000 1.3 *************** *** 45,50 **** --- 45,52 ---- import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Listener; + import org.redpos.client.contract.POSEngineUtility; import org.redpos.client.contract.product.ProductData; import org.redpos.client.lang.contract.Language; + import org.redpos.client.payment.contract.PaymentInfo; import org.redpos.client.ui.plugin.contract.PluginCategoryInfo; import org.redpos.client.ui.plugin.contract.PluginCategoryUtility; *************** *** 93,96 **** --- 95,100 ---- private MBeanServer mServer; + + private POSEngineUtility posEngineUtility; /** *************** *** 103,106 **** --- 107,111 ---- mServer = server; + posEngineUtility = new POSEngineUtility(mServer); dashboard = n; *************** *** 206,209 **** --- 211,241 ---- } + public void paymentSelected(PaymentInfo payment) + { + try + { + posEngineUtility.startSelectedPayment(payment); + // create objectname object for the payment function + ObjectName function; + try + { + function = new ObjectName("RedPOS.client.ui.plugin.function:service=Pay"); + // create a function utility instance for the logoff function + PluginFunctionUtility functionUtility = new PluginFunctionUtility(mServer, function); + // display function in the dashboard + dashboard.getContext().displayFunction(functionUtility); + } + catch(MalformedObjectNameException e) + { + //log.error(e.getMessage(), e); + } + } + catch(JMException e) + { + // log.error(e.getMessage(), e); + } + + } + /** * Displays content with given id *************** *** 238,242 **** } } ! /** * Returns content text --- 270,274 ---- } } ! /** * Returns content text *************** *** 394,403 **** else if(n.getType().equals(PluginConstants.NOTIFICATION_PLUGIN_LOGINPERRECEIPT)) { ! // create objectname object for the payment function ObjectName function; try { function = new ObjectName("RedPOS.client.ui.plugin.function:service=Logoff"); ! // create a function utility instance for the payment function PluginFunctionUtility functionUtility = new PluginFunctionUtility(mServer, function); // display function in the dashboard --- 426,435 ---- else if(n.getType().equals(PluginConstants.NOTIFICATION_PLUGIN_LOGINPERRECEIPT)) { ! // create objectname object for the logoff function ObjectName function; try { function = new ObjectName("RedPOS.client.ui.plugin.function:service=Logoff"); ! // create a function utility instance for the logoff function PluginFunctionUtility functionUtility = new PluginFunctionUtility(mServer, function); // display function in the dashboard Index: POSDashboard.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSDashboard.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSDashboard.java 23 Nov 2004 16:02:09 -0000 1.1 --- POSDashboard.java 7 Mar 2005 11:13:56 -0000 1.2 *************** *** 153,157 **** public void somePOSMenuActionSelected(POSMenuAction action) { ! setContent(action.getId()); } --- 153,162 ---- public void somePOSMenuActionSelected(POSMenuAction action) { ! if (action.getId().startsWith("RedPOS.client.payment:")) ! { ! context.paymentSelected(action.getPaymentInfo()); ! } ! else ! setContent(action.getId()); } Index: UIShell.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/UIShell.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UIShell.java 19 Feb 2005 08:33:53 -0000 1.2 --- UIShell.java 7 Mar 2005 11:13:56 -0000 1.3 *************** *** 266,269 **** --- 266,280 ---- menuData.verticalAlignment = GridData.FILL; posMenu.getWidget().setLayoutData(menuData); + + // create pos menu2 + POSMenuShortCommand posMenuShortCommand = new POSMenuShortCommand(navigationComposite, lang, server); + // create griddata for pos menu + GridData menuData2 = new GridData(); + menuData2.grabExcessHorizontalSpace = true; + menuData2.grabExcessVerticalSpace = true; + menuData2.horizontalAlignment = GridData.FILL; + menuData2.verticalAlignment = GridData.FILL; + posMenuShortCommand.getWidget().setLayoutData(menuData2); + posMenuShortCommand.getWidget().setVisible(false); // create a dummy composite *************** *** 274,277 **** --- 285,289 ---- posDashboard = new POSDashboard(navigationComposite, server, lang); posMenu.addListener(posDashboard); // the dashboard + posMenuShortCommand.addListener(posDashboard); // listens to the // menu |
From: Anneli <an...@us...> - 2005-03-07 11:14:37
|
Update of /cvsroot/redpos/RedPOS/lang/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/lang/conf Modified Files: lang-en-EN.xml lang-sv-SE.xml Log Message: Added functionality for short commands when selecting payment Index: lang-sv-SE.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-sv-SE.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lang-sv-SE.xml 18 Jan 2005 15:31:58 -0000 1.6 --- lang-sv-SE.xml 7 Mar 2005 11:13:48 -0000 1.7 *************** *** 15,41 **** --- 15,54 ---- <string desc="Client POS engine text" name="client.pos.correction.text">Korrigering</string> + <string desc="Client payment text" name="client.payment.statemask">ALT</string> <string desc="Client payment text" name="client.payment.cash.name.text">Kontant</string> + <string desc="Client payment text" name="client.payment.cash.name.accelerator">k</string> <string desc="Client payment text" name="client.payment.cash.receipt.text">Kontant betalning</string> <string desc="Client payment text" name="client.payment.card.name.text">Kontokort</string> + <string desc="Client payment text" name="client.payment.card.name.accelerator">c</string> <string desc="Client payment text" name="client.payment.card.receipt.text">Kontokort betalning</string> <string desc="Client payment text" name="client.payment.giftvoucher.name.text">Presentkort/kupong</string> + <string desc="Client payment text" name="client.payment.giftvoucher.name.accelerator">p</string> <string desc="Client payment text" name="client.payment.giftvoucher.receipt.text">Presentkort/kupong betalning</string> <string desc="Client payment text" name="client.payment.creditnote.name.text">Tillgodokvitto</string> + <string desc="Client payment text" name="client.payment.creditnote.name.accelerator">t</string> <string desc="Client payment text" name="client.payment.creditnote.receipt.text">Tillgodo betalning</string> <string desc="Client payment text" name="client.payment.flowercard.name.text">Blomsterkort</string> + <string desc="Client payment text" name="client.payment.flowercard.name.accelerator">m</string> <string desc="Client payment text" name="client.payment.flowercard.receipt.text">Blomsterkort betalning</string> <string desc="Client payment text" name="client.payment.bonuscard.name.text">Bonuskort</string> + <string desc="Client payment text" name="client.payment.bonuscard.name.accelerator">b</string> <string desc="Client payment text" name="client.payment.bonuscard.receipt.text">Bonuskort betalning</string> <string desc="Client payment text" name="client.payment.pay1.name.text">Amex/Diners</string> + <string desc="Client payment text" name="client.payment.pay1.name.accelerator">a</string> <string desc="Client payment text" name="client.payment.pay1.receipt.text">Amex/Diners betalning</string> <string desc="Client payment text" name="client.payment.pay2.name.text">Övriga presentkort</string> + <string desc="Client payment text" name="client.payment.pay2.name.accelerator">ö</string> <string desc="Client payment text" name="client.payment.pay2.receipt.text">Övriga presentkort betalning</string> <string desc="Client payment text" name="client.payment.pay3.name.text">Försäkringsrekvisition</string> + <string desc="Client payment text" name="client.payment.pay3.name.accelerator">f</string> <string desc="Client payment text" name="client.payment.pay3.receipt.text">Försäkringsrekvisition betalning</string> <string desc="Client payment text" name="client.payment.pay4.name.text">Resurs Räntefritt</string> + <string desc="Client payment text" name="client.payment.pay4.name.accelerator">r</string> <string desc="Client payment text" name="client.payment.pay4.receipt.text">Resurs Räntefritt betalning</string> <string desc="Client payment text" name="client.payment.pay5.name.text">Garantiersättning</string> + <string desc="Client payment text" name="client.payment.pay5.name.accelerator">g</string> <string desc="Client payment text" name="client.payment.pay5.receipt.text">Garantiersättning betalning</string> <string desc="Client payment text" name="client.payment.simplecurrencyexchange.name.text">Norska kronor</string> + <string desc="Client payment text" name="client.payment.simplecurrencyexchange.name.accelerator">n</string> <string desc="Client payment text" name="client.payment.simplecurrencyexchange.receipt.text">Norska kronor betalning</string> Index: lang-en-EN.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/lang/conf/lang-en-EN.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** lang-en-EN.xml 18 Jan 2005 15:31:58 -0000 1.6 --- lang-en-EN.xml 7 Mar 2005 11:13:47 -0000 1.7 *************** *** 13,40 **** <string desc="Client POS engine text" name="client.pos.correction.text">Correction</string> <string desc="Client payment text" name="client.payment.cash.name.text">Cash</string> <string desc="Client payment text" name="client.payment.cash.receipt.text">Cash payment</string> <string desc="Client payment text" name="client.payment.card.name.text">Credit/Debit card</string> <string desc="Client payment text" name="client.payment.card.receipt.text">Card payment</string> <string desc="Client payment text" name="client.payment.giftvoucher.name.text">Gift Voucher</string> <string desc="Client payment text" name="client.payment.giftvoucher.receipt.text">Gift Voucher</string> <string desc="Client payment text" name="client.payment.creditnote.name.text">Credit note</string> <string desc="Client payment text" name="client.payment.creditnote.receipt.text">Credit payment</string> <string desc="Client payment text" name="client.payment.flowercard.name.text">Voucher</string> <string desc="Client payment text" name="client.payment.flowercard.receipt.text">Voucher Payment</string> <string desc="Client payment text" name="client.payment.bonuscard.name.text">Bonus card</string> <string desc="Client payment text" name="client.payment.bonuscard.receipt.text">Bonus card payment</string> <string desc="Client payment text" name="client.payment.pay1.name.text">Payment 1</string> <string desc="Client payment text" name="client.payment.pay1.receipt.text">Payment 1 payment</string> <string desc="Client payment text" name="client.payment.pay2.name.text">Payment 2</string> <string desc="Client payment text" name="client.payment.pay2.receipt.text">Payment 2 payment</string> <string desc="Client payment text" name="client.payment.pay3.name.text">Payment 3</string> <string desc="Client payment text" name="client.payment.pay3.receipt.text">Payment 3 payment</string> <string desc="Client payment text" name="client.payment.pay4.name.text">Payment 4</string> <string desc="Client payment text" name="client.payment.pay4.receipt.text">Payment 4 payment</string> <string desc="Client payment text" name="client.payment.pay5.name.text">Payment 5</string> <string desc="Client payment text" name="client.payment.pay5.receipt.text">Payment 5 payment</string> ! <string desc="Client payment text" name="client.payment.simplecurrencyexchange.name.text">Norska kronor</string> ! <string desc="Client payment text" name="client.payment.simplecurrencyexchange.receipt.text">Norska kronor betalning</string> <string desc="Client receipt text" name="client.receipt.tax.text">VAT</string> --- 13,53 ---- <string desc="Client POS engine text" name="client.pos.correction.text">Correction</string> + <string desc="Client payment text" name="client.payment.statemask">ALT</string> <string desc="Client payment text" name="client.payment.cash.name.text">Cash</string> + <string desc="Client payment text" name="client.payment.cash.name.accelerator">c</string> <string desc="Client payment text" name="client.payment.cash.receipt.text">Cash payment</string> <string desc="Client payment text" name="client.payment.card.name.text">Credit/Debit card</string> + <string desc="Client payment text" name="client.payment.card.name.accelerator">d</string> <string desc="Client payment text" name="client.payment.card.receipt.text">Card payment</string> <string desc="Client payment text" name="client.payment.giftvoucher.name.text">Gift Voucher</string> + <string desc="Client payment text" name="client.payment.giftvoucher.name.accelerator">g</string> <string desc="Client payment text" name="client.payment.giftvoucher.receipt.text">Gift Voucher</string> <string desc="Client payment text" name="client.payment.creditnote.name.text">Credit note</string> + <string desc="Client payment text" name="client.payment.creditnote.name.accelerator">n</string> <string desc="Client payment text" name="client.payment.creditnote.receipt.text">Credit payment</string> <string desc="Client payment text" name="client.payment.flowercard.name.text">Voucher</string> + <string desc="Client payment text" name="client.payment.flowercard.name.accelerator">v</string> <string desc="Client payment text" name="client.payment.flowercard.receipt.text">Voucher Payment</string> <string desc="Client payment text" name="client.payment.bonuscard.name.text">Bonus card</string> + <string desc="Client payment text" name="client.payment.bonuscard.name.accelerator">b</string> <string desc="Client payment text" name="client.payment.bonuscard.receipt.text">Bonus card payment</string> <string desc="Client payment text" name="client.payment.pay1.name.text">Payment 1</string> + <string desc="Client payment text" name="client.payment.pay1.name.accelerator">1</string> <string desc="Client payment text" name="client.payment.pay1.receipt.text">Payment 1 payment</string> <string desc="Client payment text" name="client.payment.pay2.name.text">Payment 2</string> + <string desc="Client payment text" name="client.payment.pay2.name.accelerator">2</string> <string desc="Client payment text" name="client.payment.pay2.receipt.text">Payment 2 payment</string> <string desc="Client payment text" name="client.payment.pay3.name.text">Payment 3</string> + <string desc="Client payment text" name="client.payment.pay3.name.accelerator">3</string> <string desc="Client payment text" name="client.payment.pay3.receipt.text">Payment 3 payment</string> <string desc="Client payment text" name="client.payment.pay4.name.text">Payment 4</string> + <string desc="Client payment text" name="client.payment.pay4.name.accelerator">4</string> <string desc="Client payment text" name="client.payment.pay4.receipt.text">Payment 4 payment</string> <string desc="Client payment text" name="client.payment.pay5.name.text">Payment 5</string> + <string desc="Client payment text" name="client.payment.pay5.name.accelerator">5</string> <string desc="Client payment text" name="client.payment.pay5.receipt.text">Payment 5 payment</string> ! <string desc="Client payment text" name="client.payment.simplecurrencyexchange.name.text">State foreign currency</string> ! <string desc="Client payment text" name="client.payment.simplecurrencyexchange.name.accelerator">s</string> ! <string desc="Client payment text" name="client.payment.simplecurrencyexchange.receipt.text">State foreign currency payment</string> <string desc="Client receipt text" name="client.receipt.tax.text">VAT</string> *************** *** 51,55 **** <string desc="Client receipt printer text" name="client.receiptprinter.gross.text">Gross</string> <string desc="Client receipt printer text" name="client.receiptprinter.change.text">Change</string> ! <string desc="Client receipt printer text" name="client.receiptprinter.change2.text"> Norska kronor</string> <string desc="Client receipt printer text" name="client.receiptprinter.complaint.text">*** COMPLAINT ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.return.text">*** RETURN GOODS ***</string> --- 64,68 ---- <string desc="Client receipt printer text" name="client.receiptprinter.gross.text">Gross</string> <string desc="Client receipt printer text" name="client.receiptprinter.change.text">Change</string> ! <string desc="Client receipt printer text" name="client.receiptprinter.change2.text"> State foreign currency </string> <string desc="Client receipt printer text" name="client.receiptprinter.complaint.text">*** COMPLAINT ***</string> <string desc="Client receipt printer text" name="client.receiptprinter.return.text">*** RETURN GOODS ***</string> |
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/payment In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/src/org/redpos/client/payment Modified Files: Pay2Payment.java CreditNotePayment.java PaymentMBean.java BonusCardPayment.java Pay4Payment.java CashPayment.java CardPayment.java PaymentMBeanSupport.java SimpleCurrencyExchangePayment.java PaymentRegistry.java Pay5Payment.java FlowerCardPayment.java Pay3Payment.java Pay1Payment.java GiftVoucherPayment.java Log Message: Added functionality for short commands when selecting payment Index: CreditNotePayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/CreditNotePayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CreditNotePayment.java 23 Nov 2004 16:02:25 -0000 1.1 --- CreditNotePayment.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 92,95 **** --- 93,108 ---- setLimitRepay(((Double)po.getProperty("payments", "creditnotelimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.creditnote.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } } \ No newline at end of file Index: BonusCardPayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/BonusCardPayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BonusCardPayment.java 23 Nov 2004 16:02:25 -0000 1.1 --- BonusCardPayment.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 91,94 **** --- 92,107 ---- setLimitRepay(((Double)po.getProperty("payments", "bonuscardlimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.bonuscard.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } } \ No newline at end of file Index: CashPayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/CashPayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CashPayment.java 23 Nov 2004 16:02:25 -0000 1.1 --- CashPayment.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 86,89 **** --- 87,103 ---- setLimitRepay(((Double)po.getProperty("payments", "cashlimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.cash.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } + } \ No newline at end of file Index: CardPayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/CardPayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CardPayment.java 23 Nov 2004 16:02:25 -0000 1.1 --- CardPayment.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 83,86 **** --- 84,99 ---- setLimitRepay(((Double)po.getProperty("payments", "cardlimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.card.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } } \ No newline at end of file Index: FlowerCardPayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/FlowerCardPayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FlowerCardPayment.java 23 Nov 2004 16:02:25 -0000 1.1 --- FlowerCardPayment.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 92,95 **** --- 93,108 ---- setLimitRepay(((Double)po.getProperty("payments", "flowercardlimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.flowercard.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } } \ No newline at end of file Index: SimpleCurrencyExchangePayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/SimpleCurrencyExchangePayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleCurrencyExchangePayment.java 17 Jan 2005 10:23:20 -0000 1.1 --- SimpleCurrencyExchangePayment.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 86,89 **** --- 87,102 ---- setLimitRepay(((Double)po.getProperty("payments", "simplecurrencyexchangelimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.simplecurrencyexchange.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } Index: Pay3Payment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/Pay3Payment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Pay3Payment.java 23 Dec 2004 10:20:36 -0000 1.1 --- Pay3Payment.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 85,88 **** --- 86,101 ---- setLimitRepay(((Double)po.getProperty("payments", "pay3limitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.pay3.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } Index: PaymentMBeanSupport.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/PaymentMBeanSupport.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PaymentMBeanSupport.java 23 Nov 2004 16:02:25 -0000 1.1 --- PaymentMBeanSupport.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 73,76 **** --- 73,82 ---- /** The payment code*/ protected String code; + + /** The service UI accelerator id **/ + protected Integer accelerator; + + /** The service UI statemask id **/ + protected Integer statemask; /** *************** *** 367,369 **** --- 373,414 ---- this.code = code; } + + /** + * Returns accelerator id + * + */ + public Integer getAccelerator() + { + return accelerator; + } + + /** + * Sets accelerator id + * + */ + public void setAccelerator(Integer i) + { + this.accelerator = i; + + } + + /** + * Returns statemask id + * + */ + public Integer getStatemask() + { + return statemask; + } + + /** + * Sets statemask id + * + */ + public void setStatemask(Integer i) + { + this.statemask = i; + + } + } \ No newline at end of file Index: Pay5Payment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/Pay5Payment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Pay5Payment.java 23 Dec 2004 10:20:36 -0000 1.1 --- Pay5Payment.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 85,88 **** --- 86,101 ---- setLimitRepay(((Double)po.getProperty("payments", "pay5limitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.pay5.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } Index: PaymentMBean.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/PaymentMBean.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PaymentMBean.java 23 Nov 2004 16:02:25 -0000 1.1 --- PaymentMBean.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 149,152 **** --- 149,174 ---- */ public String getCode(); + + /** + * Sets the payment accelerator + * @param accelerator + */ + public void setAccelerator(Integer accelerator); + + /** + * @return Returns the payment accelerator + */ + public Integer getAccelerator(); + + /** + * Sets the payment statemask + * @param statemask + */ + public void setStatemask(Integer statemask); + + /** + * @return Returns the payment statemask + */ + public Integer getStatemask(); } \ No newline at end of file Index: Pay1Payment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/Pay1Payment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Pay1Payment.java 23 Dec 2004 10:20:36 -0000 1.1 --- Pay1Payment.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 85,88 **** --- 86,101 ---- setLimitRepay(((Double)po.getProperty("payments", "pay1limitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.pay1.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } Index: Pay4Payment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/Pay4Payment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Pay4Payment.java 23 Dec 2004 10:20:36 -0000 1.1 --- Pay4Payment.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 85,88 **** --- 86,101 ---- setLimitRepay(((Double)po.getProperty("payments", "pay4limitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.pay4.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } *************** *** 90,91 **** --- 103,105 ---- } + Index: PaymentRegistry.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/PaymentRegistry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PaymentRegistry.java 23 Nov 2004 16:02:25 -0000 1.1 --- PaymentRegistry.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 96,99 **** --- 96,110 ---- info.updateAllowed = paymentUtility.isUpdateAllowed(); info.cancelAllowed = paymentUtility.isCancelAllowed(); + info.id = element.getCanonicalName(); + + try + { + info.accelerator = paymentUtility.getAccelerator(); + info.statemask = paymentUtility.getStatemask(); + } + catch (Exception e) + { + // no accelarator available + } info.code = paymentUtility.getCode(); Index: Pay2Payment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/Pay2Payment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Pay2Payment.java 23 Dec 2004 10:20:36 -0000 1.1 --- Pay2Payment.java 7 Mar 2005 11:13:45 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 85,88 **** --- 86,101 ---- setLimitRepay(((Double)po.getProperty("payments", "pay2limitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.pay2.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } Index: GiftVoucherPayment.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/payment/GiftVoucherPayment.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GiftVoucherPayment.java 23 Nov 2004 16:02:25 -0000 1.1 --- GiftVoucherPayment.java 7 Mar 2005 11:13:46 -0000 1.2 *************** *** 24,27 **** --- 24,28 ---- package org.redpos.client.payment; + import org.eclipse.swt.SWT; import org.redpos.amount.Amount; import org.redpos.client.contract.properties.PropertiesUtility; *************** *** 91,94 **** --- 92,107 ---- setLimitRepay(((Double)po.getProperty("payments", "giftvoucherlimitrepay")).doubleValue()); + + String accelerator = getLanguageString("client.payment.giftvoucher.name.accelerator", ""); + char acc = accelerator.charAt(0); + setAccelerator(new Integer(acc)); + + String statemask = getLanguageString("client.payment.statemask", ""); + if (statemask.equalsIgnoreCase("CTRL")) + setStatemask(new Integer(SWT.CTRL)); + else if (statemask.equalsIgnoreCase("ALT")) + setStatemask(new Integer(SWT.ALT)); + else if (statemask.equalsIgnoreCase("SHIFT")) + setStatemask(new Integer(SWT.SHIFT)); } } \ No newline at end of file |
From: Anneli <an...@us...> - 2005-03-07 11:14:13
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/src/org/redpos/client/ui/plugin/function Modified Files: Pay.java Log Message: Added functionality for short commands when selecting payment Index: Pay.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/Pay.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Pay.java 19 Feb 2005 08:37:14 -0000 1.6 --- Pay.java 7 Mar 2005 11:14:00 -0000 1.7 *************** *** 46,50 **** import org.redpos.client.ui.plugin.*; import org.redpos.client.ui.plugin.contract.PluginFunctionConstants; - /** * UI plugin function service. Initiates payment of ongoing receipt. --- 46,49 ---- *************** *** 59,63 **** public class Pay extends PluginFunctionMBeanSupport implements ! PayMBean, NotificationListener, PaymentSelection.PaymentSelectionListener, --- 58,62 ---- public class Pay extends PluginFunctionMBeanSupport implements ! PayMBean, NotificationListener, PaymentSelection.PaymentSelectionListener, *************** *** 88,91 **** --- 87,91 ---- private Amount payChange; private static ConfirmActionUI confirm; + private boolean showPaySelectionUI = false; /** *************** *** 107,127 **** return false; } ! ! // get amount to pay ! // ! toPay = getAmountToPay(); ! if(toPay == null) ! return false; ! this.parent = parent; ! // create payment selector ! // ! paymentSelection = new PaymentSelection(parent, getLanguage(), this, ! getAvailablePayments()); ! paymentSelection.setFocus(); ! paymentSelection.setPayTotal(toPay); ! ! parent.layout(); return true; --- 107,133 ---- return false; } ! this.parent = parent; + + if (toPay == null || showPaySelectionUI) + { + // get amount to pay + // + toPay = getAmountToPay(); + if(toPay == null) + return false; + // create payment selector + // + paymentSelection = new PaymentSelection(parent, getLanguage(), this, + getAvailablePayments()); + paymentSelection.setFocus(); + paymentSelection.setPayTotal(toPay); ! parent.layout(); ! } ! else ! { ! handlePaymentSelected(); ! } return true; *************** *** 138,142 **** handlePaymentSelected(); } ! /** * Invoked by the payment selection dialog --- 144,148 ---- handlePaymentSelected(); } ! /** * Invoked by the payment selection dialog *************** *** 297,304 **** { // remove payment selector from ui ! paymentSelection.dispose(); ! paymentSelection = null; ! parent.layout(); ! // the amount to pay will be shown in a different currency if (payment.code.equals("SICUEX")) --- 303,313 ---- { // remove payment selector from ui ! if (paymentSelection != null) ! { ! paymentSelection.dispose(); ! paymentSelection = null; ! parent.layout(); ! } ! // the amount to pay will be shown in a different currency if (payment.code.equals("SICUEX")) *************** *** 360,365 **** parent.layout(); } ! } ! parent.layout(); } --- 369,374 ---- parent.layout(); } ! } ! parent.layout(); } *************** *** 415,418 **** --- 424,429 ---- userInput = null; parent.layout(); + + showPaySelectionUI = true; // re-invoke payment selection *************** *** 426,429 **** --- 437,442 ---- catch(NullPointerException e) {} + if (!showPaySelectionUI) + toPay = null; } *************** *** 439,442 **** --- 452,457 ---- userInput = null; parent.layout(); + + showPaySelectionUI = true; // re-invoke payment selection *************** *** 530,534 **** sendUIMessage(message); } - return false; } --- 545,548 ---- *************** *** 571,574 **** --- 585,596 ---- paymentAdded = false; } + else if(n.getType().equals(POSEngineConstants.NOTIFICATION_POS_PAYMENT_SELECTED)) + { + PaymentInfo paymentInfo = (PaymentInfo)n.getUserData(); + this.payment = paymentInfo; + toPay = getAmountToPay(); + showPaySelectionUI = false; + handlePaymentSelected(); + } else if(n.getType().equals( POSEngineConstants.NOTIFICATION_POS_PAYMENT_COMPLETE)) *************** *** 732,735 **** --- 754,760 ---- return true; else if(n.getType().equals( + POSEngineConstants.NOTIFICATION_POS_PAYMENT_SELECTED)) + return true; + else if(n.getType().equals( ReceiptConstants.NOTIFICATION_RECEIPT_STARTED)) return true; |
From: Anneli <an...@us...> - 2005-03-07 11:14:12
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/src/org/redpos/client Modified Files: POSEngine.java Log Message: Added functionality for short commands when selecting payment Index: POSEngine.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/POSEngine.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** POSEngine.java 17 Jan 2005 10:23:20 -0000 1.7 --- POSEngine.java 7 Mar 2005 11:13:59 -0000 1.8 *************** *** 1371,1373 **** --- 1371,1395 ---- } } + + /** + * Start selected payment + * + * @jmx.managed-operation + * @param receipt + */ + public void startSelectedPayment(final PaymentInfo payment) + { + try + { + // send payment selected + this.fireNotification( + POSEngineConstants.NOTIFICATION_POS_PAYMENT_SELECTED, payment); + } + catch(Exception e) + { + e.printStackTrace(); + + } + + } } \ No newline at end of file |
From: Anneli <an...@us...> - 2005-03-07 11:14:10
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/contract In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29708/src/org/redpos/client/contract Modified Files: POSEngineConstants.java POSEngineUtility.java Log Message: Added functionality for short commands when selecting payment Index: POSEngineUtility.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/POSEngineUtility.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** POSEngineUtility.java 17 Jan 2005 10:23:22 -0000 1.3 --- POSEngineUtility.java 7 Mar 2005 11:13:58 -0000 1.4 *************** *** 515,517 **** --- 515,544 ---- } + /** + * Starts selected payment + * + * @param payment + * @throws JMException + */ + public void startSelectedPayment(final PaymentInfo payment) throws JMException + { + try + { + ObjectName pay = new ObjectName("RedPOS.client:service=POSEngine"); + + Object[] params = {payment}; + String[] signature = {"org.redpos.client.payment.contract.PaymentInfo"}; + + getServer().invoke(pay, "startSelectedPayment", params, + signature); + } + catch(JMException e) + { + throw e; + } + + + + } + } \ No newline at end of file Index: POSEngineConstants.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/POSEngineConstants.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** POSEngineConstants.java 23 Nov 2004 16:02:44 -0000 1.1 --- POSEngineConstants.java 7 Mar 2005 11:13:58 -0000 1.2 *************** *** 46,49 **** public static final String NOTIFICATION_POS_PAYMENT_COMPLETE = "redpos.engine.paymentComplete"; ! } \ No newline at end of file --- 46,51 ---- public static final String NOTIFICATION_POS_PAYMENT_COMPLETE = "redpos.engine.paymentComplete"; ! ! public static final String NOTIFICATION_POS_PAYMENT_SELECTED = "redpos.engine.paymentSelected"; ! } \ No newline at end of file |
From: Lennart P. <le...@us...> - 2005-03-01 14:27:21
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/db In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2425/src/org/redpos/client/contract/db Modified Files: RedPOSTable.java Log Message: Dispose of TableItems in FindProductUI, FindReceiptUI and POSSaleInfo Index: RedPOSTable.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/contract/db/RedPOSTable.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** RedPOSTable.java 19 Feb 2005 08:17:30 -0000 1.3 --- RedPOSTable.java 1 Mar 2005 14:26:53 -0000 1.4 *************** *** 122,127 **** /** ! * Performs a SELECT statement in database table. String searches ! * are case-insensitive with the use of the 'UPPER' db-command. * * @param where --- 122,126 ---- /** ! * Performs a SELECT statement in database table. * * @param where *************** *** 204,208 **** if(values[i] instanceof String) { ! String string = ((String)values[i]).toUpperCase(); if(like) string = string + WILDCARD; --- 203,208 ---- if(values[i] instanceof String) { ! //String string = ((String)values[i]).toUpperCase(); ! String string = (String)values[i]; if(like) string = string + WILDCARD; |
From: Lennart P. <le...@us...> - 2005-03-01 14:27:05
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2425/src/org/redpos/client/ui Modified Files: POSSaleInfo.java Log Message: Dispose of TableItems in FindProductUI, FindReceiptUI and POSSaleInfo Index: POSSaleInfo.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/POSSaleInfo.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** POSSaleInfo.java 14 Dec 2004 08:25:51 -0000 1.2 --- POSSaleInfo.java 1 Mar 2005 14:26:53 -0000 1.3 *************** *** 354,357 **** --- 354,358 ---- saleTable.remove(i); selectedRowIndex = -1; + items[i].dispose(); break; } *************** *** 366,369 **** --- 367,375 ---- selectedRowIndex = -1; saleTable.removeAll(); + TableItem[] items = saleTable.getItems(); + for(int i = 0; i < items.length; i++) + { + items[i].dispose(); + } } |
From: Lennart P. <le...@us...> - 2005-03-01 14:27:03
|
Update of /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2425/src/org/redpos/client/ui/plugin/function Modified Files: FindReceiptUI.java FindProductUI.java Log Message: Dispose of TableItems in FindProductUI, FindReceiptUI and POSSaleInfo Index: FindProductUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindProductUI.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FindProductUI.java 19 Feb 2005 18:37:59 -0000 1.5 --- FindProductUI.java 1 Mar 2005 14:26:52 -0000 1.6 *************** *** 418,421 **** --- 418,426 ---- { productTable.removeAll(); + TableItem[] items = productTable.getItems(); + for(int i = 0; i < items.length; i++) + { + items[i].dispose(); + } } Index: FindReceiptUI.java =================================================================== RCS file: /cvsroot/redpos/RedPOS/src/org/redpos/client/ui/plugin/function/FindReceiptUI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FindReceiptUI.java 17 Jan 2005 10:28:15 -0000 1.3 --- FindReceiptUI.java 1 Mar 2005 14:26:52 -0000 1.4 *************** *** 444,447 **** --- 444,452 ---- { receiptTable.removeAll(); + TableItem[] items = receiptTable.getItems(); + for(int i = 0; i < items.length; i++) + { + items[i].dispose(); + } } |
From: Lennart P. <le...@us...> - 2005-03-01 14:23:04
|
Update of /cvsroot/redpos/RedPOS In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv837 Modified Files: build.xml Log Message: Next release will be 1.6.1.1 Index: build.xml =================================================================== RCS file: /cvsroot/redpos/RedPOS/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** build.xml 19 Feb 2005 08:40:31 -0000 1.15 --- build.xml 1 Mar 2005 14:22:51 -0000 1.16 *************** *** 79,83 **** <property name="version.name" value="Zion"/> <!-- This must be set to the CVS tag for any release --> ! <property name="version.cvstag" value="Rel_1_6_1_0"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> --- 79,83 ---- <property name="version.name" value="Zion"/> <!-- This must be set to the CVS tag for any release --> ! <property name="version.cvstag" value="Rel_1_6_1_1"/> <property name="version.appname" value="RedPOS"/> <property name="version.url" value="http://www.redpos.org"/> |