java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
jfxtras.scene.control.agenda.Agenda
- All Implemented Interfaces:
javafx.css.Styleable
,javafx.event.EventTarget
,javafx.scene.control.Skinnable
- Direct Known Subclasses:
ICalendarAgenda
public class Agenda
extends javafx.scene.control.Control
= Agenda
This controls renders appointments similar to Google Calendar.
Normally this would be called a Calendar, but since there are controls like CalendarPicker, this would be confusing, hence the name "Agenda".
[source,java]
--
// create Agenda
Agenda agenda = new Agenda();
// add an appointment
agenda.appointments().addAll(
new Agenda.AppointmentImplLocal()
.withStartLocalDateTime(LocalDate.now().atTime(4, 00))
.withEndLocalDateTime(LocalDate.now().atTime(15, 30))
.withDescription("It's time")
.withAppointmentGroup(new Agenda.AppointmentGroupImpl().withStyleClass("group1")) // you should use a map of AppointmentGroups
);
// show it
primaryStage.setScene(new Scene(agenda, 800, 600));
primaryStage.show();
--
== Properties:
- appointments: a list of instances of the Appointment interface, to be rendered by Agenda.
- appointmentGroups: a list of AppointmentGroup implementations, for grouping appointments together (e.g. render in the same color).
- displayedLocalDateTime: the moment in time that is rendered, depending on the active skin this can be different time frames (day, week, etc).
- locale: used to determine the first-day-of-week and week day labels.
- allowDragging: allow appointments to be dragged by the mouse.
- allowResize: allow appointments to be resized using the mouse.
- selectedAppointments: appointments that are selected.
== Appointments
The control has a list of appointments (classes implementing the Agenda.Appointment interface) and a LocalDateTime (date) that should be displayed.
The appropriate appointments for the to-be-displayed time (based on the currently active skin) will be rendered.
The coder could provide all appointments in one big list, but that probably will be a memory heavy.
The better approach is to register to the localDateTimeRangeCallbackProperty, and update the appointment collection to match the time frame.
Agenda.Appointment can be provided in three ways:
- through Calendar values (by implementing the *StartTime methods in Appointment or use the Agenda.AppointmentImpl class)
- through ZonedDateTime values (by implementing the *ZonedDateTime methods in Appointment or use the Agenda.AppointmentImplZoned class)
- through LocalDateTime values (by implementing the *LocalDateTime methods in Appointment or use the Agenda.AppointmentImplLocal class)
== Calendar, LocalDateTime or ZonedDateTime
Agenda uses LocalDateTime for render the appointments.
Since Agenda must display all appointments in the same "time scale", it simply is not possible to mix different time zones in one view.
Google Calendar does this by converting everything to UTC (Coordinated Universal Time, previously know as Greenwich Mean time, or GMT), Agenda does this by converting Calendars to ZonedDateTimes, and ZonedDateTimes to LocalDateTimes.
The code used to convert ZonedDateTime to LocalDateTime is somewhat crude and possibly too simplistic, you may want to provide more intelligent conversion by overriding the default methods in the Appointment interface.
But you can provide the data in any of the three types, just as long as you understand that LocalDateTime is what is used to render, and what is communicated by Agenda.
== AppointmentGroup
Each appointment should have an appointment group, this is a class implementing the Agenda.AppointmentGroup interface (Agenda.AppointmentGroupImpl is available).
The most important thing this class provides is a style class name which takes care of the rendering (color) of all appointments in that group.
Per default agenda has style classes defined, called group0 .. group23.
== Callbacks
=== Action callback
The actionCallback property is called when the 'action' is executed on a appointment.
Per default this is a double click.
[source,java]
--
agenda.actionCallback().set( (appointment) -> {
System.out.println("Action was triggered on " + appointment.getDescription());
});
--
=== Adding appointments using the mouse
A new appointment can be added by click-and-drag, but only if a createAppointmentCallbackProperty() is set.
This method should return a new appointment object, for example:
[source,java]
--
agenda.newAppointmentCallbackProperty().set( (localDateTimeRange) -> {
return new Agenda.AppointmentImplLocal()
.withStartLocalDateTime(localDateTimeRange.getStartLocalDateTime())
.withEndLocalDateTime(localDateTimeRange.getEndLocalDateTime())
.withAppointmentGroup(new Agenda.AppointmentGroupImpl().withStyleClass("group1")); // it is better to have a map of appointment groups to get from
});
--
=== Editing appointments
Agenda has a default popup that allows the primary properties of appointments to be edited, but maybe you want to do something yourself.
If so, you need to register to the editAppointmentCallback, and open your own popup.
Because Agenda does not dictate an event/callback mechanism in the implementation of Appointment, it has no way of being informed of changes on the appointment.
So when the custom edit is done, make sure that agenda gets updated (if this does not happen automatically through any of the existing listeners) by calling refresh().
== Usage
The three steps to get Agenda up and running completely:
1. Implement the localDateTimeRangeCallback and populate the appointments list with the appropriate appointments from your domain.
2. Implement the newAppointmentCallback and create a new appointment, possibly saving the in your domain.
3. Monitor the appointments list for removals and remove them in your domain.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> actionCallback: This triggered when the action is called on an appointment, usually this is a double clickjavafx.beans.property.SimpleBooleanProperty
AllowDragging: allow appointments being dragged by the mousejavafx.beans.property.SimpleBooleanProperty
AllowResize: allow appointments to be resized using the mousejavafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> appointmentChangedCallback: When an appointment is changed by Agenda (e.g.javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,
Void>> Deprecated.javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,
Agenda.Appointment>> Deprecated.javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> editAppointmentCallback: Agenda has a default popup, but maybe you want to do something yourself.javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,
Void>> localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range endjavafx.beans.property.ObjectProperty<Locale>
Locale: the locale is used to determine first-day-of-week, weekday labels, etcjavafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,
Agenda.Appointment>> addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one.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 ClassesModifier and TypeClassDescriptionstatic interface
Stores date-time as a Temporal.static interface
The interface that appointment groups must adhere to; you can provide your own implementation.static class
A class to help you get going; all the required methods of the interface are implemented as JavaFX propertiesstatic class
A class to help you get going using Calendar; all the required methods of the interface are implemented as JavaFX propertiesstatic class
static class
A class to help you get going using LocalDateTime; all the required methods of the interface are implemented as JavaFX propertiesstatic class
A class to help you get going using Temporal (such as LocalDate, LocalDateTime, ZonedDateTime, Instant, etc) all the required methods of the interface are implemented as JavaFX propertiesstatic class
Deprecated.static class
A Datetime range, for callbacks -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> private final javafx.beans.property.SimpleBooleanProperty
private final javafx.beans.property.SimpleBooleanProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> private final javafx.collections.ObservableList<Agenda.AppointmentGroup>
private final javafx.collections.ObservableList<Agenda.Appointment>
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,
Void>> Deprecated.private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,
Agenda.Appointment>> Deprecated.private final javafx.beans.property.ObjectProperty<Calendar>
private final javafx.beans.property.ObjectProperty<LocalDateTime>
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,
Void>> private final javafx.beans.property.ObjectProperty<Locale>
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,
Agenda.Appointment>> private final javafx.collections.ObservableList<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.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> actionCallback: This triggered when the action is called on an appointment, usually this is a double clickjavafx.beans.property.SimpleBooleanProperty
AllowDragging: allow appointments being dragged by the mousejavafx.beans.property.SimpleBooleanProperty
AllowResize: allow appointments to be resized using the mousejavafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> appointmentChangedCallback: When an appointment is changed by Agenda (e.g.javafx.collections.ObservableList<Agenda.AppointmentGroup>
AppointmentGroups:javafx.collections.ObservableList<Agenda.Appointment>
Appointments:javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,
Void>> Deprecated.private void
private void
private void
javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,
Agenda.Appointment>> Deprecated.javafx.scene.control.Skin<?>
javafx.beans.property.ObjectProperty<Calendar>
Deprecated.javafx.beans.property.ObjectProperty<LocalDateTime>
The skin will use this date and time to determine what to display.javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,
Void>> editAppointmentCallback: Agenda has a default popup, but maybe you want to do something yourself.javafx.util.Callback<Agenda.Appointment,
Void> Gets the value of the property actionCallback.boolean
Gets the value of the property allowDragging.boolean
Gets the value of the property allowResize.javafx.util.Callback<Agenda.Appointment,
Void> Gets the value of the property appointmentChangedCallback.javafx.util.Callback<Agenda.CalendarRange,
Void> Deprecated.javafx.util.Callback<Agenda.CalendarRange,
Agenda.Appointment> Deprecated.Deprecated.javafx.util.Callback<Agenda.Appointment,
Void> Gets the value of the property editAppointmentCallback.javafx.util.Callback<Agenda.LocalDateTimeRange,
Void> Gets the value of the property localDateTimeRangeCallback.Gets the value of the property locale.javafx.util.Callback<Agenda.LocalDateTimeRange,
Agenda.Appointment> Gets the value of the property newAppointmentCallback.Return the path to the CSS file so things are setup rightjavafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,
Void>> localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range endjavafx.beans.property.ObjectProperty<Locale>
Locale: the locale is used to determine first-day-of-week, weekday labels, etcjavafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,
Agenda.Appointment>> addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one.void
print
(javafx.print.PrinterJob job) Prints the current agenda using the given printer job.void
refresh()
Force the agenda to completely refresh itselfjavafx.collections.ObservableList<Agenda.Appointment>
selectedAppointments: a list of selected appointmentsvoid
setActionCallback
(javafx.util.Callback<Agenda.Appointment, Void> value) Sets the value of the property actionCallback.void
setAllowDragging
(boolean value) Sets the value of the property allowDragging.void
setAllowResize
(boolean value) Sets the value of the property allowResize.void
setAppointmentChangedCallback
(javafx.util.Callback<Agenda.Appointment, Void> value) Sets the value of the property appointmentChangedCallback.void
setCalendarRangeCallback
(javafx.util.Callback<Agenda.CalendarRange, Void> value) Deprecated.void
setCreateAppointmentCallback
(javafx.util.Callback<Agenda.CalendarRange, Agenda.Appointment> value) Deprecated.void
setDisplayedCalendar
(Calendar value) Deprecated.void
void
setEditAppointmentCallback
(javafx.util.Callback<Agenda.Appointment, Void> value) Sets the value of the property editAppointmentCallback.void
setLocalDateTimeRangeCallback
(javafx.util.Callback<Agenda.LocalDateTimeRange, Void> value) Sets the value of the property localDateTimeRangeCallback.void
Sets the value of the property locale.void
setNewAppointmentCallback
(javafx.util.Callback<Agenda.LocalDateTimeRange, Agenda.Appointment> value) Sets the value of the property newAppointmentCallback.withActionCallback
(javafx.util.Callback<Agenda.Appointment, Void> value) withAllowDragging
(boolean value) withAllowResize
(boolean value) withAppointmentChangedCallback
(javafx.util.Callback<Agenda.Appointment, Void> value) withCalendarRangeCallback
(javafx.util.Callback<Agenda.CalendarRange, Void> value) Deprecated.withCreateAppointmentCallback
(javafx.util.Callback<Agenda.CalendarRange, Agenda.Appointment> value) Deprecated.withDisplayedCalendar
(Calendar value) Deprecated.withEditAppointmentCallback
(javafx.util.Callback<Agenda.Appointment, Void> value) IdwithLocalDateTimeRangeCallback
(javafx.util.Callback<Agenda.LocalDateTimeRange, Void> value) withLocale
(Locale value) withNewAppointmentCallback
(javafx.util.Callback<Agenda.LocalDateTimeRange, Agenda.Appointment> value) 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
-
locale
Locale: the locale is used to determine first-day-of-week, weekday labels, etc- See Also:
-
allowDragging
public javafx.beans.property.SimpleBooleanProperty allowDraggingPropertyAllowDragging: allow appointments being dragged by the mouse- See Also:
-
allowResize
public javafx.beans.property.SimpleBooleanProperty allowResizePropertyAllowResize: allow appointments to be resized using the mouse- See Also:
-
calendarRangeCallback
@Deprecated public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Void>> calendarRangeCallbackPropertycalendarRangeCallback: Appointments should match: - start date >= range start - end date <= range end -
localDateTimeRangeCallback
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Void>> localDateTimeRangeCallbackPropertylocalDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end -
createAppointmentCallback
@Deprecated public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Agenda.Appointment>> createAppointmentCallbackPropertyaddAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created. -
newAppointmentCallback
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Agenda.Appointment>> newAppointmentCallbackPropertyaddAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created. -
editAppointmentCallback
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> editAppointmentCallbackPropertyeditAppointmentCallback: Agenda has a default popup, but maybe you want to do something yourself. If so, you need to set this callback method and open your own window. Because Agenda does not dictate a event/callback in the implementation of appointment, it has no way of being informed of changes on the appointment. So when the custom edit is done, make sure that control gets updated, if this does not happen automatically through any of the existing listeners, then call refresh(). -
appointmentChangedCallback
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> appointmentChangedCallbackPropertyappointmentChangedCallback: When an appointment is changed by Agenda (e.g. drag-n-drop to new time) change listeners will not fire. To enable the client to process those changes this callback can be used. Additionally, for a repeatable appointment, this can be used to prompt the user if they want the change to occur to one, this-and-future or all events in series. -
actionCallback
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> actionCallbackPropertyactionCallback: This triggered when the action is called on an appointment, usually this is a double click
-
-
Field Details
-
appointments
-
appointmentGroups
-
localeObjectProperty
-
allowDraggingObjectProperty
private final javafx.beans.property.SimpleBooleanProperty allowDraggingObjectProperty -
allowResizeObjectProperty
private final javafx.beans.property.SimpleBooleanProperty allowResizeObjectProperty -
displayedCalendarObjectProperty
-
displayedLocalDateTimeObjectProperty
private final javafx.beans.property.ObjectProperty<LocalDateTime> displayedLocalDateTimeObjectProperty -
selectedAppointments
-
calendarRangeCallbackObjectProperty
@Deprecated private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Void>> calendarRangeCallbackObjectPropertyDeprecated. -
localDateTimeRangeCallbackObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Void>> localDateTimeRangeCallbackObjectProperty -
createAppointmentCallbackObjectProperty
@Deprecated private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Agenda.Appointment>> createAppointmentCallbackObjectPropertyDeprecated. -
newAppointmentCallbackObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Agenda.Appointment>> newAppointmentCallbackObjectProperty -
editAppointmentCallbackObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> editAppointmentCallbackObjectProperty -
appointmentChangedCallbackObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> appointmentChangedCallbackObjectProperty -
actionCallbackObjectProperty
private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> actionCallbackObjectProperty
-
-
Constructor Details
-
Agenda
public Agenda()
-
-
Method Details
-
construct
private void construct() -
getUserAgentStylesheet
Return the path to the CSS file so things are setup right- Overrides:
getUserAgentStylesheet
in classjavafx.scene.layout.Region
-
createDefaultSkin
public javafx.scene.control.Skin<?> createDefaultSkin()- Overrides:
createDefaultSkin
in classjavafx.scene.control.Control
-
withId
Id -
appointments
Appointments: -
constructAppointments
private void constructAppointments() -
appointmentGroups
AppointmentGroups: -
constructAppointmentGroups
private void constructAppointmentGroups() -
localeProperty
Locale: the locale is used to determine first-day-of-week, weekday labels, etc- See Also:
-
getLocale
Gets the value of the property locale.- Property description:
- Locale: the locale is used to determine first-day-of-week, weekday labels, etc
-
setLocale
Sets the value of the property locale.- Property description:
- Locale: the locale is used to determine first-day-of-week, weekday labels, etc
-
withLocale
-
allowDraggingProperty
public javafx.beans.property.SimpleBooleanProperty allowDraggingProperty()AllowDragging: allow appointments being dragged by the mouse- See Also:
-
getAllowDragging
public boolean getAllowDragging()Gets the value of the property allowDragging.- Property description:
- AllowDragging: allow appointments being dragged by the mouse
-
setAllowDragging
public void setAllowDragging(boolean value) Sets the value of the property allowDragging.- Property description:
- AllowDragging: allow appointments being dragged by the mouse
-
withAllowDragging
-
allowResizeProperty
public javafx.beans.property.SimpleBooleanProperty allowResizeProperty()AllowResize: allow appointments to be resized using the mouse- See Also:
-
getAllowResize
public boolean getAllowResize()Gets the value of the property allowResize.- Property description:
- AllowResize: allow appointments to be resized using the mouse
-
setAllowResize
public void setAllowResize(boolean value) Sets the value of the property allowResize.- Property description:
- AllowResize: allow appointments to be resized using the mouse
-
withAllowResize
-
displayedCalendar
Deprecated.DisplayedCalendar: this calendar denotes the timeframe being displayed. If the agenda is in week skin, it will display the week containing this date. (Things like FirstDayOfWeek are taken into account.) In month skin, the month containing this date. -
getDisplayedCalendar
Deprecated. -
setDisplayedCalendar
Deprecated. -
withDisplayedCalendar
Deprecated. -
displayedLocalDateTime
The skin will use this date and time to determine what to display. Each skin determines what interval suites best; for example the week skin will find the week where this LocalDateTime falls in using the Locale to decide on what day a week starts, the day skin will render the date. Possibly in the future there may be skins that render part of a day, that simply is not known, hence this is a LocalDateTime instead of a LocalDate. -
getDisplayedLocalDateTime
-
setDisplayedLocalDateTime
-
withDisplayedLocalDateTime
-
selectedAppointments
selectedAppointments: a list of selected appointments -
calendarRangeCallbackProperty
@Deprecated public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Void>> calendarRangeCallbackProperty()Deprecated.calendarRangeCallback: Appointments should match: - start date >= range start - end date <= range end -
getCalendarRangeCallback
Deprecated.Gets the value of the property calendarRangeCallback.- Property description:
- calendarRangeCallback: Appointments should match: - start date >= range start - end date <= range end
-
setCalendarRangeCallback
@Deprecated public void setCalendarRangeCallback(javafx.util.Callback<Agenda.CalendarRange, Void> value) Deprecated.Sets the value of the property calendarRangeCallback.- Property description:
- calendarRangeCallback: Appointments should match: - start date >= range start - end date <= range end
-
withCalendarRangeCallback
@Deprecated public Agenda withCalendarRangeCallback(javafx.util.Callback<Agenda.CalendarRange, Void> value) Deprecated. -
localDateTimeRangeCallbackProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Void>> localDateTimeRangeCallbackProperty()localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end -
getLocalDateTimeRangeCallback
Gets the value of the property localDateTimeRangeCallback.- Property description:
- localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end
-
setLocalDateTimeRangeCallback
public void setLocalDateTimeRangeCallback(javafx.util.Callback<Agenda.LocalDateTimeRange, Void> value) Sets the value of the property localDateTimeRangeCallback.- Property description:
- localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end
-
withLocalDateTimeRangeCallback
public Agenda withLocalDateTimeRangeCallback(javafx.util.Callback<Agenda.LocalDateTimeRange, Void> value) -
createAppointmentCallbackProperty
@Deprecated public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Agenda.Appointment>> createAppointmentCallbackProperty()Deprecated.addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created. -
getCreateAppointmentCallback
@Deprecated public javafx.util.Callback<Agenda.CalendarRange,Agenda.Appointment> getCreateAppointmentCallback()Deprecated.Gets the value of the property createAppointmentCallback.- Property description:
- addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created.
-
setCreateAppointmentCallback
@Deprecated public void setCreateAppointmentCallback(javafx.util.Callback<Agenda.CalendarRange, Agenda.Appointment> value) Deprecated.Sets the value of the property createAppointmentCallback.- Property description:
- addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created.
-
withCreateAppointmentCallback
@Deprecated public Agenda withCreateAppointmentCallback(javafx.util.Callback<Agenda.CalendarRange, Agenda.Appointment> value) Deprecated. -
newAppointmentCallbackProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Agenda.Appointment>> newAppointmentCallbackProperty()addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created. -
getNewAppointmentCallback
public javafx.util.Callback<Agenda.LocalDateTimeRange,Agenda.Appointment> getNewAppointmentCallback()Gets the value of the property newAppointmentCallback.- Property description:
- addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created.
-
setNewAppointmentCallback
public void setNewAppointmentCallback(javafx.util.Callback<Agenda.LocalDateTimeRange, Agenda.Appointment> value) Sets the value of the property newAppointmentCallback.- Property description:
- addAppointmentCallback: Since the Agenda is not the owner of the appointments but only dictates an interface, it does not know how to create a new one. So you need to implement this callback and create an appointment. The calendars in the provided range specify the start and end times, they can be used to create the new appointment (they do not need to be cloned). Null may be returned to indicate that no appointment was created.
-
withNewAppointmentCallback
public Agenda withNewAppointmentCallback(javafx.util.Callback<Agenda.LocalDateTimeRange, Agenda.Appointment> value) -
editAppointmentCallbackProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> editAppointmentCallbackProperty()editAppointmentCallback: Agenda has a default popup, but maybe you want to do something yourself. If so, you need to set this callback method and open your own window. Because Agenda does not dictate a event/callback in the implementation of appointment, it has no way of being informed of changes on the appointment. So when the custom edit is done, make sure that control gets updated, if this does not happen automatically through any of the existing listeners, then call refresh(). -
getEditAppointmentCallback
Gets the value of the property editAppointmentCallback.- Property description:
- editAppointmentCallback: Agenda has a default popup, but maybe you want to do something yourself. If so, you need to set this callback method and open your own window. Because Agenda does not dictate a event/callback in the implementation of appointment, it has no way of being informed of changes on the appointment. So when the custom edit is done, make sure that control gets updated, if this does not happen automatically through any of the existing listeners, then call refresh().
-
setEditAppointmentCallback
Sets the value of the property editAppointmentCallback.- Property description:
- editAppointmentCallback: Agenda has a default popup, but maybe you want to do something yourself. If so, you need to set this callback method and open your own window. Because Agenda does not dictate a event/callback in the implementation of appointment, it has no way of being informed of changes on the appointment. So when the custom edit is done, make sure that control gets updated, if this does not happen automatically through any of the existing listeners, then call refresh().
-
withEditAppointmentCallback
-
appointmentChangedCallbackProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> appointmentChangedCallbackProperty()appointmentChangedCallback: When an appointment is changed by Agenda (e.g. drag-n-drop to new time) change listeners will not fire. To enable the client to process those changes this callback can be used. Additionally, for a repeatable appointment, this can be used to prompt the user if they want the change to occur to one, this-and-future or all events in series. -
getAppointmentChangedCallback
Gets the value of the property appointmentChangedCallback.- Property description:
- appointmentChangedCallback: When an appointment is changed by Agenda (e.g. drag-n-drop to new time) change listeners will not fire. To enable the client to process those changes this callback can be used. Additionally, for a repeatable appointment, this can be used to prompt the user if they want the change to occur to one, this-and-future or all events in series.
-
setAppointmentChangedCallback
Sets the value of the property appointmentChangedCallback.- Property description:
- appointmentChangedCallback: When an appointment is changed by Agenda (e.g. drag-n-drop to new time) change listeners will not fire. To enable the client to process those changes this callback can be used. Additionally, for a repeatable appointment, this can be used to prompt the user if they want the change to occur to one, this-and-future or all events in series.
-
withAppointmentChangedCallback
-
actionCallbackProperty
public javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.Appointment,Void>> actionCallbackProperty()actionCallback: This triggered when the action is called on an appointment, usually this is a double click -
getActionCallback
Gets the value of the property actionCallback.- Property description:
- actionCallback: This triggered when the action is called on an appointment, usually this is a double click
-
setActionCallback
Sets the value of the property actionCallback.- Property description:
- actionCallback: This triggered when the action is called on an appointment, usually this is a double click
-
withActionCallback
-
refresh
public void refresh()Force the agenda to completely refresh itself -
print
public void print(javafx.print.PrinterJob job) Prints the current agenda using the given printer job.This method does not modify the state of the job, nor does it call
PrinterJob.endJob()
, so the job may be safely reused afterwards. This method is experimental.- Parameters:
job
- printer job used for printing
-