java.lang.Object
io.github.tonywasher.joceanus.oceanus.date.OceanusDateRangeState

public class OceanusDateRangeState extends Object
State for JDateDayRange Selection panel.
  • Constructor Details

    • OceanusDateRangeState

      public OceanusDateRangeState(boolean pBaseIsStart)
      Constructor.
      Parameters:
      pBaseIsStart - is the baseDate the start of the period? (true/false)
    • OceanusDateRangeState

      public OceanusDateRangeState(OceanusDateRangeState pState)
      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

      public OceanusDateRange getRange()
      Get the range.
      Returns:
      the range
    • getOverallRange

      public OceanusDateRange getOverallRange()
      Get the overall range.
      Returns:
      the start date
    • getStartDate

      public OceanusDate getStartDate()
      Get the start date.
      Returns:
      the start date
    • getEndDate

      public OceanusDate getEndDate()
      Get the end date.
      Returns:
      the end date
    • getBaseDate

      public OceanusDate getBaseDate()
      Get the base date.
      Returns:
      the base date
    • getPeriod

      public OceanusDatePeriod 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

      public void setPeriod(OceanusDatePeriod pPeriod)
      Set new Period.
      Parameters:
      pPeriod - the new period
    • setStartDate

      public void setStartDate(OceanusDate pStartDate)
      Set new Start Date.
      Parameters:
      pStartDate - the new start date
    • setEndDate

      public void setEndDate(OceanusDate pEndDate)
      Set new End Date.
      Parameters:
      pEndDate - the new end date
    • setBaseDate

      public void setBaseDate(OceanusDate pBaseDate)
      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

      public void adjustOverallRange(OceanusDateRange pRange)
      adjust the overall range.
      Parameters:
      pRange - the overallRange
    • setLocale

      public void setLocale(Locale pLocale)
      Set the locale.
      Parameters:
      pLocale - the locale