ch.elexis.util
Class MoneyInput
java.lang.Object
Composite
ch.elexis.util.MoneyInput
public class MoneyInput
- extends Composite
A class to display and let the user enter or change currency strings
- Author:
- gerry
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MoneyInput
public MoneyInput(Composite parent)
MoneyInput
public MoneyInput(Composite parent,
java.lang.String label)
MoneyInput
public MoneyInput(Composite parent,
java.lang.String label,
Money money)
getMoney
public Money getMoney(boolean bNullIfEmpty)
- Return the entered value as Money.
- Parameters:
bNullIfEmpty
- if nothing was entered return null (Otherwise: return 0.00)
setMoney
public void setMoney(java.lang.String m)
getControl
public Text getControl()
addSelectionListener
public void addSelectionListener(SelectionListener lis)
removeSelectionListener
public void removeSelectionListener(SelectionListener lis)
getFromTextField
public static Money getFromTextField(Text textField)
- get the money out of a SWT Text-field This might fail if the text field's contents doesn't
conform to the current locale's standard currency format
- Returns:
- the Money or null
Copyright 2005-2011 by Gerry Weirich, Elexis