java.lang.Object
com.flexganttfx.model.Layout
com.flexganttfx.model.layout.AgendaLayout
public class AgendaLayout extends Layout
The agenda layout class is used to lay out activities in a style similar to a
regular calendar where a vertical scale will display hours. Activities are
used to represent appointments for a given day.
Note: Activities shown in agenda layout might be rendered several times. This
is, for example, the case when an activity spans several days.
- Since:
- 1.0
- See Also:
Row.setLayout(Layout)
,Row.getLineLayout(int)
,LinesManager.getLineLayout(int)
-
Property Summary
Properties Type Property Description ObjectProperty<LocalTime>
endTime
Returns the property used for storing the end time of the agenda.ObjectProperty<AgendaLayout.LayoutStrategy>
layoutStrategy
The property used to store the strategy that will be applied when the time intervals of activities in agenda layout intersect with each other.ObjectProperty<Duration>
minDuration
A property used to store the minimum duration of activities in the agenda layout.DoubleProperty
minLineSpacing
Stores the minimum space between two hour lines.DoubleProperty
overlapOffset
A property used to store an offset value between 0 and .5 that is used to indent activities when they overlap each other.ObjectProperty<LocalTime>
startTime
Returns the property used for storing the start time of the agenda. -
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AgendaLayout.LayoutStrategy
An enumerator for the different ways overlapping agenda entries can be laid out. -
Constructor Summary
Constructors Constructor Description AgendaLayout()
Constructs a new agenda layout instance. -
Method Summary
Modifier and Type Method Description ObjectProperty<LocalTime>
endTimeProperty()
Returns the property used for storing the end time of the agenda.LocalTime
getEndTime()
Returns the value of theendTimeProperty()
.AgendaLayout.LayoutStrategy
getLayoutStrategy()
Returns the value of thelayoutStrategyProperty()
.Duration
getMinDuration()
Returns the value of theminDurationProperty()
.double
getMinLineSpacing()
Returns the value ofminLineSpacingProperty()
.double
getOverlapOffset()
Returns the value ofoverlapOffsetProperty()
.LocalTime
getStartTime()
Returns the value of thestartTimeProperty()
.boolean
isSupportingHorizontalCursorLine()
Determines if the UI should be able to show a horizontal cursor line.ObjectProperty<AgendaLayout.LayoutStrategy>
layoutStrategyProperty()
The property used to store the strategy that will be applied when the time intervals of activities in agenda layout intersect with each other.ObjectProperty<Duration>
minDurationProperty()
A property used to store the minimum duration of activities in the agenda layout.DoubleProperty
minLineSpacingProperty()
Stores the minimum space between two hour lines.DoubleProperty
overlapOffsetProperty()
A property used to store an offset value between 0 and .5 that is used to indent activities when they overlap each other.void
setEndTime(LocalTime time)
Sets the value ofendTimeProperty()
.void
setLayoutStrategy(AgendaLayout.LayoutStrategy strategy)
Sets the value of thelayoutStrategyProperty()
.void
setMinDuration(Duration duration)
Sets the value of theminDurationProperty()
.void
setMinLineSpacing(double min)
Sets the value ofminLineSpacingProperty()
.void
setOverlapOffset(double offset)
Sets the value ofoverlapOffsetProperty()
.void
setStartTime(LocalTime time)
Sets the value of thestartTimeProperty()
.ObjectProperty<LocalTime>
startTimeProperty()
Returns the property used for storing the start time of the agenda.String
toString()
Methods inherited from class com.flexganttfx.model.Layout
getPadding, paddingProperty, setPadding
-
Property Details
-
minLineSpacing
Stores the minimum space between two hour lines.- See Also:
getMinLineSpacing()
,setMinLineSpacing(double)
-
startTime
Returns the property used for storing the start time of the agenda. The start time is used for the vertical time scale. The default value of this property isLocalTime.MIN
, which is equivalent to midnight.- Since:
- 1.0
- See Also:
getStartTime()
,setStartTime(LocalTime)
-
endTime
Returns the property used for storing the end time of the agenda. The end time is used for the vertical time scale. The default value of this property isLocalTime.MAX
, which is equivalent to the time just before midnight.- Since:
- 1.0
- See Also:
getEndTime()
,setEndTime(LocalTime)
-
minDuration
A property used to store the minimum duration of activities in the agenda layout.- Since:
- 1.0
- See Also:
getMinDuration()
,setMinDuration(Duration)
-
layoutStrategy
The property used to store the strategy that will be applied when the time intervals of activities in agenda layout intersect with each other. The strategy determines if the overlapping activities will be drawn on top of each other or in parallel (swim lanes).- Since:
- 1.0
- See Also:
getLayoutStrategy()
,setLayoutStrategy(AgendaLayout.LayoutStrategy)
-
overlapOffset
A property used to store an offset value between 0 and .5 that is used to indent activities when they overlap each other. The value must be between 0 and .5, which will be interpreted as a percentage of the width of the agenda entries. A value of .5 indicates that half the width of an entry will be overlapped by another one.- Since:
- 1.0
- See Also:
getOverlapOffset()
,setOverlapOffset(double)
-
-
Constructor Details
-
AgendaLayout
public AgendaLayout()Constructs a new agenda layout instance.- Since:
- 1.0
-
-
Method Details
-
minLineSpacingProperty
Stores the minimum space between two hour lines.- See Also:
getMinLineSpacing()
,setMinLineSpacing(double)
-
setMinLineSpacing
public final void setMinLineSpacing(double min)Sets the value ofminLineSpacingProperty()
.- Parameters:
min
- the minimum space between hour lines
-
getMinLineSpacing
public final double getMinLineSpacing()Returns the value ofminLineSpacingProperty()
.- Returns:
- the minimum space between hour lines
-
startTimeProperty
Returns the property used for storing the start time of the agenda. The start time is used for the vertical time scale. The default value of this property isLocalTime.MIN
, which is equivalent to midnight.- Since:
- 1.0
- See Also:
getStartTime()
,setStartTime(LocalTime)
-
getStartTime
Returns the value of thestartTimeProperty()
.- Returns:
- the agenda start time
- Since:
- 1.0
-
setStartTime
Sets the value of thestartTimeProperty()
.- Parameters:
time
- the new agenda start time- Since:
- 1.0
-
endTimeProperty
Returns the property used for storing the end time of the agenda. The end time is used for the vertical time scale. The default value of this property isLocalTime.MAX
, which is equivalent to the time just before midnight.- Since:
- 1.0
- See Also:
getEndTime()
,setEndTime(LocalTime)
-
getEndTime
Returns the value of theendTimeProperty()
.- Returns:
- the agenda end time
- Since:
- 1.0
-
setEndTime
Sets the value ofendTimeProperty()
.- Parameters:
time
- the new agenda end time- Since:
- 1.0
-
minDurationProperty
A property used to store the minimum duration of activities in the agenda layout.- Since:
- 1.0
- See Also:
getMinDuration()
,setMinDuration(Duration)
-
getMinDuration
Returns the value of theminDurationProperty()
.- Returns:
- the minimum duration of agenda activities
- Since:
- 1.0
-
setMinDuration
Sets the value of theminDurationProperty()
.- Parameters:
duration
- the new minimum duration of agenda activities- Since:
- 1.0
-
layoutStrategyProperty
The property used to store the strategy that will be applied when the time intervals of activities in agenda layout intersect with each other. The strategy determines if the overlapping activities will be drawn on top of each other or in parallel (swim lanes).- Since:
- 1.0
- See Also:
getLayoutStrategy()
,setLayoutStrategy(AgendaLayout.LayoutStrategy)
-
getLayoutStrategy
Returns the value of thelayoutStrategyProperty()
.- Returns:
- the currently used layout strategy
- Since:
- 1.0
-
setLayoutStrategy
Sets the value of thelayoutStrategyProperty()
.- Parameters:
strategy
- the layout strategy to use- Since:
- 1.0
-
overlapOffsetProperty
A property used to store an offset value between 0 and .5 that is used to indent activities when they overlap each other. The value must be between 0 and .5, which will be interpreted as a percentage of the width of the agenda entries. A value of .5 indicates that half the width of an entry will be overlapped by another one.- Since:
- 1.0
- See Also:
getOverlapOffset()
,setOverlapOffset(double)
-
setOverlapOffset
public final void setOverlapOffset(double offset)Sets the value ofoverlapOffsetProperty()
. The value must be between 0 and .5, which will be interpreted as a percentage of the width of the agenda entries. A value of .5 indicates that half the width of an entry will be overlapped by another one.- Parameters:
offset
- the offset in pixels- Since:
- 1.0
-
getOverlapOffset
public final double getOverlapOffset()Returns the value ofoverlapOffsetProperty()
.- Returns:
- the offset in pixels
- Since:
- 1.0
-
isSupportingHorizontalCursorLine
public boolean isSupportingHorizontalCursorLine()Description copied from class:Layout
Determines if the UI should be able to show a horizontal cursor line. Currently only theChartLayout
and theAgendaLayout
support this.- Specified by:
isSupportingHorizontalCursorLine
in classLayout
- Returns:
- true if a horizontal cursor line makes sense
-
toString
-