Module com.flexganttfx.model
Package com.flexganttfx.model.calendar
Class CalendarBase<A extends CalendarActivity>
- java.lang.Object
-
- com.flexganttfx.model.repository.ActivityRepositoryBase<A>
-
- com.flexganttfx.model.calendar.CalendarBase<A>
-
- Type Parameters:
A
- the type of the activities returned by the calendar
- All Implemented Interfaces:
ActivityRepository<A>
,Calendar<A>
,EventTarget
- Direct Known Subclasses:
WeekendCalendar
public abstract class CalendarBase<A extends CalendarActivity> extends ActivityRepositoryBase<A> implements Calendar<A>
An abstract base implementation of an activity repository that implements theCalendar
interface.- Since:
- 1.0
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CalendarBase(String name)
Constructs a new calendar.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Returns the value of thenameProperty()
.boolean
isVisible()
Returns the value of thevisibleProperty()
.StringProperty
nameProperty()
Returns the property used to store the name of the calendar.void
setName(String name)
Sets the value of thenameProperty()
.void
setVisible(boolean visible)
Sets the value of thevisibleProperty()
.BooleanProperty
visibleProperty()
Returns the property used to store the visibility flag of the calendar.-
Methods inherited from class com.flexganttfx.model.repository.ActivityRepositoryBase
addEventHandler, buildEventDispatchChain, fireEvent, getEarliestTimeUsed, getLatestTimeUsed, removeEventHandler
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.flexganttfx.model.ActivityRepository
addEventHandler, getActivities, getEarliestTimeUsed, getLatestTimeUsed, removeEventHandler
-
Methods inherited from interface javafx.event.EventTarget
buildEventDispatchChain
-
-
-
-
Constructor Detail
-
CalendarBase
protected CalendarBase(String name)
Constructs a new calendar.- Parameters:
name
- the name of the calendar- Since:
- 1.0
-
-
Method Detail
-
nameProperty
public final StringProperty nameProperty()
Description copied from interface:Calendar
Returns the property used to store the name of the calendar. The name might be displayed by the UI (e.g. in a context menu).- Specified by:
nameProperty
in interfaceCalendar<A extends CalendarActivity>
- Returns:
- the name of the calendar, for example ("Weekends")
-
getName
public final String getName()
Returns the value of thenameProperty()
.- Returns:
- the calendar name
- Since:
- 1.0
-
setName
public final void setName(String name)
Sets the value of thenameProperty()
.- Parameters:
name
- the calendar name- Since:
- 1.0
-
visibleProperty
public final BooleanProperty visibleProperty()
Description copied from interface:Calendar
Returns the property used to store the visibility flag of the calendar. Calendars can be shown / hidden by the user.- Specified by:
visibleProperty
in interfaceCalendar<A extends CalendarActivity>
- Returns:
- the calendar's visibility
-
isVisible
public final boolean isVisible()
Returns the value of thevisibleProperty()
.- Returns:
- the calendar visibility
- Since:
- 1.0
-
setVisible
public final void setVisible(boolean visible)
Sets the value of thevisibleProperty()
.- Parameters:
visible
- the calendar visibility- Since:
- 1.0
-
-