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 the
Calendar
interface.- Since:
- 1.0
-
Property Summary
Properties Type Property Description StringProperty
name
Returns the property used to store the name of the calendar.BooleanProperty
visible
Returns the property used to store the visibility flag of the calendar. -
Constructor Summary
Constructors Modifier Constructor Description protected
CalendarBase(String name)
Constructs a new calendar. -
Method Summary
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
-
Property Details
-
name
- Specified by:
nameProperty
in interfaceCalendar<A extends CalendarActivity>
- See Also:
getName()
,setName(String)
-
visible
- Specified by:
visibleProperty
in interfaceCalendar<A extends CalendarActivity>
- See Also:
isVisible()
,setVisible(boolean)
-
-
Constructor Details
-
CalendarBase
Constructs a new calendar.- Parameters:
name
- the name of the calendar- Since:
- 1.0
-
-
Method Details
-
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>
- See Also:
getName()
,setName(String)
-
getName
Returns the value of thenameProperty()
.- Returns:
- the calendar name
- Since:
- 1.0
-
setName
Sets the value of thenameProperty()
.- Parameters:
name
- the calendar name- Since:
- 1.0
-
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>
- See Also:
isVisible()
,setVisible(boolean)
-
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
-