Top Description Fields Constructors Methods
com.calendarfx.model

public Class CalendarSource

extends Object
Class Inheritance
Imports
com.calendarfx.util.LoggingDomain, com.calendarfx.view.SourceView, javafx.beans.property.SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, .ListChangeListener.Change, .ObservableList

A calendar source is a collection of calendars. It often represents a user account with some calendar service, e.g. Google Calendar or Apple me.com. The image below shows an example: a calendar source called "Work" with calendars "Meetings, Training, Customers, Holidays". Calendar Source View

Calendar sources can be shown to the user via the SourceView control.

Field Summary

Modifier and TypeField and Description
private final ObservableList<Calendar<T>>
private final StringProperty

Constructor Summary

AccessConstructor and Description
public
CalendarSource()

Constructs a new untitled calendar source.

public
CalendarSource(String
the name of the calendar source, e.g. "Google", "Apple"
name
)

Constructs a new calendar source with the given name.

Method Summary

Modifier and TypeMethod and Description
public final ObservableList<Calendar<T>>

Returns:

the calendars owned by this calendar source
getCalendars
()

Returns the list of calendars that belong to this calendar source.

public final String

Returns:

the calendar source name
getName
()

Returns the value fo nameProperty().

public final StringProperty

Returns:

the name property
nameProperty
()

The property used to store the name of the calendar source.

public final void
setName(String
the new name for the calendar source
name
)

Sets the value of nameProperty().

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

calendarsback to summary
private final ObservableList<Calendar<T>> calendars
nameback to summary
private final StringProperty name

Constructor Detail

CalendarSourceback to summary
public CalendarSource()

Constructs a new untitled calendar source.

CalendarSourceback to summary
public CalendarSource(String name)

Constructs a new calendar source with the given name.

Parameters
name:String

the name of the calendar source, e.g. "Google", "Apple"

Method Detail

getCalendarsback to summary
public final ObservableList<Calendar<T>> getCalendars()

Returns the list of calendars that belong to this calendar source. Example: the calendar source is "Google" and calendars might be "Work", "Home", "Sport", "Children".

Returns:ObservableList<Calendar<T>>

the calendars owned by this calendar source

getNameback to summary
public final String getName()

Returns the value fo nameProperty().

Returns:String

the calendar source name

namePropertyback to summary
public final StringProperty nameProperty()

The property used to store the name of the calendar source.

Returns:StringProperty

the name property

setNameback to summary
public final void setName(String name)

Sets the value of nameProperty().

Parameters
name:String

the new name for the calendar source

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override