Package org.nuiton.jaxx.widgets.datetime
Class DateTimeEditorModel
- java.lang.Object
-
- org.jdesktop.beans.AbstractBean
-
- org.jdesktop.beans.AbstractSerializableBean
-
- org.nuiton.jaxx.widgets.datetime.DateTimeEditorModel
-
- All Implemented Interfaces:
Serializable,ModelToBean
public class DateTimeEditorModel extends org.jdesktop.beans.AbstractSerializableBean implements ModelToBean
Created on 9/9/14.- Since:
- 2.12
- Author:
- Tony Chemit - chemit@codelutin.com
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SerializablebeanOptional bean where to push back dates.protected Calendarcalendarprotected DatedateFull date (date + time)protected booleandateEditableIs date editable ?protected booleanfillStateState to be able to custom the model. will be pass tofalseby theDateTimeEditorHandler.init(DateTimeEditor).static StringPROPERTY_DATEstatic StringPROPERTY_DATE_EDITABLEstatic StringPROPERTY_DAY_DATEstatic StringPROPERTY_TIME_DATEstatic StringPROPERTY_TIME_EDITABLEstatic StringPROPERTY_TIME_IN_MINUTESstatic StringPROPERTY_VALUE_IS_ADJUSTINGprotected StringpropertyDateOptional bean property where to push back the full date.protected StringpropertyDayDateOptional bean property where to push back the day date.protected StringpropertyTimeDateOptional bean property where to push back the time date.protected booleantimeEditableIs time editable ?protected booleanvalueIsAdjustingTo stop propagate events when we are doing some modifications on the model.
-
Constructor Summary
Constructors Constructor Description DateTimeEditorModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.common.base.Predicate<DateTimeEditorModel>canUpdateBeanValuePredicate()protected voidfireDate(Date oldDate)protected voidfireDayDate(Date oldDate)protected voidfireTimeDate(Date oldDate)protected voidfireTimeInMinutes(Integer oldDate)protected voidfireValueIsAdjusting(boolean oldValue)SerializablegetBean()DategetDate()protected IntegergetDay(Date date)DategetDayDate()protected IntegergetHour(Date date)protected IntegergetMinute(Date date)StringgetPropertyDate()StringgetPropertyDayDate()StringgetPropertyTimeDate()DategetTimeDate()IntegergetTimeInMinutes()booleanisDateEditable()booleanisTimeEditable()booleanisValueIsAdjusting()voidsetBean(Serializable bean)voidsetDate(Date date)voidsetDateEditable(boolean dateEditable)voidsetDayDate(Date dayDate)voidsetHour(Integer hour)voidsetMinute(Integer minute)voidsetPropertyDate(String propertyDate)voidsetPropertyDayDate(String propertyDayDate)voidsetPropertyTimeDate(String propertyTimeDate)protected voidsetTime(Date oldTimeDate, Integer hour, Integer minute)voidsetTimeDate(Date timeDate)voidsetTimeEditable(boolean timeEditable)voidsetTimeInMinutes(Integer time)voidsetValueIsAdjusting(boolean valueIsAdjusting)-
Methods inherited from class org.jdesktop.beans.AbstractBean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clone, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, hasPropertyChangeListeners, hasVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Field Detail
-
PROPERTY_DAY_DATE
public static final String PROPERTY_DAY_DATE
- See Also:
- Constant Field Values
-
PROPERTY_TIME_DATE
public static final String PROPERTY_TIME_DATE
- See Also:
- Constant Field Values
-
PROPERTY_TIME_IN_MINUTES
public static final String PROPERTY_TIME_IN_MINUTES
- See Also:
- Constant Field Values
-
PROPERTY_DATE
public static final String PROPERTY_DATE
- See Also:
- Constant Field Values
-
PROPERTY_TIME_EDITABLE
public static final String PROPERTY_TIME_EDITABLE
- See Also:
- Constant Field Values
-
PROPERTY_DATE_EDITABLE
public static final String PROPERTY_DATE_EDITABLE
- See Also:
- Constant Field Values
-
PROPERTY_VALUE_IS_ADJUSTING
public static final String PROPERTY_VALUE_IS_ADJUSTING
- See Also:
- Constant Field Values
-
bean
protected Serializable bean
Optional bean where to push back dates.
-
propertyDayDate
protected String propertyDayDate
Optional bean property where to push back the day date.
-
propertyTimeDate
protected String propertyTimeDate
Optional bean property where to push back the time date.
-
propertyDate
protected String propertyDate
Optional bean property where to push back the full date.
-
dateEditable
protected boolean dateEditable
Is date editable ?
-
timeEditable
protected boolean timeEditable
Is time editable ?
-
date
protected Date date
Full date (date + time)
-
fillState
protected boolean fillState
State to be able to custom the model. will be pass tofalseby theDateTimeEditorHandler.init(DateTimeEditor).
-
valueIsAdjusting
protected boolean valueIsAdjusting
To stop propagate events when we are doing some modifications on the model.
-
calendar
protected final Calendar calendar
-
-
Method Detail
-
getPropertyDayDate
public String getPropertyDayDate()
-
setPropertyDayDate
public void setPropertyDayDate(String propertyDayDate)
-
getPropertyTimeDate
public String getPropertyTimeDate()
-
setPropertyTimeDate
public void setPropertyTimeDate(String propertyTimeDate)
-
getPropertyDate
public String getPropertyDate()
-
setPropertyDate
public void setPropertyDate(String propertyDate)
-
getBean
public Serializable getBean()
- Specified by:
getBeanin interfaceModelToBean
-
setBean
public void setBean(Serializable bean)
-
isDateEditable
public boolean isDateEditable()
-
setDateEditable
public void setDateEditable(boolean dateEditable)
-
isTimeEditable
public boolean isTimeEditable()
-
setTimeEditable
public void setTimeEditable(boolean timeEditable)
-
isValueIsAdjusting
public boolean isValueIsAdjusting()
-
setValueIsAdjusting
public void setValueIsAdjusting(boolean valueIsAdjusting)
-
setHour
public void setHour(Integer hour)
-
setMinute
public void setMinute(Integer minute)
-
getTimeInMinutes
public Integer getTimeInMinutes()
-
setTimeInMinutes
public void setTimeInMinutes(Integer time)
-
getTimeDate
public Date getTimeDate()
-
setTimeDate
public void setTimeDate(Date timeDate)
-
getDayDate
public Date getDayDate()
-
setDayDate
public void setDayDate(Date dayDate)
-
getDate
public Date getDate()
-
setDate
public void setDate(Date date)
-
fireTimeDate
protected void fireTimeDate(Date oldDate)
-
fireTimeInMinutes
protected void fireTimeInMinutes(Integer oldDate)
-
fireDayDate
protected void fireDayDate(Date oldDate)
-
fireDate
protected void fireDate(Date oldDate)
-
fireValueIsAdjusting
protected void fireValueIsAdjusting(boolean oldValue)
-
canUpdateBeanValuePredicate
protected com.google.common.base.Predicate<DateTimeEditorModel> canUpdateBeanValuePredicate()
-
-