Interface VetoPolicy
-
- All Superinterfaces:
Policy
public interface VetoPolicy extends Policy
This interface is used byCalendarPane
andDatePicker
to provide means to restrict dates in a control.- Author:
- Michael Baranov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isRestricted(java.lang.Object source, java.util.Calendar date)
This method is used to check if a date is restricted.boolean
isRestrictNull(java.lang.Object source)
This method is used to check if no-date (null
date) is restricted.-
Methods inherited from interface com.michaelbaranov.microba.common.Policy
addVetoPolicyListener, removeVetoPolicyListener
-
-
-
-
Method Detail
-
isRestricted
boolean isRestricted(java.lang.Object source, java.util.Calendar date)
This method is used to check if a date is restricted. Restricted dates can not be selected by users in a control.- Parameters:
source
- a control calling this methoddate
- a date to check. Is nevernull
- Returns:
true
if givendate
is restrictedfalse
otherwise
-
isRestrictNull
boolean isRestrictNull(java.lang.Object source)
This method is used to check if no-date (null
date) is restricted. Restricted dates can not be selected by users in a control.- Parameters:
source
- a control calling this method- Returns:
false
to allow no-date,true
otherwise
-
-