- java.lang.Object
-
- com.flexganttfx.model.activity.ActivityBase<T>
-
- com.flexganttfx.model.calendar.CalendarActivityBase<T>
-
- Type Parameters:
T
- the type of an optional user object
- All Implemented Interfaces:
Activity
,CalendarActivity
- Direct Known Subclasses:
WeekendCalendarActivity
public class CalendarActivityBase<T> extends ActivityBase<T> implements CalendarActivity
The base implementation of a calendar activity.- Since:
- 1.0
-
-
Field Summary
-
Fields inherited from class com.flexganttfx.model.activity.ActivityBase
DEFAULT_DURATION, endTime, id, name, startTime, userObject
-
-
Constructor Summary
Constructors Constructor Description CalendarActivityBase()
Constructs a new calendar activity.CalendarActivityBase(String name)
Constructs a new calendar activity with the given name.CalendarActivityBase(String name, Instant startTime, Instant endTime)
Constructs a new calendar activity with the given name, start time, and end time.CalendarActivityBase(Instant startTime, Instant endTime)
Constructs a new calendar activity with the start time and end time.
-
Method Summary
-
Methods inherited from class com.flexganttfx.model.activity.ActivityBase
getEndTime, getId, getName, getStartTime, getUserObject, setUserObject, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.flexganttfx.model.Activity
getEndTime, getId, getName, getStartTime
-
-
-
-
Constructor Detail
-
CalendarActivityBase
public CalendarActivityBase()
Constructs a new calendar activity. The initial start time will be set toInstant.now()
and the end time will be equal toInstant.now()
plus the value ofActivityBase.DEFAULT_DURATION
.- Since:
- 1.0
-
CalendarActivityBase
public CalendarActivityBase(String name)
Constructs a new calendar activity with the given name. The initial start time will be set toInstant.now()
and the end time will be equal toInstant.now()
plus the value ofActivityBase.DEFAULT_DURATION
.- Parameters:
name
- the name of the activity- Since:
- 1.0
-
CalendarActivityBase
public CalendarActivityBase(Instant startTime, Instant endTime)
Constructs a new calendar activity with the start time and end time.- Parameters:
startTime
- the start time of the activityendTime
- the end time of the activity- Since:
- 1.0
-
CalendarActivityBase
public CalendarActivityBase(String name, Instant startTime, Instant endTime)
Constructs a new calendar activity with the given name, start time, and end time.- Parameters:
name
- the name of the activitystartTime
- the start time of the activityendTime
- the end time of the activity- Since:
- 1.0
-
-