Class Agenda

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

    Properties
    Type
    Property
    Description
    javafx.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 click
    javafx.beans.property.SimpleBooleanProperty
    AllowDragging: allow appointments being dragged by the mouse
    javafx.beans.property.SimpleBooleanProperty
    AllowResize: allow appointments to be resized using the mouse
    javafx.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 end
    javafx.beans.property.ObjectProperty<Locale>
    Locale: the locale is used to determine first-day-of-week, weekday labels, etc
    javafx.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 Classes
    Modifier and Type
    Class
    Description
    static 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 properties
    static class 
    A class to help you get going using Calendar; all the required methods of the interface are implemented as JavaFX properties
    static class 
     
    static class 
    A class to help you get going using LocalDateTime; all the required methods of the interface are implemented as JavaFX properties
    static 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 properties
    static class 
    Deprecated.
    static class 
    A Datetime range, for callbacks
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.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 click
    javafx.beans.property.SimpleBooleanProperty
    AllowDragging: allow appointments being dragged by the mouse
    javafx.beans.property.SimpleBooleanProperty
    AllowResize: allow appointments to be resized using the mouse
    javafx.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 actionCallback property.
    boolean
    Gets the value of the allowDragging property.
    boolean
    Gets the value of the allowResize property.
    javafx.util.Callback<Agenda.Appointment,Void>
    Gets the value of the appointmentChangedCallback property.
    javafx.util.Callback<Agenda.CalendarRange,Void>
    Deprecated.
    Deprecated.
    Deprecated.
     
    javafx.util.Callback<Agenda.Appointment,Void>
    Gets the value of the editAppointmentCallback property.
    javafx.util.Callback<Agenda.LocalDateTimeRange,Void>
    Gets the value of the localDateTimeRangeCallback property.
    Gets the value of the locale property.
    Gets the value of the newAppointmentCallback property.
    Return the path to the CSS file so things are setup right
    javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.LocalDateTimeRange,Void>>
    localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end
    javafx.beans.property.ObjectProperty<Locale>
    Locale: the locale is used to determine first-day-of-week, weekday labels, etc
    javafx.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
    Force the agenda to completely refresh itself
    javafx.collections.ObservableList<Agenda.Appointment>
    selectedAppointments: a list of selected appointments
    void
    setActionCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
    Sets the value of the actionCallback property.
    void
    setAllowDragging(boolean value)
    Sets the value of the allowDragging property.
    void
    setAllowResize(boolean value)
    Sets the value of the allowResize property.
    void
    Sets the value of the appointmentChangedCallback property.
    void
    setCalendarRangeCallback(javafx.util.Callback<Agenda.CalendarRange,Void> value)
    Deprecated.
    void
    Deprecated.
    void
    Deprecated.
    void
     
    void
    setEditAppointmentCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
    Sets the value of the editAppointmentCallback property.
    void
    Sets the value of the localDateTimeRangeCallback property.
    void
    Sets the value of the locale property.
    void
    Sets the value of the newAppointmentCallback property.
    withActionCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
     
    withAllowDragging(boolean value)
     
    withAllowResize(boolean value)
     
     
    Deprecated.
    Deprecated.
    Deprecated.
     
     
    withId(String value)
    Id
     
     
     

    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

  • Field Details

    • appointments

      private final javafx.collections.ObservableList<Agenda.Appointment> appointments
    • appointmentGroups

      private final javafx.collections.ObservableList<Agenda.AppointmentGroup> appointmentGroups
    • localeObjectProperty

      private final javafx.beans.property.ObjectProperty<Locale> localeObjectProperty
    • allowDraggingObjectProperty

      private final javafx.beans.property.SimpleBooleanProperty allowDraggingObjectProperty
    • allowResizeObjectProperty

      private final javafx.beans.property.SimpleBooleanProperty allowResizeObjectProperty
    • displayedCalendarObjectProperty

      private final javafx.beans.property.ObjectProperty<Calendar> displayedCalendarObjectProperty
    • displayedLocalDateTimeObjectProperty

      private final javafx.beans.property.ObjectProperty<LocalDateTime> displayedLocalDateTimeObjectProperty
    • selectedAppointments

      private final javafx.collections.ObservableList<Agenda.Appointment> selectedAppointments
    • calendarRangeCallbackObjectProperty

      @Deprecated private final javafx.beans.property.ObjectProperty<javafx.util.Callback<Agenda.CalendarRange,Void>> calendarRangeCallbackObjectProperty
      Deprecated.
    • 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>> createAppointmentCallbackObjectProperty
      Deprecated.
    • 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

      public String getUserAgentStylesheet()
      Return the path to the CSS file so things are setup right
      Overrides:
      getUserAgentStylesheet in class javafx.scene.layout.Region
    • createDefaultSkin

      public javafx.scene.control.Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class javafx.scene.control.Control
    • withId

      public Agenda withId(String value)
      Id
    • appointments

      public javafx.collections.ObservableList<Agenda.Appointment> appointments()
      Appointments:
    • constructAppointments

      private void constructAppointments()
    • appointmentGroups

      public javafx.collections.ObservableList<Agenda.AppointmentGroup> appointmentGroups()
      AppointmentGroups:
    • constructAppointmentGroups

      private void constructAppointmentGroups()
    • localeProperty

      public javafx.beans.property.ObjectProperty<Locale> localeProperty()
      Locale: the locale is used to determine first-day-of-week, weekday labels, etc
      Returns:
      the locale property
      See Also:
    • getLocale

      public Locale getLocale()
      Gets the value of the locale property.
      Property description:
      Locale: the locale is used to determine first-day-of-week, weekday labels, etc
      Returns:
      the value of the locale property
      See Also:
    • setLocale

      public void setLocale(Locale value)
      Sets the value of the locale property.
      Property description:
      Locale: the locale is used to determine first-day-of-week, weekday labels, etc
      Parameters:
      value - the value for the locale property
      See Also:
    • withLocale

      public Agenda withLocale(Locale value)
    • allowDraggingProperty

      public javafx.beans.property.SimpleBooleanProperty allowDraggingProperty()
      AllowDragging: allow appointments being dragged by the mouse
      Returns:
      the allowDragging property
      See Also:
    • getAllowDragging

      public boolean getAllowDragging()
      Gets the value of the allowDragging property.
      Property description:
      AllowDragging: allow appointments being dragged by the mouse
      Returns:
      the value of the allowDragging property
      See Also:
    • setAllowDragging

      public void setAllowDragging(boolean value)
      Sets the value of the allowDragging property.
      Property description:
      AllowDragging: allow appointments being dragged by the mouse
      Parameters:
      value - the value for the allowDragging property
      See Also:
    • withAllowDragging

      public Agenda withAllowDragging(boolean value)
    • allowResizeProperty

      public javafx.beans.property.SimpleBooleanProperty allowResizeProperty()
      AllowResize: allow appointments to be resized using the mouse
      Returns:
      the allowResize property
      See Also:
    • getAllowResize

      public boolean getAllowResize()
      Gets the value of the allowResize property.
      Property description:
      AllowResize: allow appointments to be resized using the mouse
      Returns:
      the value of the allowResize property
      See Also:
    • setAllowResize

      public void setAllowResize(boolean value)
      Sets the value of the allowResize property.
      Property description:
      AllowResize: allow appointments to be resized using the mouse
      Parameters:
      value - the value for the allowResize property
      See Also:
    • withAllowResize

      public Agenda withAllowResize(boolean value)
    • displayedCalendar

      @Deprecated public javafx.beans.property.ObjectProperty<Calendar> 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 public Calendar getDisplayedCalendar()
      Deprecated.
    • setDisplayedCalendar

      @Deprecated public void setDisplayedCalendar(Calendar value)
      Deprecated.
    • withDisplayedCalendar

      @Deprecated public Agenda withDisplayedCalendar(Calendar value)
      Deprecated.
    • displayedLocalDateTime

      public javafx.beans.property.ObjectProperty<LocalDateTime> 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

      public LocalDateTime getDisplayedLocalDateTime()
    • setDisplayedLocalDateTime

      public void setDisplayedLocalDateTime(LocalDateTime value)
    • withDisplayedLocalDateTime

      public Agenda withDisplayedLocalDateTime(LocalDateTime value)
    • selectedAppointments

      public javafx.collections.ObservableList<Agenda.Appointment> 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
      Returns:
      the calendarRangeCallback property
      See Also:
    • getCalendarRangeCallback

      @Deprecated public javafx.util.Callback<Agenda.CalendarRange,Void> getCalendarRangeCallback()
      Deprecated.
      Gets the value of the calendarRangeCallback property.
      Property description:
      calendarRangeCallback: Appointments should match: - start date >= range start - end date <= range end
      Returns:
      the value of the calendarRangeCallback property
      See Also:
    • setCalendarRangeCallback

      @Deprecated public void setCalendarRangeCallback(javafx.util.Callback<Agenda.CalendarRange,Void> value)
      Deprecated.
      Sets the value of the calendarRangeCallback property.
      Property description:
      calendarRangeCallback: Appointments should match: - start date >= range start - end date <= range end
      Parameters:
      value - the value for the calendarRangeCallback property
      See Also:
    • 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
      Returns:
      the localDateTimeRangeCallback property
      See Also:
    • getLocalDateTimeRangeCallback

      public javafx.util.Callback<Agenda.LocalDateTimeRange,Void> getLocalDateTimeRangeCallback()
      Gets the value of the localDateTimeRangeCallback property.
      Property description:
      localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end
      Returns:
      the value of the localDateTimeRangeCallback property
      See Also:
    • setLocalDateTimeRangeCallback

      public void setLocalDateTimeRangeCallback(javafx.util.Callback<Agenda.LocalDateTimeRange,Void> value)
      Sets the value of the localDateTimeRangeCallback property.
      Property description:
      localDateTimeRangeCallback: Appointments should match: - start date >= range start - end date <= range end
      Parameters:
      value - the value for the localDateTimeRangeCallback property
      See Also:
    • 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.
      Returns:
      the createAppointmentCallback property
      See Also:
    • getCreateAppointmentCallback

      @Deprecated public javafx.util.Callback<Agenda.CalendarRange,Agenda.Appointment> getCreateAppointmentCallback()
      Deprecated.
      Gets the value of the createAppointmentCallback property.
      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.
      Returns:
      the value of the createAppointmentCallback property
      See Also:
    • setCreateAppointmentCallback

      @Deprecated public void setCreateAppointmentCallback(javafx.util.Callback<Agenda.CalendarRange,Agenda.Appointment> value)
      Deprecated.
      Sets the value of the createAppointmentCallback property.
      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.
      Parameters:
      value - the value for the createAppointmentCallback property
      See Also:
    • 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.
      Returns:
      the newAppointmentCallback property
      See Also:
    • getNewAppointmentCallback

      public javafx.util.Callback<Agenda.LocalDateTimeRange,Agenda.Appointment> getNewAppointmentCallback()
      Gets the value of the newAppointmentCallback property.
      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.
      Returns:
      the value of the newAppointmentCallback property
      See Also:
    • setNewAppointmentCallback

      public void setNewAppointmentCallback(javafx.util.Callback<Agenda.LocalDateTimeRange,Agenda.Appointment> value)
      Sets the value of the newAppointmentCallback property.
      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.
      Parameters:
      value - the value for the newAppointmentCallback property
      See Also:
    • 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().
      Returns:
      the editAppointmentCallback property
      See Also:
    • getEditAppointmentCallback

      public javafx.util.Callback<Agenda.Appointment,Void> getEditAppointmentCallback()
      Gets the value of the editAppointmentCallback property.
      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().
      Returns:
      the value of the editAppointmentCallback property
      See Also:
    • setEditAppointmentCallback

      public void setEditAppointmentCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
      Sets the value of the editAppointmentCallback property.
      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().
      Parameters:
      value - the value for the editAppointmentCallback property
      See Also:
    • withEditAppointmentCallback

      public Agenda withEditAppointmentCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
    • 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.
      Returns:
      the appointmentChangedCallback property
      See Also:
    • getAppointmentChangedCallback

      public javafx.util.Callback<Agenda.Appointment,Void> getAppointmentChangedCallback()
      Gets the value of the appointmentChangedCallback property.
      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.
      Returns:
      the value of the appointmentChangedCallback property
      See Also:
    • setAppointmentChangedCallback

      public void setAppointmentChangedCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
      Sets the value of the appointmentChangedCallback property.
      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.
      Parameters:
      value - the value for the appointmentChangedCallback property
      See Also:
    • withAppointmentChangedCallback

      public Agenda withAppointmentChangedCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
    • 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
      Returns:
      the actionCallback property
      See Also:
    • getActionCallback

      public javafx.util.Callback<Agenda.Appointment,Void> getActionCallback()
      Gets the value of the actionCallback property.
      Property description:
      actionCallback: This triggered when the action is called on an appointment, usually this is a double click
      Returns:
      the value of the actionCallback property
      See Also:
    • setActionCallback

      public void setActionCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
      Sets the value of the actionCallback property.
      Property description:
      actionCallback: This triggered when the action is called on an appointment, usually this is a double click
      Parameters:
      value - the value for the actionCallback property
      See Also:
    • withActionCallback

      public Agenda withActionCallback(javafx.util.Callback<Agenda.Appointment,Void> value)
    • 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