com.toedter.calendar
Class MinMaxDateEvaluator

java.lang.Object
  extended by com.toedter.calendar.MinMaxDateEvaluator
All Implemented Interfaces:
IDateEvaluator

public class MinMaxDateEvaluator
extends java.lang.Object
implements IDateEvaluator


Constructor Summary
MinMaxDateEvaluator()
           
 
Method Summary
 java.awt.Color getInvalidBackroundColor()
           
 java.awt.Color getInvalidForegroundColor()
           
 java.lang.String getInvalidTooltip()
           
 java.util.Date getMaxSelectableDate()
          Gets the maximum selectable date.
 java.util.Date getMinSelectableDate()
          Gets the minimum selectable date.
 java.awt.Color getSpecialBackroundColor()
           
 java.awt.Color getSpecialForegroundColor()
           
 java.lang.String getSpecialTooltip()
           
 boolean isInvalid(java.util.Date date)
          Checks if a date is invalid for selection
 boolean isSpecial(java.util.Date date)
          Checks if a date is a special date (might have different colors and tooltips)
 java.util.Date setMaxSelectableDate(java.util.Date max)
          Sets the maximum selectable date.
 java.util.Date setMinSelectableDate(java.util.Date min)
          Sets the minimum selectable date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MinMaxDateEvaluator

public MinMaxDateEvaluator()
Method Detail

isSpecial

public boolean isSpecial(java.util.Date date)
Description copied from interface: IDateEvaluator
Checks if a date is a special date (might have different colors and tooltips)

Specified by:
isSpecial in interface IDateEvaluator
Parameters:
date - the date to check
Returns:
true, if the date can be selected

getSpecialForegroundColor

public java.awt.Color getSpecialForegroundColor()
Specified by:
getSpecialForegroundColor in interface IDateEvaluator
Returns:
the foreground color (used by JDayChooser)

getSpecialBackroundColor

public java.awt.Color getSpecialBackroundColor()
Specified by:
getSpecialBackroundColor in interface IDateEvaluator
Returns:
the background color (used by JDayChooser)

getSpecialTooltip

public java.lang.String getSpecialTooltip()
Specified by:
getSpecialTooltip in interface IDateEvaluator
Returns:
the tooltip (used by JDayChooser)

isInvalid

public boolean isInvalid(java.util.Date date)
Description copied from interface: IDateEvaluator
Checks if a date is invalid for selection

Specified by:
isInvalid in interface IDateEvaluator
Parameters:
date - the date to check
Returns:
true, if the date is invalid and cannot be selected

getInvalidForegroundColor

public java.awt.Color getInvalidForegroundColor()
Specified by:
getInvalidForegroundColor in interface IDateEvaluator
Returns:
the foreground color (used by JDayChooser)

getInvalidBackroundColor

public java.awt.Color getInvalidBackroundColor()
Specified by:
getInvalidBackroundColor in interface IDateEvaluator
Returns:
the background color (used by JDayChooser)

getInvalidTooltip

public java.lang.String getInvalidTooltip()
Specified by:
getInvalidTooltip in interface IDateEvaluator
Returns:
the tooltip (used by JDayChooser)

setMaxSelectableDate

public java.util.Date setMaxSelectableDate(java.util.Date max)
Sets the maximum selectable date. If null, the date 01\01\9999 will be set instead.

Parameters:
max - the maximum selectable date
Returns:
the maximum selectable date

setMinSelectableDate

public java.util.Date setMinSelectableDate(java.util.Date min)
Sets the minimum selectable date. If null, the date 01\01\0001 will be set instead.

Parameters:
min - the minimum selectable date
Returns:
the minimum selectable date

getMaxSelectableDate

public java.util.Date getMaxSelectableDate()
Gets the maximum selectable date.

Returns:
the maximum selectable date

getMinSelectableDate

public java.util.Date getMinSelectableDate()
Gets the minimum selectable date.

Returns:
the minimum selectable date


Copyright © 1999 - 2011 Kai Toedter.