Class FWDaySubComponent

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

public class FWDaySubComponent extends FWAbstractFormSubComponent implements ActionListener
A FWDaySubComponent displays a calendar view of a specific month in a specific year and lets the user choose a from a range of days in that month. Next to the days, the number of the current week in the year s also displayed.

The displayed month can be changed at runtime using the updateLabels function.

Whenever a day is selected, the control notifies registered ChangeListeners by firing a stateChanged event. Apart from listening to events, the currently selected day may be obtained or changed at any time using the getValue() and setValue functions.

Author:
ckunze
See Also:
  • Constructor Details

    • FWDaySubComponent

      public FWDaySubComponent(int aYear, int aMonth, int aMinDay, int aMaxDay, int aDefaultDay, FWObservable aObservable, Map<String,Object> aFormComponentParameterMap)
      Parameters:
      aYear - Year whose days are going to be displayed
      aMonth - Month whose days are going to be displayed (1-12)
      aMinDay - First selectable day in month
      aMaxDay - Last selectable day in month
      aDefaultDay - Number of preselected day
      aObservable -
      aFormComponentParameterMap -
  • Method Details

    • updateLabels

      public void updateLabels(int aYear, int aMonth, int aMinDay, int aMaxDay, int aDefaultDay)
      Displays the month specified by aYear and aMonth and makes all days between aMinDay and aMaxDay selectable. In this new calendar view, aDefaultDay will be preselected.
      Parameters:
      aYear -
      aMonth -
      aMinDay -
      aMaxDay -
      aDefaultDay -
    • getValue

      public String getValue()
      Specified by:
      getValue in class FWAbstractFormSubComponent
      Returns:
      value of the implemented subcomponent
    • setValue

      public void setValue(String aValue)
      Description copied from class: FWAbstractFormSubComponent
      Allows to set the value of the implemented subcomponent
      Specified by:
      setValue in class FWAbstractFormSubComponent
      Parameters:
      aValue - String representation of the value to be set
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • getSelectedValueList

      public List<Object> getSelectedValueList()
      Specified by:
      getSelectedValueList in class FWAbstractFormSubComponent
      Returns:
      value of the implemented subcomponent