Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.util
Class DayDateCombo

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

public class DayDateCombo
extends Composite

A Composite with a spinner indicating a number of days and a DatePicker indicating the resulting date from a base date and the spinner setting. Manipulating the spinner will modify the DatePicker and vice versa. SelectionListeners will be informed on each change.

Author:
Gerry

Constructor Summary
DayDateCombo(Composite parent, java.lang.String text1, java.lang.String text2)
          Create the Composite
 
Method Summary
 void addSelectionListener(SelectionListener listener)
           
 TimeTool getDate()
          Get the actual setting of the DatePicker.
 void removeSelectionListener(SelectionListener listener)
           
 void setDates(TimeTool baseDate)
          Set the dates of the composite.
 void setDays(int days)
          Set the dates of the composite
 void setEnabled(boolean bEnable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DayDateCombo

public DayDateCombo(Composite parent,
                    java.lang.String text1,
                    java.lang.String text2)
Create the Composite

Parameters:
parent - parent composite
text1 - the text to display in front of the spinner
text2 - the text to display between spinner and DatePicker
Method Detail

setEnabled

public void setEnabled(boolean bEnable)

setDates

public void setDates(TimeTool baseDate)
Set the dates of the composite.

Parameters:
baseDate - the date of the DatePicker
endDate - the date to calculate with the spinner

setDays

public void setDays(int days)
Set the dates of the composite

Parameters:
days - number of days before the basedate
baseDate - the date to calculate from or null=today

getDate

public TimeTool getDate()
Get the actual setting of the DatePicker.

Returns:
a TimeTool with the DatePicker's date or null if the date is not set or the spinner is 0

addSelectionListener

public void addSelectionListener(SelectionListener listener)

removeSelectionListener

public void removeSelectionListener(SelectionListener listener)

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis