Top Description Inners Fields Constructors Methods
com.calendarfx.view

public abstract Class EntryViewBase<T extends DateControl>

extends CalendarFXControl
implements Comparable<EntryViewBase<T extends DateControl>>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Known Direct Subclasses
com.calendarfx.view.MonthEntryView, com.calendarfx.view.AllDayEntryView, com.calendarfx.view.DayEntryView
Type Parameters
<T>
the type of date control where the entry is being used
Imports
com.calendarfx.model.Calendar, .Entry, com.calendarfx.view.DateControl.EntryContextMenuParameter, .DateControl.EntryDetailsParameter, .DateControl.Layer, .DayViewBase.AvailabilityEditingEntryBehaviour, .DayViewBase.OverlapResolutionStrategy, javafx.animation.ScaleTransition, javafx.beans.InvalidationListener, .WeakInvalidationListener, javafx.beans.binding.Bindings, .BooleanBinding, javafx.beans.property.BooleanProperty, .DoubleProperty, .IntegerProperty, .ObjectProperty, .ReadOnlyBooleanProperty, .ReadOnlyBooleanWrapper, .ReadOnlyObjectProperty, .ReadOnlyObjectWrapper, .SimpleBooleanProperty, .SimpleDoubleProperty, .SimpleIntegerProperty, .SimpleObjectProperty, javafx.beans.value.ObservableValue, javafx.collections.FXCollections, .ListChangeListener, .MapChangeListener, .ObservableList, .ObservableSet, .WeakListChangeListener, javafx.css.PseudoClass, javafx.geometry.Point2D, javafx.scene.CacheHint, javafx.scene.control.ContextMenu, javafx.scene.input.ContextMenuEvent, .InputEvent, .KeyCode, .KeyEvent, .MouseEvent, javafx.util.Callback, .Duration, org.controlsfx.control.PropertySheet, .PropertySheet.Item, java.time.LocalDate, .LocalTime, java.util.Optional

The base class for all views that are representing calendar entries. There are specializations of this class for the DayView, the DetailedWeekView, and the MonthView. Each date control class uses their own entry factory to create entry view instances.

This view uses four pseudo classes:

These states can be used to visualize the view differently during editing operations. The default styling causes the original view of a dragged entry to lower its opacity so that the user can still see the view at its original location as a "ghost". If the user only changes the start or end time then the opacity of the original entry view will be set to 0, which means the view will be invisible.
See Also
DayView#entryViewFactoryProperty(), MonthView#entryViewFactoryProperty()

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
EntryViewBase.AlignmentStrategy

Different strategies for aligning the entry view inside its day view.

public static enum
EntryViewBase.HeightLayoutStrategy

Different strategies for determining the height of an entry view.

public static enum
EntryViewBase.Position

An enumerator used for specifying the position of an entry view.

Field Summary

Modifier and TypeField and Description
private T
private LocalDate
private LocalTime
private boolean
private DateControl.Layer
_layer

Entry presentation layer.

private EntryViewBase.Position
private LocalDate
private LocalTime
private Double
_widthPercentage

Width percentage of entry view.

private final ObjectProperty<EntryViewBase.AlignmentStrategy>
private final InvalidationListener
private ReadOnlyObjectWrapper<T>
private final IntegerProperty
private final ReadOnlyBooleanWrapper
private static final PseudoClass
private static final PseudoClass
private static final PseudoClass
private final ReadOnlyBooleanWrapper
private final InvalidationListener
private final ReadOnlyBooleanWrapper
private final BooleanProperty
private ReadOnlyObjectWrapper<LocalDate>
private ReadOnlyObjectWrapper<LocalTime>
private Entry<?>
private static final String
private final ObjectProperty<EntryViewBase.HeightLayoutStrategy>
private ReadOnlyBooleanWrapper
private ObjectProperty<DateControl.Layer>
private ReadOnlyObjectWrapper<EntryViewBase.Position>
private final ReadOnlyBooleanWrapper
private static final PseudoClass
private final InvalidationListener
private ReadOnlyObjectWrapper<LocalDate>
private ReadOnlyObjectWrapper<LocalTime>
private final ListChangeListener<? super String>
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener
private final WeakListChangeListener<? super String>
private DoubleProperty

Constructor Summary

AccessConstructor and Description
protected
EntryViewBase(Entry<?>
the calendar entry
entry
)

Constructs a new view for the given entry.

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<EntryViewBase.AlignmentStrategy>

Returns:

the entry view's alignment strategy
alignmentStrategyProperty
()

Stores the alignment strategy that will be used for this entry view.

private void
private void
public final void
bounce()

Makes the entry view "bounce" by applying a scale transition.

public int
compareTo(EntryViewBase<T>
the object to be compared.
o
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.

public final ReadOnlyObjectProperty<T>

Returns:

the date control
dateControlProperty
()

The date control where the entry view is shown.

public final IntegerProperty

Returns:

the "show details" click count
detailsClickCountProperty
()

Determines the click count that is required to trigger the "show details" action.

public final ReadOnlyBooleanProperty

Returns:

true if the entry end time is being changed
draggedEndProperty
()

A flag used to indicate that the user is currently changing the end time of the entry (view).

public final ReadOnlyBooleanProperty

Returns:

true if the entry is being dragged
draggedProperty
()

A flag used to indicate that the entry view is currently being dragged by the user.

public final ReadOnlyBooleanProperty

Returns:

true if the entry start time is being changed
draggedStartProperty
()

A flag used to indicate that the user is currently changing the start time of the entry (view).

public final BooleanProperty

Returns:

true if the entry should bounce
enableBounceProperty
()

Controls whether the entry should use a scale transition to bounce when it receives the focus.

public final ReadOnlyObjectProperty<LocalDate>

Returns:

the end date of the view
endDateProperty
()

The date where the view stops to appear (not the end date of the calendar entry).

public final ReadOnlyObjectProperty<LocalTime>

Returns:

the end time of the view (not of the calendar entry)
endTimeProperty
()

The time where the entry view ends (not the end time of the calendar entry).

public final EntryViewBase.AlignmentStrategy
public final T

Returns:

the date control
getDateControl
()

Returns the value of dateControlProperty().

public final int
public final LocalDate

Returns:

the end date of the view (not of the calendar entry)
getEndDate
()

Returns the value of endDateProperty().

public final LocalTime

Returns:

the end time of the view (not of the calendar entry)
getEndTime
()

Returns the value of endTimeProperty().

public final Entry<?>

Returns:

the calendar entry
getEntry
()

Returns the calendar entry for which the view was created.

public final EntryViewBase.HeightLayoutStrategy
public final DateControl.Layer

Returns:

the entry presentation layer
getLayer
()

Returns the value of layerProperty().

public final EntryViewBase.Position

Returns:

the position
getPosition
()

Returns the value of positionProperty().

public ObservableList<PropertySheet.Item>

Returns:

the property sheet items
getPropertySheetItems
()

Overrides com.calendarfx.view.CalendarFXControl.getPropertySheetItems.

Returns a list of property items that can be shown by the PropertySheet of ControlsFX.

public final LocalDate

Returns:

the start date of the view (not of the calendar entry)
getStartDate
()

Returns the value of startDateProperty().

public final LocalTime

Returns:

the start time of the view (not of the calendar entry)
getStartTime
()

Returns the value of startTimeProperty().

public double

Returns:

the entry percentage width
getWidthPercentage
()

Returns the value of widthPercentageProperty().

public final ObjectProperty<EntryViewBase.HeightLayoutStrategy>

Returns:

the entry view's height layout strategy
heightLayoutStrategyProperty
()

Stores the height layout strategy that will be used for this entry view.

public final ReadOnlyBooleanProperty

Returns:

a read-only property used as a flag to signal whether the view is hidden or not
hiddenProperty
()

A property set internally to indicate that the view could not be shown to the user.

public final boolean

Returns:

true if the time intervals of the two entries / views overlap each other
intersects
(EntryViewBase<?>
the other view to check
otherView
)

Convenience method to check if this entry view intersects with the given entry view.

private boolean
public final boolean

Returns:

true if the entry is being dragged
isDragged
()

Returns the value of the draggedProperty().

public final boolean

Returns:

true if the end time is changing
isDraggedEnd
()

Returns the value of draggedEndProperty().

public final boolean

Returns:

true if the start time is changing
isDraggedStart
()

Returns the value of draggedStartProperty().

public final boolean
public final boolean

Returns:

true if the view is currently hidden because of insufficient space
isHidden
()

Returns the value of hiddenProperty().

private boolean
public final boolean

Returns:

true if the entry can not be edited by the user
isReadOnly
()

Convenience method to determine whether the entry belongs to a calendar that is read-only.

public final boolean

Returns:

true if the entry view is selected
isSelected
()

Returns the value of selectedProperty().

public final ObjectProperty<DateControl.Layer>

Returns:

the entry presentation layer
layerProperty
()

Layer on which entry will be presented.

private void
public final ReadOnlyObjectProperty<EntryViewBase.Position>

Returns:

the position of the view within the time range of the calendar entry
positionProperty
()

A calendar entry can span multiple days.

private void
public final ReadOnlyBooleanProperty

Returns:

true if the entry view has been selected
selectedProperty
()

A flag used to indicate that the entry has been selected by the user.

public final void
private void
setDateControl(T control)

public final void
setDetailsClickCount(int detailsClickCount)

public final void
setEnableBounce(boolean enableBounce)

private void
private void
public void
setEntry(Entry<?> entry)

public final void
private void
setHidden(boolean b)

public final void
setLayer(DateControl.Layer
the entry presentation layer
layer
)

Sets the value of layerProperty().

private void
private void
private void
public final void
setWidthPercentage(double
the new entry percentage width
widthPercentage
)

Sets the value of widthPercentage.

private void
showDetails(InputEvent evt, double x, double y)

public final ReadOnlyObjectProperty<LocalDate>

Returns:

the start date of the view
startDateProperty
()

The date where the view starts to appear (not the start date of the calendar entry).

public final ReadOnlyObjectProperty<LocalTime>

Returns:

the start time of the view (not of the calendar entry)
startTimeProperty
()

The time where the entry view starts (not the start time of the calendar entry).

public String
toString()

Overrides javafx.scene.Node.toString.

Returns a string representation for the object.

private void
private void
private void
public final DoubleProperty

Returns:

the entry percentage width
widthPercentageProperty
()

A percentage value used to specify how much of the available width inside the view will be utilized by the entry views.

Inherited from com.calendarfx.view.CalendarFXControl:
getUserAgentStylesheet