Top Description Fields Constructors Methods
impl.com.calendarfx.view

public Class DayEntryViewSkin

extends SkinBase<DayEntryView>
Class Inheritance
Imports
com.calendarfx.model.Calendar, .Entry, com.calendarfx.view.DayEntryView, .DayView, .DraggedEntry, javafx.beans.InvalidationListener, .Observable, .WeakInvalidationListener, javafx.collections.ObservableMap, javafx.geometry.Orientation, .Pos, javafx.scene.Node, javafx.scene.control.Label, .SkinBase, javafx.scene.layout.FlowPane, .Region, javafx.scene.shape.Rectangle, java.time.ZoneId, .ZonedDateTime, java.time.format.DateTimeFormatter, .FormatStyle, .TextStyle, java.util.HashMap, .List, .Locale, .Map, .Objects, .Set

The default day entry view. It displays a title and the start time of the entry.

Field Summary

Modifier and TypeField and Description
private final DateTimeFormatter
private Map<Pos, FlowPane>
protected Label
protected Label
private final InvalidationListener
private final InvalidationListener
private final WeakInvalidationListener
private final WeakInvalidationListener

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected double
computeMinHeight(double
The width of the Skin, in case this value might dictate the minimum height.
width
,
double
the pixel snapped top inset
topInset
,
double
the pixel snapped right inset
rightInset
,
double
the pixel snapped bottom inset
bottomInset
,
double
the pixel snapped left inset
leftInset
)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

private void
createPosition(Pos pos, List<Node> nodes)

protected Label

Returns:

The label component.
createStartTimeLabel
()

The label used to show the start time.

protected Label

Returns:

The title component.
createTitleLabel
()

The label used to show the title.

protected String

Returns:

The formatted time.
formatTime
(ZonedDateTime
the time
time
,
ZoneId zoneId)

Convert the given time to a string.

protected String

Returns:

The formatted title.
formatTitle
(String
the title
title
)

Convert the given title.

protected Entry<?>

Returns:

The entry.
getEntry
()

protected void
layoutChildren(double
the x position
contentX
,
double
the y position
contentY
,
double
the width
contentWidth
,
double
the height
contentHeight
)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

private void
layoutNodesPane(Pos pos, FlowPane flowPane, double x, double y, double w, double h)

protected void
updateLabels()

This method will be called if the labels need to be updated.

private void
protected void
updateStyles()

This method updates the styles of the node according to the entry settings.

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputeMinWidthcomputePrefHeightcomputePrefWidthconsumeMouseEventsdisposeexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

formatterback to summary
private final DateTimeFormatter formatter
nodePanesback to summary
private Map<Pos, FlowPane> nodePanes
startTimeLabelback to summary
protected Label startTimeLabel
titleLabelback to summary
protected Label titleLabel
updateLabelsListenerback to summary
private final InvalidationListener updateLabelsListener
updateStylesListenerback to summary
private final InvalidationListener updateStylesListener
weakUpdateLabelsListenerback to summary
private final WeakInvalidationListener weakUpdateLabelsListener
weakUpdateStylesListenerback to summary
private final WeakInvalidationListener weakUpdateStylesListener

Constructor Detail

DayEntryViewSkinback to summary
public DayEntryViewSkin(DayEntryView view)

Method Detail

computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Parameters
width:double

The width of the Skin, in case this value might dictate the minimum height.

topInset:double

the pixel snapped top inset

rightInset:double

the pixel snapped right inset

bottomInset:double

the pixel snapped bottom inset

leftInset:double

the pixel snapped left inset

Returns:double

A double representing the minimum height of this Skin.

Annotations
@Override
createPositionback to summary
private void createPosition(Pos pos, List<Node> nodes)
createStartTimeLabelback to summary
protected Label createStartTimeLabel()

The label used to show the start time.

Returns:Label

The label component.

createTitleLabelback to summary
protected Label createTitleLabel()

The label used to show the title.

Returns:Label

The title component.

formatTimeback to summary
protected String formatTime(ZonedDateTime time, ZoneId zoneId)

Convert the given time to a string.

Parameters
time:ZonedDateTime

the time

Returns:String

The formatted time.

formatTitleback to summary
protected String formatTitle(String title)

Convert the given title. This method can be overridden for e.g. translating the title.

Parameters
title:String

the title

Returns:String

The formatted title.

getEntryback to summary
protected Entry<?> getEntry()
Returns:Entry<?>

The entry.

layoutChildrenback to summary
protected void layoutChildren(double contentX, double contentY, double contentWidth, double contentHeight)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Parameters
contentX:double

the x position

contentY:double

the y position

contentWidth:double

the width

contentHeight:double

the height

Annotations
@Override
layoutNodesPaneback to summary
private void layoutNodesPane(Pos pos, FlowPane flowPane, double x, double y, double w, double h)
updateLabelsback to summary
protected void updateLabels()

This method will be called if the labels need to be updated.

updateNodesback to summary
private void updateNodes()
updateStylesback to summary
protected void updateStyles()

This method updates the styles of the node according to the entry settings.