Class PlotWith2DAxes

  • All Implemented Interfaces:
    IConstants

    public final class PlotWith2DAxes
    extends PlotWithAxes
    This class is capable of computing the content of a chart (with axes) based on preferred sizes, text rotation, fit ability, scaling, etc and prepares it for rendering. WARNING: This is an internal class and subject to change
    • Constructor Detail

      • PlotWith2DAxes

        public PlotWith2DAxes​(IDisplayServer _ids,
                              ChartWithAxes _cwa,
                              RunTimeContext _rtc)
                       throws java.lang.IllegalArgumentException,
                              ChartException
        The default constructor
        Parameters:
        _ids - The display server using which the chart is computed
        _cwa - An instance of the model (ChartWithAxes)
        Throws:
        java.lang.IllegalArgumentException
        ChartException
    • Method Detail

      • compute

        public void compute​(Bounds bo)
                     throws ChartException,
                            java.lang.IllegalArgumentException
        This method computes the entire chart within the given bounds. If the dataset has changed but none of the axis attributes have changed, simply re-compute without 'rebuilding axes'.
        Specified by:
        compute in class PlotComputation
        Parameters:
        bo -
        Throws:
        ChartException
        java.lang.IllegalArgumentException
      • getPlotBoundsWithMargin

        public Bounds getPlotBoundsWithMargin()
        Returns the plot bounds with margin area. Only valid when margin percent is set, otherwise will return plot bounds.
        Returns:
        The plot bounds with margin area
      • addMargin

        public void addMargin​(int percent)
      • initDynamicPlotBounds

        public void initDynamicPlotBounds​(Bounds bo)
                                   throws ChartException
        Initializes the chart plot bounds for the dynamic size case.
        Parameters:
        bo - bounds with dynamic size, such as 0 or negative value
        Throws:
        ChartException
        Since:
        2.3