-
public final class HorizontalAxis.Builder<Position extends AxisPosition.Horizontal> extends Axis.Builder<Position>
A subclass of Axis.Builder used to build HorizontalAxis instances.
-
-
Field Summary
Fields Modifier and Type Field Description private IntegerlabelSpacingprivate IntegerlabelOffsetprivate AxisItemPlacer.HorizontalitemPlacerprivate TextComponentlabelprivate LineComponentaxisprivate LineComponenttickprivate FloattickLengthDpprivate LineComponentguidelineprivate AxisValueFormatter<Position>valueFormatterprivate Axis.SizeConstraintsizeConstraintprivate TextComponenttitleComponentprivate CharSequencetitleprivate FloatlabelRotationDegrees
-
Constructor Summary
Constructors Constructor Description HorizontalAxis.Builder(Axis.Builder<Position> builder)
-
Method Summary
Modifier and Type Method Description final IntegergetLabelSpacing()How often labels (and their corresponding ticks and guidelines) should be drawn. final UnitsetLabelSpacing(@Deprecated(message = `labelSpacing` is being replaced by `AxisItemPlacer.Horizontal`. Create a base implementation with the desired spacing via `AxisItemPlacer.Horizontal.default`, and use the `itemPlacer` field to apply it to this `HorizontalAxis.Builder`.) Integer labelSpacing)final IntegergetLabelOffset()The number of labels (and, for HorizontalLayout.FullWidth, their corresponding ticks and guidelines) to skip from the start. final UnitsetLabelOffset(@Deprecated(message = `labelOffset` is being replaced by `AxisItemPlacer.Horizontal`. Create a base implementation with the desired offset via `AxisItemPlacer.Horizontal.default`, and use the `itemPlacer` field to apply it to this `HorizontalAxis.Builder`.) Integer labelOffset)final AxisItemPlacer.HorizontalgetItemPlacer()Determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines. final UnitsetItemPlacer(AxisItemPlacer.Horizontal itemPlacer)Determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines. final TextComponentgetLabel()The TextComponent to use for labels. final UnitsetLabel(TextComponent label)The TextComponent to use for labels. final LineComponentgetAxis()The LineComponent to use for the axis line. final UnitsetAxis(LineComponent axis)The LineComponent to use for the axis line. final LineComponentgetTick()The LineComponent to use for axis ticks. final UnitsetTick(LineComponent tick)The LineComponent to use for axis ticks. final FloatgetTickLengthDp()The tick length (in dp). final UnitsetTickLengthDp(Float tickLengthDp)The tick length (in dp). final LineComponentgetGuideline()The LineComponent to use for guidelines. final UnitsetGuideline(LineComponent guideline)The LineComponent to use for guidelines. final AxisValueFormatter<Position>getValueFormatter()The AxisValueFormatter for the axis. final UnitsetValueFormatter(AxisValueFormatter<Position> valueFormatter)The AxisValueFormatter for the axis. final Axis.SizeConstraintgetSizeConstraint()Used by Axis subclasses for sizing and layout. final UnitsetSizeConstraint(Axis.SizeConstraint sizeConstraint)Used by Axis subclasses for sizing and layout. final TextComponentgetTitleComponent()An optional TextComponent to use as the axis title. final UnitsetTitleComponent(TextComponent titleComponent)An optional TextComponent to use as the axis title. final CharSequencegetTitle()The axis title. final UnitsetTitle(CharSequence title)The axis title. final FloatgetLabelRotationDegrees()The rotation of axis labels (in degrees). final UnitsetLabelRotationDegrees(Float labelRotationDegrees)The rotation of axis labels (in degrees). final <T extends Position> HorizontalAxis<T>build()Creates a HorizontalAxis instance with the properties from this Builder. -
-
Constructor Detail
-
HorizontalAxis.Builder
HorizontalAxis.Builder(Axis.Builder<Position> builder)
-
-
Method Detail
-
getLabelSpacing
final Integer getLabelSpacing()
How often labels (and their corresponding ticks and guidelines) should be drawn.
-
setLabelSpacing
final Unit setLabelSpacing(@Deprecated(message = `labelSpacing` is being replaced by `AxisItemPlacer.Horizontal`. Create a base implementation with the desired spacing via `AxisItemPlacer.Horizontal.default`, and use the `itemPlacer` field to apply it to this `HorizontalAxis.Builder`.) Integer labelSpacing)
-
getLabelOffset
final Integer getLabelOffset()
The number of labels (and, for HorizontalLayout.FullWidth, their corresponding ticks and guidelines) to skip from the start.
-
setLabelOffset
final Unit setLabelOffset(@Deprecated(message = `labelOffset` is being replaced by `AxisItemPlacer.Horizontal`. Create a base implementation with the desired offset via `AxisItemPlacer.Horizontal.default`, and use the `itemPlacer` field to apply it to this `HorizontalAxis.Builder`.) Integer labelOffset)
-
getItemPlacer
final AxisItemPlacer.Horizontal getItemPlacer()
Determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines.
-
setItemPlacer
final Unit setItemPlacer(AxisItemPlacer.Horizontal itemPlacer)
Determines for what x values the HorizontalAxis is to display labels, ticks, and guidelines.
-
getLabel
final TextComponent getLabel()
The TextComponent to use for labels.
-
setLabel
final Unit setLabel(TextComponent label)
The TextComponent to use for labels.
-
getAxis
final LineComponent getAxis()
The LineComponent to use for the axis line.
-
setAxis
final Unit setAxis(LineComponent axis)
The LineComponent to use for the axis line.
-
getTick
final LineComponent getTick()
The LineComponent to use for axis ticks.
-
setTick
final Unit setTick(LineComponent tick)
The LineComponent to use for axis ticks.
-
getTickLengthDp
final Float getTickLengthDp()
The tick length (in dp).
-
setTickLengthDp
final Unit setTickLengthDp(Float tickLengthDp)
The tick length (in dp).
-
getGuideline
final LineComponent getGuideline()
The LineComponent to use for guidelines.
-
setGuideline
final Unit setGuideline(LineComponent guideline)
The LineComponent to use for guidelines.
-
getValueFormatter
final AxisValueFormatter<Position> getValueFormatter()
The AxisValueFormatter for the axis.
-
setValueFormatter
final Unit setValueFormatter(AxisValueFormatter<Position> valueFormatter)
The AxisValueFormatter for the axis.
-
getSizeConstraint
final Axis.SizeConstraint getSizeConstraint()
Used by Axis subclasses for sizing and layout.
-
setSizeConstraint
final Unit setSizeConstraint(Axis.SizeConstraint sizeConstraint)
Used by Axis subclasses for sizing and layout.
-
getTitleComponent
final TextComponent getTitleComponent()
An optional TextComponent to use as the axis title.
-
setTitleComponent
final Unit setTitleComponent(TextComponent titleComponent)
An optional TextComponent to use as the axis title.
-
getTitle
final CharSequence getTitle()
The axis title.
-
setTitle
final Unit setTitle(CharSequence title)
The axis title.
-
getLabelRotationDegrees
final Float getLabelRotationDegrees()
The rotation of axis labels (in degrees).
-
setLabelRotationDegrees
final Unit setLabelRotationDegrees(Float labelRotationDegrees)
The rotation of axis labels (in degrees).
-
build
final <T extends Position> HorizontalAxis<T> build()
Creates a HorizontalAxis instance with the properties from this Builder.
-
-
-
-