Module com.flexganttfx.view
Class ScaleLayer<R extends Row<?,?,?>>
java.lang.Object
com.flexganttfx.view.graphics.layer.SystemLayer<R>
com.flexganttfx.view.graphics.layer.ScaleLayer<R>
- Type Parameters:
R
- the type of the rows
public class ScaleLayer<R extends Row<?,?,?>> extends SystemLayer<R>
Draws a scale for an entire row or for each line within the row. Scales vary
depending on the layout used for the row / line. The scale for the chart
layout displays the minimum and maximum values while the scale for the agenda
layout displays a time scale (8am, 9am, 10am, .....). The labels and dashes
in the scale layer have to align perfectly with the lines drawn by the agenda
lines layer and the chart lines layer.
Important: this layer can only be used if the graphics buffer size is
equal to zero. See also GraphicsBase.setCanvasBuffer(double)
.
-
Property Summary
Properties inherited from class com.flexganttfx.view.graphics.layer.SystemLayer
opacity, snapToPixel, visible
-
Constructor Summary
Constructors Constructor Description ScaleLayer(GraphicsBase<R> graphics)
-
Method Summary
Modifier and Type Method Description ObjectProperty<Paint>
agendaLabelsFillProperty()
BooleanProperty
agendaLabelsVisibleProperty()
DoubleProperty
agendaLinesLineWidthProperty()
DoubleProperty
agendaLinesSizeProperty()
ObjectProperty<Paint>
agendaLinesStrokeProperty()
BooleanProperty
agendaLinesVisibleProperty()
ObjectProperty<Paint>
backgroundFillProperty()
BooleanProperty
bluredBackgroundProperty()
ObjectProperty<DateTimeFormatter>
dateTimeFormatterProperty()
ObjectProperty<Paint>
dividerLineStrokeProperty()
void
drawLayer(RowCanvas<R> canvas, Instant startTime, Instant endTime)
ObjectProperty<Font>
fontProperty()
Paint
getAgendaLabelsFill()
Gets the value of the property agendaLabelsFill.double
getAgendaLinesLineWidth()
Gets the value of the property agendaLinesLineWidth.double
getAgendaLinesSize()
Gets the value of the property agendaLinesSize.Paint
getAgendaLinesStroke()
Gets the value of the property agendaLinesStroke.Paint
getBackgroundFill()
Gets the value of the property backgroundFill.DateTimeFormatter
getDateTimeFormatter()
Gets the value of the property dateTimeFormatter.Paint
getDividerLineStroke()
Gets the value of the property dividerLineStroke.Font
getFont()
Gets the value of the property font.Paint
getMajorChartLabelsFill()
Gets the value of the property majorChartLabelsFill.double
getMajorChartLinesLineWidth()
Gets the value of the property majorChartLinesLineWidth.double
getMajorChartLinesSize()
Gets the value of the property majorChartLinesSize.Paint
getMajorChartLinesStroke()
Gets the value of the property majorChartLinesStroke.Paint
getMinorChartLabelsFill()
Gets the value of the property minorChartLabelsFill.double
getMinorChartLinesLineWidth()
Gets the value of the property minorChartLinesLineWidth.double
getMinorChartLinesSize()
Gets the value of the property minorChartLinesSize.Paint
getMinorChartLinesStroke()
Gets the value of the property minorChartLinesStroke.NumberFormat
getNumberFormat()
Returns the value ofnumberFormatProperty()
.double
getPrefWidth()
Gets the value of the property prefWidth.double
getScaleWidth()
Gets the value of the property scaleWidth.boolean
isAgendaLabelsVisible()
Gets the value of the property agendaLabelsVisible.boolean
isAgendaLinesVisible()
Gets the value of the property agendaLinesVisible.boolean
isBluredBackground()
Gets the value of the property bluredBackground.boolean
isMajorChartLabelsVisible()
Gets the value of the property majorChartLabelsVisible.boolean
isMajorChartLinesVisible()
Gets the value of the property majorChartLinesVisible.boolean
isMinorChartLabelsVisible()
Gets the value of the property minorChartLabelsVisible.boolean
isMinorChartLinesVisible()
Gets the value of the property minorChartLinesVisible.ObjectProperty<Paint>
majorChartLabelsFillProperty()
BooleanProperty
majorChartLabelsVisibleProperty()
DoubleProperty
majorChartLinesLineWidthProperty()
DoubleProperty
majorChartLinesSizeProperty()
ObjectProperty<Paint>
majorChartLinesStrokeProperty()
BooleanProperty
majorChartLinesVisibleProperty()
ObjectProperty<Paint>
minorChartLabelsFillProperty()
BooleanProperty
minorChartLabelsVisibleProperty()
DoubleProperty
minorChartLinesLineWidthProperty()
DoubleProperty
minorChartLinesSizeProperty()
ObjectProperty<Paint>
minorChartLinesStrokeProperty()
BooleanProperty
minorChartLinesVisibleProperty()
ObjectProperty<NumberFormat>
numberFormatProperty()
A property used to store a number format that will be used to format the labels shown when a chart layout is being used.DoubleProperty
prefWidthProperty()
ReadOnlyDoubleProperty
scaleWidthProperty()
void
setAgendaLabelsFill(Paint fill)
Sets the value of the property agendaLabelsFill.void
setAgendaLabelsVisible(boolean visible)
Sets the value of the property agendaLabelsVisible.void
setAgendaLinesLineWidth(double lineWidth)
Sets the value of the property agendaLinesLineWidth.void
setAgendaLinesSize(double size)
Sets the value of the property agendaLinesSize.void
setAgendaLinesStroke(Paint stroke)
Sets the value of the property agendaLinesStroke.void
setAgendaLinesVisible(boolean visible)
Sets the value of the property agendaLinesVisible.void
setBackgroundFill(Paint fill)
Sets the value of the property backgroundFill.void
setBluredBackground(boolean blurred)
Sets the value of the property bluredBackground.void
setDateTimeFormatter(DateTimeFormatter formatter)
Sets the value of the property dateTimeFormatter.void
setDividerLineStroke(Paint stroke)
Sets the value of the property dividerLineStroke.void
setFont(Font font)
Sets the value of the property font.void
setMajorChartLabelsFill(Paint fill)
Sets the value of the property majorChartLabelsFill.void
setMajorChartLabelsVisible(boolean visible)
Sets the value of the property majorChartLabelsVisible.void
setMajorChartLinesLineWidth(double lineWidth)
Sets the value of the property majorChartLinesLineWidth.void
setMajorChartLinesSize(double size)
Sets the value of the property majorChartLinesSize.void
setMajorChartLinesStroke(Paint stroke)
Sets the value of the property majorChartLinesStroke.void
setMajorChartLinesVisible(boolean visible)
Sets the value of the property majorChartLinesVisible.void
setMinorChartLabelsFill(Paint fill)
Sets the value of the property minorChartLabelsFill.void
setMinorChartLabelsVisible(boolean visible)
Sets the value of the property minorChartLabelsVisible.void
setMinorChartLinesLineWidth(double lineWidth)
Sets the value of the property minorChartLinesLineWidth.void
setMinorChartLinesSize(double size)
Sets the value of the property minorChartLinesSize.void
setMinorChartLinesStroke(Paint stroke)
Sets the value of the property minorChartLinesStroke.void
setMinorChartLinesVisible(boolean visible)
Sets the value of the property minorChartLinesVisible.void
setNumberFormat(NumberFormat format)
Returns the value ofgetNumberFormat()
.void
setPrefWidth(double width)
Sets the value of the property prefWidth.Methods inherited from class com.flexganttfx.view.graphics.layer.SystemLayer
fadeInOutObservable, getGraphics, getName, getOpacity, isSnapToPixel, isVisible, opacityProperty, redraw, redrawObservable, setSnapToPixel, setVisible, snapPosition, snapSize, snapSpace, snapToPixelProperty, visibleProperty
-
Property Details
-
font
- See Also:
getFont()
,setFont(Font)
-
dividerLineStroke
-
bluredBackground
- See Also:
isBluredBackground()
,setBluredBackground(boolean)
-
backgroundFill
- See Also:
getBackgroundFill()
,setBackgroundFill(Paint)
-
prefWidth
- See Also:
getPrefWidth()
,setPrefWidth(double)
-
scaleWidth
- See Also:
getScaleWidth()
-
majorChartLabelsVisible
-
minorChartLabelsVisible
-
majorChartLinesVisible
-
majorChartLinesStroke
-
majorChartLabelsFill
-
minorChartLabelsFill
-
majorChartLinesLineWidth
-
majorChartLinesSize
-
minorChartLinesVisible
-
minorChartLinesStroke
-
minorChartLinesLineWidth
-
minorChartLinesSize
-
agendaLabelsVisible
-
agendaLinesLineWidth
-
agendaLinesSize
- See Also:
getAgendaLinesSize()
,setAgendaLinesSize(double)
-
agendaLinesStroke
-
agendaLabelsFill
- See Also:
getAgendaLabelsFill()
,setAgendaLabelsFill(Paint)
-
agendaLinesVisible
-
dateTimeFormatter
-
numberFormat
A property used to store a number format that will be used to format the labels shown when a chart layout is being used.- Since:
- 1.4
- See Also:
getNumberFormat()
,setNumberFormat(NumberFormat)
-
-
Constructor Details
-
Method Details
-
drawLayer
- Specified by:
drawLayer
in classSystemLayer<R extends Row<?,?,?>>
-
fontProperty
- See Also:
getFont()
,setFont(Font)
-
setFont
Sets the value of the property font.- Property description:
-
getFont
Gets the value of the property font.- Property description:
-
dividerLineStrokeProperty
-
getDividerLineStroke
Gets the value of the property dividerLineStroke.- Property description:
-
setDividerLineStroke
Sets the value of the property dividerLineStroke.- Property description:
-
bluredBackgroundProperty
- See Also:
isBluredBackground()
,setBluredBackground(boolean)
-
isBluredBackground
public final boolean isBluredBackground()Gets the value of the property bluredBackground.- Property description:
-
setBluredBackground
public final void setBluredBackground(boolean blurred)Sets the value of the property bluredBackground.- Property description:
-
backgroundFillProperty
- See Also:
getBackgroundFill()
,setBackgroundFill(Paint)
-
getBackgroundFill
Gets the value of the property backgroundFill.- Property description:
-
setBackgroundFill
Sets the value of the property backgroundFill.- Property description:
-
prefWidthProperty
- See Also:
getPrefWidth()
,setPrefWidth(double)
-
getPrefWidth
public final double getPrefWidth()Gets the value of the property prefWidth.- Property description:
-
setPrefWidth
public final void setPrefWidth(double width)Sets the value of the property prefWidth.- Property description:
-
scaleWidthProperty
- See Also:
getScaleWidth()
-
getScaleWidth
public final double getScaleWidth()Gets the value of the property scaleWidth.- Property description:
-
majorChartLabelsVisibleProperty
-
setMajorChartLabelsVisible
public final void setMajorChartLabelsVisible(boolean visible)Sets the value of the property majorChartLabelsVisible.- Property description:
-
isMajorChartLabelsVisible
public final boolean isMajorChartLabelsVisible()Gets the value of the property majorChartLabelsVisible.- Property description:
-
minorChartLabelsVisibleProperty
-
setMinorChartLabelsVisible
public final void setMinorChartLabelsVisible(boolean visible)Sets the value of the property minorChartLabelsVisible.- Property description:
-
isMinorChartLabelsVisible
public final boolean isMinorChartLabelsVisible()Gets the value of the property minorChartLabelsVisible.- Property description:
-
majorChartLinesVisibleProperty
-
setMajorChartLinesVisible
public final void setMajorChartLinesVisible(boolean visible)Sets the value of the property majorChartLinesVisible.- Property description:
-
isMajorChartLinesVisible
public final boolean isMajorChartLinesVisible()Gets the value of the property majorChartLinesVisible.- Property description:
-
majorChartLinesStrokeProperty
-
getMajorChartLinesStroke
Gets the value of the property majorChartLinesStroke.- Property description:
-
setMajorChartLinesStroke
Sets the value of the property majorChartLinesStroke.- Property description:
-
majorChartLabelsFillProperty
-
getMajorChartLabelsFill
Gets the value of the property majorChartLabelsFill.- Property description:
-
setMajorChartLabelsFill
Sets the value of the property majorChartLabelsFill.- Property description:
-
minorChartLabelsFillProperty
-
getMinorChartLabelsFill
Gets the value of the property minorChartLabelsFill.- Property description:
-
setMinorChartLabelsFill
Sets the value of the property minorChartLabelsFill.- Property description:
-
majorChartLinesLineWidthProperty
-
getMajorChartLinesLineWidth
public final double getMajorChartLinesLineWidth()Gets the value of the property majorChartLinesLineWidth.- Property description:
-
setMajorChartLinesLineWidth
public final void setMajorChartLinesLineWidth(double lineWidth)Sets the value of the property majorChartLinesLineWidth.- Property description:
-
majorChartLinesSizeProperty
-
getMajorChartLinesSize
public final double getMajorChartLinesSize()Gets the value of the property majorChartLinesSize.- Property description:
-
setMajorChartLinesSize
public final void setMajorChartLinesSize(double size)Sets the value of the property majorChartLinesSize.- Property description:
-
minorChartLinesVisibleProperty
-
setMinorChartLinesVisible
public final void setMinorChartLinesVisible(boolean visible)Sets the value of the property minorChartLinesVisible.- Property description:
-
isMinorChartLinesVisible
public final boolean isMinorChartLinesVisible()Gets the value of the property minorChartLinesVisible.- Property description:
-
minorChartLinesStrokeProperty
-
getMinorChartLinesStroke
Gets the value of the property minorChartLinesStroke.- Property description:
-
setMinorChartLinesStroke
Sets the value of the property minorChartLinesStroke.- Property description:
-
minorChartLinesLineWidthProperty
-
getMinorChartLinesLineWidth
public final double getMinorChartLinesLineWidth()Gets the value of the property minorChartLinesLineWidth.- Property description:
-
setMinorChartLinesLineWidth
public final void setMinorChartLinesLineWidth(double lineWidth)Sets the value of the property minorChartLinesLineWidth.- Property description:
-
minorChartLinesSizeProperty
-
getMinorChartLinesSize
public final double getMinorChartLinesSize()Gets the value of the property minorChartLinesSize.- Property description:
-
setMinorChartLinesSize
public final void setMinorChartLinesSize(double size)Sets the value of the property minorChartLinesSize.- Property description:
-
agendaLabelsVisibleProperty
-
setAgendaLabelsVisible
public final void setAgendaLabelsVisible(boolean visible)Sets the value of the property agendaLabelsVisible.- Property description:
-
isAgendaLabelsVisible
public final boolean isAgendaLabelsVisible()Gets the value of the property agendaLabelsVisible.- Property description:
-
agendaLinesLineWidthProperty
-
getAgendaLinesLineWidth
public final double getAgendaLinesLineWidth()Gets the value of the property agendaLinesLineWidth.- Property description:
-
setAgendaLinesLineWidth
public final void setAgendaLinesLineWidth(double lineWidth)Sets the value of the property agendaLinesLineWidth.- Property description:
-
agendaLinesSizeProperty
- See Also:
getAgendaLinesSize()
,setAgendaLinesSize(double)
-
getAgendaLinesSize
public final double getAgendaLinesSize()Gets the value of the property agendaLinesSize.- Property description:
-
setAgendaLinesSize
public final void setAgendaLinesSize(double size)Sets the value of the property agendaLinesSize.- Property description:
-
agendaLinesStrokeProperty
-
getAgendaLinesStroke
Gets the value of the property agendaLinesStroke.- Property description:
-
setAgendaLinesStroke
Sets the value of the property agendaLinesStroke.- Property description:
-
agendaLabelsFillProperty
- See Also:
getAgendaLabelsFill()
,setAgendaLabelsFill(Paint)
-
getAgendaLabelsFill
Gets the value of the property agendaLabelsFill.- Property description:
-
setAgendaLabelsFill
Sets the value of the property agendaLabelsFill.- Property description:
-
agendaLinesVisibleProperty
-
setAgendaLinesVisible
public final void setAgendaLinesVisible(boolean visible)Sets the value of the property agendaLinesVisible.- Property description:
-
isAgendaLinesVisible
public final boolean isAgendaLinesVisible()Gets the value of the property agendaLinesVisible.- Property description:
-
dateTimeFormatterProperty
-
setDateTimeFormatter
Sets the value of the property dateTimeFormatter.- Property description:
-
getDateTimeFormatter
Gets the value of the property dateTimeFormatter.- Property description:
-
numberFormatProperty
A property used to store a number format that will be used to format the labels shown when a chart layout is being used.- Since:
- 1.4
- See Also:
getNumberFormat()
,setNumberFormat(NumberFormat)
-
setNumberFormat
Returns the value ofgetNumberFormat()
.- Parameters:
format
- the number format to use for chart values- Since:
- 1.4
-
getNumberFormat
Returns the value ofnumberFormatProperty()
.- Returns:
- the number format for chart values
- Since:
- 1.4
-