Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.util
Class MoneyInput

java.lang.Object
  extended by Composite
      extended by ch.elexis.util.MoneyInput

public class MoneyInput
extends Composite

A class to display and let the user enter or change currency strings

Author:
gerry

Constructor Summary
MoneyInput(Composite parent)
           
MoneyInput(Composite parent, java.lang.String label)
           
MoneyInput(Composite parent, java.lang.String label, Money money)
           
 
Method Summary
 void addSelectionListener(SelectionListener lis)
           
 Text getControl()
           
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
 Money getMoney(boolean bNullIfEmpty)
          Return the entered value as Money.
 void removeSelectionListener(SelectionListener lis)
           
 void setMoney(java.lang.String m)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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)
Method Detail

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

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis