org.odlabs.wiquery.ui.datepicker
Class DatePickerYearRange

java.lang.Object
  extended by org.odlabs.wiquery.ui.datepicker.DatePickerYearRange
All Implemented Interfaces:
Serializable, IComplexOption

public class DatePickerYearRange
extends Object
implements IComplexOption

$Id: DatePickerYearRange.java

Bean for the yearRange option for the DatePicker component

Since:
1.0
Author:
Julien Roche
See Also:
Serialized Form

Nested Class Summary
static class DatePickerYearRange.DatePickerYearRangeControl
           Control for the DatePickerYearRange
 
Constructor Summary
DatePickerYearRange(short yearFrom, short yearTo)
          Constructor which sets absolute yearFrom and yearTo, eg: 2000 and 2020.
DatePickerYearRange(short yearFrom, short yearTo, boolean yearRelativeToToday)
          Constructor which mixed raltive and absolute.
DatePickerYearRange(short yearFrom, short yearTo, DatePickerYearRange.DatePickerYearRangeControl controlFrom, DatePickerYearRange.DatePickerYearRangeControl controlTo)
          Constructor which sets relative yearFrom and yearTo, eh: 2010 and -10.
 
Method Summary
 CharSequence getJavascriptOption()
          Method retrieving the javascript representation of this complex option
 void setAbsoluteRange(short yearFrom, short yearTo)
           
 void setRange(short yearFrom, short yearTo, DatePickerYearRange.DatePickerYearRangeControl controlFrom, DatePickerYearRange.DatePickerYearRangeControl controlTo)
           
 void setRelativeRange(short yearFrom, short yearTo, boolean yearRelativeToToday)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatePickerYearRange

public DatePickerYearRange(short yearFrom,
                           short yearTo)
Constructor which sets absolute yearFrom and yearTo, eg: 2000 and 2020.

Parameters:
yearFrom - the range's start
yearTo - the range's end

DatePickerYearRange

public DatePickerYearRange(short yearFrom,
                           short yearTo,
                           DatePickerYearRange.DatePickerYearRangeControl controlFrom,
                           DatePickerYearRange.DatePickerYearRangeControl controlTo)
Constructor which sets relative yearFrom and yearTo, eh: 2010 and -10.

Parameters:
yearFrom - the range's start
yearTo - the range's end
controlFrom - Control for the range's start
controlTo - Control for the range's end

DatePickerYearRange

public DatePickerYearRange(short yearFrom,
                           short yearTo,
                           boolean yearRelativeToToday)
Constructor which mixed raltive and absolute. eh: c-10 and

Parameters:
yearFrom - the range's start
yearTo - the range's end
yearRelativeToToday - determines whether to count from today's year or the currently selected year.
Method Detail

getJavascriptOption

public CharSequence getJavascriptOption()
Description copied from interface: IComplexOption
Method retrieving the javascript representation of this complex option

Specified by:
getJavascriptOption in interface IComplexOption
Returns:
the javascript

setAbsoluteRange

public void setAbsoluteRange(short yearFrom,
                             short yearTo)

setRelativeRange

public void setRelativeRange(short yearFrom,
                             short yearTo,
                             boolean yearRelativeToToday)

setRange

public void setRange(short yearFrom,
                     short yearTo,
                     DatePickerYearRange.DatePickerYearRangeControl controlFrom,
                     DatePickerYearRange.DatePickerYearRangeControl controlTo)


Copyright © 2012. All Rights Reserved.