- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
,javafx.scene.control.Skinnable
The ICalendarAgenda
control is designed to take a VCALENDAR
object,
which is based on the iCalendar RFC 5545 standard, and renders it in Agenda
, which is a calendar
display control. ICalendarAgenda
renders only the displayable
iCalendar components which are VEVENT
, VTODO
, and VJOURNAL
.
Other calendar components are ignored.
The ICalendarAgenda
control has a number of features, including:
- Powerful
edit control
to modify calendar components:- Edits DATE or DATE-TIME properties including:
- Can toggle between DATE or DATE-TIME values
- Edits descriptive properties including:
SUMMARY
DESCRIPTION
LOCATION
CATEGORIES
- from a color-coded selectable grid (only one category supported)
- Edits
RRULE
, recurrence rule, elements including:FREQUENCY
- type of recurrence, including Daily, Weekly, Monthly and YearlyINTERVAL
- represents the intervals the recurrence rule repeatsCOUNT
- the number of occurrences.UNTIL
- the DATE or DATE-TIME value that bounds the recurrence rule in an inclusive mannerEXDATE
- list of DATE-TIME values that are skipped
- Displays a easy-to-read description of the
RRULE
, recurrence rule
- Automatically synchronizes graphical changes with the
VCALENDAR
object. - Uses an abstract
RecurrenceFactory
to createAgenda.Appointment
objects that are rendered byAgenda
- A default factory is included that creates the default
Agenda.AppointmentImplTemporal
objects - A custom factory can be added to create custom
Agenda.Appointment
objects.
- A default factory is included that creates the default
- Uses an abstract
VComponentFactory
to createVDisplayable
objects when new events are drawn by clicking and drag-and-drop actions.- A default factory is included that creates
VEVENT
andVTODO
components from the defaultAgenda.AppointmentImplTemporal
object. - A custom factory can be added to create iCalendar components from custom
Agenda.Appointment
objects.
- A default factory is included that creates
If not using the default Agenda.AppointmentImplTemporal
implementation, but a different Agenda.Appointment
implementation, then use the following setter methods to configure the required factories and callback:
setRecurrenceFactory(RecurrenceFactory)
setVComponentFactory(VComponentFactory)
Agenda.setNewAppointmentCallback(Callback)
Creating a ICalendarAgenda
Firstly, a VCALENDAR
instance needs to be defined. For example:
VCalendar vCalendar = new VCalendar();
Optionally, the VCALENDAR
instance can be set with calendar components. This can be done
by reading a .ics file or building the calendar components programmatically through the API. Please see the
iCalendarFX documentation for more details. An empty VCALENDAR
is also acceptable.
Next, the VCALENDAR
instance must be provided in the ICalendarAgenda
constructor
as shown below:.
ICalendarAgenda iCalendarAgenda = new ICalendarAgenda(vCalendar);
Nothing else special is required to instantiate ICalendarAgenda
if you use the default factories.
A simple example to display a ICalendarAgenda
with an example VEVENT
is below:
public class ICalendarAgendaSimpleTrial extends Application
{
public static void main(String[] args) {
launch(args);
}
public void start(Stage primaryStage) {
VCalendar vCalendar = new VCalendar();
VEvent vEvent = new VEvent()
.withDateTimeStart(LocalDateTime.now().minusMonths(1))
.withDateTimeEnd(LocalDateTime.now().minusMonths(1).plusHours(1))
.withSummary("Example Daily Event")
.withRecurrenceRule("RRULE:FREQ=DAILY")
.withUniqueIdentifier("exampleuid000jfxtras.org");
vCalendar.addChild(vEvent);
ICalendarAgenda agenda = new ICalendarAgenda(vCalendar);
BorderPane root = new BorderPane();
root.setCenter(agenda);
Scene scene = new Scene(root, 1366, 768);
primaryStage.setScene(scene);
primaryStage.setTitle("ICalendar Agenda Simple Demo");
primaryStage.show();
}
}
- See Also:
-
Property Summary
PropertiesProperties inherited from class jfxtras.scene.control.agenda.Agenda
actionCallback, allowDragging, allowResize, appointmentChangedCallback, calendarRangeCallback, createAppointmentCallback, editAppointmentCallback, localDateTimeRangeCallback, locale, newAppointmentCallback
Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltip
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Nested Class Summary
Nested classes/interfaces inherited from class jfxtras.scene.control.agenda.Agenda
Agenda.Appointment, Agenda.AppointmentGroup, Agenda.AppointmentGroupImpl, Agenda.AppointmentImpl, Agenda.AppointmentImplBase<T>, Agenda.AppointmentImplLocal, Agenda.AppointmentImplTemporal, Agenda.CalendarRange, Agenda.LocalDateTimeRange
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javafx.collections.ListChangeListener
<Agenda.Appointment> private final Map
<Integer, VDisplayable<?>> private javafx.collections.ObservableList
<String> static final String
static final String
static final String
private javafx.scene.control.Alert
used by defaultselectedOneAppointmentCallback
static final String
private javafx.util.Callback
<Agenda.Appointment, javafx.scene.control.ButtonBar.ButtonData> private final Map
<Agenda.Appointment, Boolean> private static Integer
private javafx.beans.property.ObjectProperty
<Organizer> private RecurrenceFactory
<Agenda.Appointment> private javafx.util.Callback
<Agenda.Appointment, Void> private final VCalendar
private final Map
<Integer, List<Agenda.Appointment>> private VComponentFactory
<Agenda.Appointment> Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjavafx.collections.ObservableList
<String> Gets the value of the categories listjavafx.util.Callback
<Agenda.Appointment, javafx.scene.control.ButtonBar.ButtonData> Sets the value of the new appointment callback.Gets the value of theorganizer
property.Gets the value of the VComponent factoryjavafx.util.Callback
<Agenda.Appointment, Void> Gets the value of the select one appointment callback.set UID callback generator.get the VCalendar object that is a model of the iCalendar RFC 5545 specificationGets the value of theVComponent
factoryprivate Collection
<Agenda.Appointment> makeAppointments
(VDisplayable<?> v) javafx.beans.property.ObjectProperty
<Organizer> private Object[]
revisorParamGenerator
(VDisplayable<?> vComponent, Agenda.Appointment appointment) Generate the parameters required forSimpleRevisorFactory
void
setCategories
(javafx.collections.ObservableList<String> categories) Sets the value of the categories listvoid
setNewAppointmentDrawnCallback
(javafx.util.Callback<Agenda.Appointment, javafx.scene.control.ButtonBar.ButtonData> c) Gets the value of the new appointment callback.void
setOrganizer
(String organizer) void
setOrganizer
(Organizer organizer) Sets the value of theorganizer
property.void
setRecurrenceFactory
(RecurrenceFactory<Agenda.Appointment> recurrenceFactory) Sets the value of the recurrence factoryvoid
setSelectedOneAppointmentCallback
(javafx.util.Callback<Agenda.Appointment, Void> c) Sets the value of the select one appointment callback.void
setUidGeneratorCallback
(Callback<Void, String> uidCallback) set UID callback generator.void
setVCalendarUpdatedConsumer
(Consumer<VCalendar> calendarConsumer) void
setVComponentFactory
(VComponentFactory<Agenda.Appointment> vComponentFactory) Sets the value of theVComponent
factoryvoid
Clear and make new appointments for all displayable VComponentswithOrganizer
(String organizer) withOrganizer
(Organizer organizer) withUidGeneratorCallback
(Callback<Void, String> uidCallback) set UID callback generator.Methods inherited from class jfxtras.scene.control.agenda.Agenda
actionCallbackProperty, allowDraggingProperty, allowResizeProperty, appointmentChangedCallbackProperty, appointmentGroups, appointments, calendarRangeCallbackProperty, createAppointmentCallbackProperty, createDefaultSkin, displayedCalendar, displayedLocalDateTime, editAppointmentCallbackProperty, getActionCallback, getAllowDragging, getAllowResize, getAppointmentChangedCallback, getCalendarRangeCallback, getCreateAppointmentCallback, getDisplayedCalendar, getDisplayedLocalDateTime, getEditAppointmentCallback, getLocalDateTimeRangeCallback, getLocale, getNewAppointmentCallback, getUserAgentStylesheet, localDateTimeRangeCallbackProperty, localeProperty, newAppointmentCallbackProperty, print, refresh, selectedAppointments, setActionCallback, setAllowDragging, setAllowResize, setAppointmentChangedCallback, setCalendarRangeCallback, setCreateAppointmentCallback, setDisplayedCalendar, setDisplayedLocalDateTime, setEditAppointmentCallback, setLocalDateTimeRangeCallback, setLocale, setNewAppointmentCallback, withActionCallback, withAllowDragging, withAllowResize, withAppointmentChangedCallback, withCalendarRangeCallback, withCreateAppointmentCallback, withDisplayedCalendar, withDisplayedLocalDateTime, withEditAppointmentCallback, withId, withLocalDateTimeRangeCallback, withLocale, withNewAppointmentCallback
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getClassCssMetaData, getContextMenu, getControlCssMetaData, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
organizer
- See Also:
-
-
Field Details
-
ICALENDAR_STYLE_SHEET
-
MY_VERSION
- See Also:
-
DEFAULT_PRODUCT_IDENTIFIER
- See Also:
-
DEFAULT_ORGANIZER
- See Also:
-
organizer
-
nextKey
-
uidGeneratorCallback
-
vCalendar
-
vComponentFactory
-
recurrenceFactory
-
calendarConsumer
-
categories
-
appointmentStartOriginalMap
-
appointmentVComponentMap
-
vComponentAppointmentMap
-
newAppointmentMap
-
lastOneAppointmentSelectedAlert
private javafx.scene.control.Alert lastOneAppointmentSelectedAlertused by defaultselectedOneAppointmentCallback
-
selectedOneAppointmentCallback
-
newAppointmentDrawnCallback
private javafx.util.Callback<Agenda.Appointment,javafx.scene.control.ButtonBar.ButtonData> newAppointmentDrawnCallback -
appointmentsListChangeListener
-
-
Constructor Details
-
ICalendarAgenda
public ICalendarAgenda() -
ICalendarAgenda
-
-
Method Details
-
organizerProperty
- Returns:
- the
organizer
property - See Also:
-
getOrganizer
Gets the value of theorganizer
property.- Property description:
- Returns:
- the value of the
organizer
property - See Also:
-
setOrganizer
Sets the value of theorganizer
property.- Property description:
- Parameters:
organizer
- the value for theorganizer
property- See Also:
-
setOrganizer
-
withOrganizer
-
withOrganizer
-
getUidGeneratorCallback
set UID callback generator. It makes UID values for new components. -
setUidGeneratorCallback
set UID callback generator. It makes UID values for new components. -
withUidGeneratorCallback
set UID callback generator. Return itself for chaining. -
getVCalendar
get the VCalendar object that is a model of the iCalendar RFC 5545 specification -
getVComponentFactory
Gets the value of theVComponent
factory -
setVComponentFactory
Sets the value of theVComponent
factory -
getRecurrenceFactory
Gets the value of the VComponent factory -
setRecurrenceFactory
Sets the value of the recurrence factory -
setVCalendarUpdatedConsumer
-
getVCalendarUpdatedConsumer
-
getCategories
Gets the value of the categories list -
setCategories
Sets the value of the categories list -
setSelectedOneAppointmentCallback
Sets the value of the select one appointment callback. The callback is executed only one appointment is selected in Agenda. This is done by primary clicking on one appointment. Pressing and holding Ctrl and clicking other appointments does not trigger this callback. -
getSelectedOneAppointmentCallback
Gets the value of the select one appointment callback. The callback is executed only one appointment is selected in Agenda. This is done by primary clicking on one appointment. Pressing and holding Ctrl and clicking other appointments does not trigger this callback. -
getNewAppointmentDrawnCallback
public javafx.util.Callback<Agenda.Appointment,javafx.scene.control.ButtonBar.ButtonData> getNewAppointmentDrawnCallback()Sets the value of the new appointment callback. The callback is executed after a new appointment is added in Agenda. This is done by clicking on the start time, dragging, and releasing on the end time. -
setNewAppointmentDrawnCallback
public void setNewAppointmentDrawnCallback(javafx.util.Callback<Agenda.Appointment, javafx.scene.control.ButtonBar.ButtonData> c) Gets the value of the new appointment callback. The callback is executed after a new appointment is added in Agenda. This is done by clicking on the start time, dragging, and releasing on the end time. -
revisorParamGenerator
Generate the parameters required forSimpleRevisorFactory
-
makeAppointments
-
updateAppointments
public void updateAppointments()Clear and make new appointments for all displayable VComponents
-