net.simplace.pipe.formcomponents.date.FWMonthSubComponent

An FWMonthSubComponent displays a spinner with a list of months that the user can choose from.

Its constructor takes the numbers of the first month and the last month that should be displayed and optionally the number of the month that should be preselected. The months that are displayed in the list can be changed at runtime using the updateMonthsInList function.

Whenever the user selects a month, a stateChanged event is fired. At any time, it is possible to query the currently selected month using getValue or to set the currently selected month using setValue.

Months are numbered from 1 to 12!

International month names will be obtained from the locale.




public class FWMonthSubComponent extends
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent implements
javax.swing.event.ChangeListener {
// Public Constructors
public FWMonthSubComponent(int aMin, int aMax, FWObservable aObservable, Map
aFormComponentParameterMap);
public FWMonthSubComponent(int aMin, int aMax, int aDefault, boolean
aIsEnabled, FWObservable aObservable, Map aFormComponentParameterMap);


// Public Instance Methods
public String getValue(); // Defines
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent



returns the currently seected month (0-11)
public void setValue(String aValue); // Defines
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent


Selects the combo box item that corresponds to the given month or the first item if the given month does not exist in the list.
public void updateMonthsInList(int aMin, int aMax);

Rebuilds the combo's list so it contains months from aMin to aMax. After that, the same month as before is selected. If the previously selected month is no longer in the list, the first or last month from the list will be selected.
public void setEnabled(boolean aIsEnabled);
// Defines net.simplace.pipe.formcomponents.FWAbstractFormSubComponent


public void stateChanged(ChangeEvent e); // From
javax.swing.event.ChangeListener


public List getSelectedValueList(); // Defines
net.simplace.pipe.formcomponents.FWAbstractFormSubComponent




}



Hierarchy: java.lang.Object - java.awt.Component (java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable) - java.awt.Container - javax.swing.JComponent (java.io.Serializable, javax.swing.TransferHandler.HasGetTransferHandler) - javax.swing.JPanel (javax.accessibility.Accessible) - net.simplace.pipe.formcomponents.FWAbstractFormSubComponent - FWMonthSubComponent (javax.swing.event.ChangeListener)