Class OceanusDateRangeState
java.lang.Object
io.github.tonywasher.joceanus.oceanus.date.OceanusDateRangeState
State for JDateDayRange Selection panel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustOverallRange(OceanusDateRange pRange) adjust the overall range.Get the base date.Get the end date.Get the overall range.Get the DatePeriod.getRange()Get the range.Get the start date.booleanIs this an adjustable range?booleanIs the baseDate the start of the range.booleanIs this a containing range?booleanisCustom()Is this a custom range?booleanisFull()Is this a full range?booleanisLocked()Is the period locked?booleanisNextOK()Can we select a next period within the available range.booleanisPrevOK()Can we select a previous period within the available range.booleanisUpTo()Is this an UpTo range?voidlockPeriod(boolean pLocked) Lock the period.voidsetBaseDate(OceanusDate pBaseDate) Set new base Date.voidsetEndDate(OceanusDate pEndDate) Set new End Date.voidSet the locale.voidSet next Date.voidsetPeriod(OceanusDatePeriod pPeriod) Set new Period.voidSet previous Date.voidsetStartDate(OceanusDate pStartDate) Set new Start Date.
-
Constructor Details
-
OceanusDateRangeState
public OceanusDateRangeState(boolean pBaseIsStart) Constructor.- Parameters:
pBaseIsStart- is the baseDate the start of the period? (true/false)
-
OceanusDateRangeState
Constructor.- Parameters:
pState- state to copy from
-
-
Method Details
-
isBaseStartOfPeriod
public boolean isBaseStartOfPeriod()Is the baseDate the start of the range.- Returns:
- the range
-
getRange
Get the range.- Returns:
- the range
-
getOverallRange
Get the overall range.- Returns:
- the start date
-
getStartDate
Get the start date.- Returns:
- the start date
-
getEndDate
Get the end date.- Returns:
- the end date
-
getBaseDate
Get the base date.- Returns:
- the base date
-
getPeriod
Get the DatePeriod.- Returns:
- the date period
-
isNextOK
public boolean isNextOK()Can we select a next period within the available range.- Returns:
- true/false
-
isPrevOK
public boolean isPrevOK()Can we select a previous period within the available range.- Returns:
- true/false
-
isLocked
public boolean isLocked()Is the period locked?- Returns:
- true/false
-
isUpTo
public boolean isUpTo()Is this an UpTo range?- Returns:
- true/false
-
isCustom
public boolean isCustom()Is this a custom range?- Returns:
- true/false
-
isFull
public boolean isFull()Is this a full range?- Returns:
- true/false
-
isAdjustable
public boolean isAdjustable()Is this an adjustable range?- Returns:
- true/false
-
isContaining
public boolean isContaining()Is this a containing range?- Returns:
- true/false
-
lockPeriod
public void lockPeriod(boolean pLocked) Lock the period.- Parameters:
pLocked- true/false
-
setPeriod
Set new Period.- Parameters:
pPeriod- the new period
-
setStartDate
Set new Start Date.- Parameters:
pStartDate- the new start date
-
setEndDate
Set new End Date.- Parameters:
pEndDate- the new end date
-
setBaseDate
Set new base Date.- Parameters:
pBaseDate- the new base date
-
setNextDate
public void setNextDate()Set next Date. -
setPreviousDate
public void setPreviousDate()Set previous Date. -
adjustOverallRange
adjust the overall range.- Parameters:
pRange- the overallRange
-
setLocale
Set the locale.- Parameters:
pLocale- the locale
-