Class View2DLayout


  • public class View2DLayout
    extends Object
    Allows configuring the layout of a view when the chart enters a 2D rendering mode.
    • Field Detail

      • view

        protected View view
      • textAddMargin

        protected boolean textAddMargin
      • symetricHorizontalMargin

        protected boolean symetricHorizontalMargin
        When true, the global left margin (including text) will equal the global right margin. Allows the embedding axis to appear horizontally centered in the canvas.
      • symetricVerticalMargin

        protected boolean symetricVerticalMargin
        When true, the global left margin (including text) will equal the global right margin. Allows the embedding axis to appear horizontally centered in the canvas.
      • xTickLabelsDistance

        protected float xTickLabelsDistance
        Distance between axis and tick labels (hence, length of the tick)
      • xAxisLabelsDistance

        protected float xAxisLabelsDistance
        Distance between tick labels and axis label
      • yTickLabelsDistance

        protected float yTickLabelsDistance
        Distance between axis and tick labels (hence, length of the tick)
      • yAxisLabelsDistance

        protected float yAxisLabelsDistance
        Distance between tick labels and axis label
      • marginLeft

        protected float marginLeft
        Extra margin
      • marginRight

        protected float marginRight
        Extra margin
      • marginTop

        protected float marginTop
        Extra margin
      • marginBottom

        protected float marginBottom
        Extra margin
    • Constructor Detail

      • View2DLayout

        public View2DLayout​(View view)
    • Method Detail

      • setSymetricMargin

        public void setSymetricMargin​(boolean symetricMargin)
      • setTickLabelDistance

        public void setTickLabelDistance​(float dist)
      • setAxisLabelDistance

        public void setAxisLabelDistance​(float dist)
      • setMargin

        public void setMargin​(float margin)
      • setMarginHorizontal

        public void setMarginHorizontal​(float margin)
        Set the same margin to left and right canvas borders
      • setMarginVertical

        public void setMarginVertical​(float margin)
        Set the same margin to top and bottom canvas borders
      • getMarginLeft

        public float getMarginLeft()
      • setMarginLeft

        public void setMarginLeft​(float marginLeft)
      • getMarginRight

        public float getMarginRight()
      • setMarginRight

        public void setMarginRight​(float marginRight)
      • getMarginTop

        public float getMarginTop()
      • setMarginTop

        public void setMarginTop​(float marginTop)
      • getMarginBottom

        public float getMarginBottom()
      • setMarginBottom

        public void setMarginBottom​(float marginBottom)
      • isTextAddMargin

        public boolean isTextAddMargin()
      • setTextAddMargin

        public void setTextAddMargin​(boolean keepTextVisible)
        Only usefull for debugging purpose, should not be used.
      • getxTickLabelsDistance

        public float getxTickLabelsDistance()
      • setxTickLabelsDistance

        public void setxTickLabelsDistance​(float xAxisTickLabelsDistance)
      • getxAxisLabelsDistance

        public float getxAxisLabelsDistance()
      • setxAxisLabelsDistance

        public void setxAxisLabelsDistance​(float xAxisNameLabelsDistance)
        Distance between tick labels and axis label
      • getyTickLabelsDistance

        public float getyTickLabelsDistance()
      • setyTickLabelsDistance

        public void setyTickLabelsDistance​(float yAxisTickLabelsDistance)
      • getyAxisLabelsDistance

        public float getyAxisLabelsDistance()
      • setyAxisLabelsDistance

        public void setyAxisLabelsDistance​(float yAxisNameLabelsDistance)
        Distance between tick labels and axis label
      • isSymetricHorizontalMargin

        public boolean isSymetricHorizontalMargin()
      • setSymetricHorizontalMargin

        public void setSymetricHorizontalMargin​(boolean symetricHorizontalMargin)
      • isSymetricVerticalMargin

        public boolean isSymetricVerticalMargin()
      • setSymetricVerticalMargin

        public void setSymetricVerticalMargin​(boolean symetricVerticalMargin)
      • apply

        public void apply()