Top Description Inners Fields Constructors Methods
com.calendarfx.view

public final Class DraggedEntry

extends Entry<Object>
Class Inheritance
Imports
com.calendarfx.model.Calendar, .Entry, java.time.Duration

Dragged entry is used internally only to represent the calendar entry that is currently being dragged. The entry wraps the original entry and stores some additional information about the ongoing drag.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
DraggedEntry.DragMode

An enum used for defining which drag operation is currently in progress.

Field Summary

Modifier and TypeField and Description
private DraggedEntry.DragMode
private Duration
private final Calendar<T>
private final Entry<?>

Constructor Summary

AccessConstructor and Description
public
DraggedEntry(Entry<?>
the original entry being dragged
entry
,
DraggedEntry.DragMode
the drag mode (start time, end time, or both)
dragMode
)

Constructs a new dragged entry

Method Summary

Modifier and TypeMethod and Description
public DraggedEntry.DragMode

Returns:

the drag mode
getDragMode
()

Returns the current drag mode (start time, end time, or both).

public Duration

Returns:

the offset duration
getOffsetDuration
()

Returns the duration between the mouse press location and the start time of the entry.

public Calendar<T>

Returns:

the calendar where the entry originated from
getOriginalCalendar
()

Returns the original calendar where the entry is located that is being dragged.

public Entry<?>

Returns:

the original calendar entry
getOriginalEntry
()

Returns the original entry that the user wants to edit.

public void
setDragMode(DraggedEntry.DragMode
the drag mode
dragMode
)

Sets the current drag mode (start time, end time, or both).

public void
setOffsetDuration(Duration
the offset duration
duration
)

Sets the duration between the mouse press location and the start time of the entry.

Inherited from com.calendarfx.model.Entry:
calendarPropertychangeEndDatechangeEndDatechangeEndTimechangeEndTimechangeStartDatechangeStartDatechangeStartTimechangeStartTimechangeZoneIdcompareTocreateRecurrenceendDatePropertyendTimePropertyequalsfullDayPropertygetCalendargetDurationgetEndAsLocalDateTimegetEndAsZonedDateTimegetEndDategetEndMillisgetEndTimegetIdgetIntervalgetLocationgetMinimumDurationgetPropertiesgetPropertySheetItemsgetRecurrenceEndgetRecurrenceIdgetRecurrenceRulegetRecurrenceSourceEntrygetStartAsLocalDateTimegetStartAsZonedDateTimegetStartDategetStartMillisgetStartTimegetStyleClassgetTitlegetUserObjectgetZoneIdhashCodehasPropertieshasStyleClasshiddenPropertyintersectsintersectsintervalPropertyisFullDayisHiddenisMultiDayisRecurrenceisRecurringisShowinglocationPropertymatchesminimumDurationPropertymultiDayPropertyrecurrenceEndPropertyrecurrenceIdPropertyrecurrencePropertyrecurrenceRulePropertyrecurrenceSourcePropertyremoveFromCalendarsetCalendarsetFullDaysetHiddensetIdsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetIntervalsetLocationsetMinimumDurationsetRecurrenceRulesetTitlesetUserObjectsetZoneIdstartDatePropertystartTimePropertytitlePropertytoStringuserObjectPropertyzoneIdProperty

Field Detail

dragModeback to summary
private DraggedEntry.DragMode dragMode
offsetDurationback to summary
private Duration offsetDuration
originalCalendarback to summary
private final Calendar<T> originalCalendar
originalEntryback to summary
private final Entry<?> originalEntry

Constructor Detail

DraggedEntryback to summary
public DraggedEntry(Entry<?> entry, DraggedEntry.DragMode dragMode)

Constructs a new dragged entry

Parameters
entry:Entry<?>

the original entry being dragged

dragMode:DraggedEntry.DragMode

the drag mode (start time, end time, or both)

Method Detail

getDragModeback to summary
public DraggedEntry.DragMode getDragMode()

Returns the current drag mode (start time, end time, or both).

Returns:DraggedEntry.DragMode

the drag mode

getOffsetDurationback to summary
public Duration getOffsetDuration()

Returns the duration between the mouse press location and the start time of the entry.

Returns:Duration

the offset duration

getOriginalCalendarback to summary
public Calendar<T> getOriginalCalendar()

Returns the original calendar where the entry is located that is being dragged.

Returns:Calendar<T>

the calendar where the entry originated from

getOriginalEntryback to summary
public Entry<?> getOriginalEntry()

Returns the original entry that the user wants to edit.

Returns:Entry<?>

the original calendar entry

setDragModeback to summary
public void setDragMode(DraggedEntry.DragMode dragMode)

Sets the current drag mode (start time, end time, or both).

Parameters
dragMode:DraggedEntry.DragMode

the drag mode

setOffsetDurationback to summary
public void setOffsetDuration(Duration duration)

Sets the duration between the mouse press location and the start time of the entry.

Parameters
duration:Duration

the offset duration

com.calendarfx.view back to summary

public final Enum DraggedEntry.DragMode

extends Enum<DraggedEntry.DragMode>
Class Inheritance

An enum used for defining which drag operation is currently in progress.

Field Summary

Modifier and TypeField and Description
public static final DraggedEntry.DragMode
END_TIME

The user is changing the end time of an entry.

public static final DraggedEntry.DragMode
START_AND_END_TIME

The user is dragging the entire entry, hence changing start and end time at the same time.

public static final DraggedEntry.DragMode
START_TIME

The user is changing the start time of an entry.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static DraggedEntry.DragMode
public static DraggedEntry.DragMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

END_TIMEback to summary
public static final DraggedEntry.DragMode END_TIME

The user is changing the end time of an entry.

START_AND_END_TIMEback to summary
public static final DraggedEntry.DragMode START_AND_END_TIME

The user is dragging the entire entry, hence changing start and end time at the same time.

START_TIMEback to summary
public static final DraggedEntry.DragMode START_TIME

The user is changing the start time of an entry.

Constructor Detail

DragModeback to summary
private DragMode()

Method Detail

valueOfback to summary
public static DraggedEntry.DragMode valueOf(String name)
valuesback to summary
public static DraggedEntry.DragMode[] values()