@Component public class Date extends Object implements IInvalidatable
| Modifier and Type | Field and Description |
|---|---|
private javafx.beans.property.ObjectProperty<org.joda.time.DateTime> |
cal
Current date
|
private com.google.common.eventbus.AsyncEventBus |
clientServerEventBus |
private javafx.beans.binding.StringBinding |
dayDateBinding |
static int |
DEFAULT_INVALID_START_YEAR |
private Locale |
locale |
private static Object |
lock
Lock for guaranteeing thread safety
|
private org.apache.logging.log4j.Logger |
logger |
private org.springframework.context.MessageSource |
messageSource |
private org.joda.time.DateTime |
startDate |
private Integer |
startYear
Start year
|
private int |
tickUpdate
Tick update in minutes
|
| Constructor and Description |
|---|
Date() |
Date(org.joda.time.DateTime cal)
Constructor for testing purposes only
|
Date(int year)
Initialize the date with start year.
|
| Modifier and Type | Method and Description |
|---|---|
private boolean |
checkStartYear(int startYear) |
javafx.beans.binding.StringBinding |
dayDateBinding()
Bind the representation of the day as a String.
|
org.joda.time.DateTime |
getCurrentDate()
Retrieve the immutable DateTime
|
javafx.beans.property.ObjectProperty<org.joda.time.DateTime> |
getCurrentDateProperty()
Retrieve the immutable DateTime
|
String |
getEndOfWeek()
Retrieve the date of the end of the week in the form {Day of month}.
|
(package private) org.joda.time.DateTime |
getEndOfWeekInternal()
Retrieve the date of the of the Sunday of last week
|
String |
getStartOfWeek()
Retrieve the date of the start of the week in the form {Day of month}.
|
(package private) org.joda.time.DateTime |
getStartOfWeekInternal()
Retrieve the date of the start of the last week
|
int |
getWeekdayIndex()
Retrieve an index for the current weekday.
|
void |
invalidate() |
boolean |
isSameDay(org.joda.time.DateTime date1,
org.joda.time.DateTime date2)
Check if two dates represent the same day
|
boolean |
isToday(org.joda.time.DateTime date)
Check if the date is today.
|
void |
resetStartYear(int startYear) |
void |
setStartYear(int startYear) |
void |
setTickUpdate(int minutes)
Set the tick update in number of minutes
|
String |
toDisplayString()
Create a string representation for the user interface of the
form {Day of month}.
|
String |
todisplayString(int day,
int month,
int year) |
String |
toShortDate(org.joda.time.DateTime c)
Convert the date into the form {Day in month}.
|
void |
updateTime(org.joda.time.DateTime newTime)
Change the time.
|
private final org.apache.logging.log4j.Logger logger
public static final int DEFAULT_INVALID_START_YEAR
private int tickUpdate
private javafx.beans.property.ObjectProperty<org.joda.time.DateTime> cal
private org.joda.time.DateTime startDate
private Integer startYear
private static Object lock
private javafx.beans.binding.StringBinding dayDateBinding
@Autowired @Qualifier(value="serverClientEventBus") private com.google.common.eventbus.AsyncEventBus clientServerEventBus
@Autowired private Locale locale
@Autowired private org.springframework.context.MessageSource messageSource
public Date(int year)
public Date()
Date(org.joda.time.DateTime cal)
cal - public void resetStartYear(int startYear)
public void setStartYear(int startYear)
private boolean checkStartYear(int startYear)
public void updateTime(org.joda.time.DateTime newTime)
newTime - public void setTickUpdate(int minutes)
minutes - tick updatepublic String getStartOfWeek()
org.joda.time.DateTime getStartOfWeekInternal()
public String toShortDate(org.joda.time.DateTime c)
c - public String getEndOfWeek()
org.joda.time.DateTime getEndOfWeekInternal()
public String toDisplayString()
public javafx.beans.binding.StringBinding dayDateBinding()
public String todisplayString(int day, int month, int year)
public boolean isSameDay(org.joda.time.DateTime date1,
org.joda.time.DateTime date2)
date1 - date2 - public boolean isToday(org.joda.time.DateTime date)
date - public org.joda.time.DateTime getCurrentDate()
public javafx.beans.property.ObjectProperty<org.joda.time.DateTime> getCurrentDateProperty()
public final int getWeekdayIndex()
public void invalidate()
invalidate in interface IInvalidatableCopyright © 2011-2016 Sahits GmbH. All Rights Reserved.