Class AbstractGraphAxes

    • Field Detail

      • width

        protected int width
      • height

        protected int height
      • x_resolution

        protected double x_resolution
      • y_resolution

        protected double y_resolution
      • min_x_value

        protected double min_x_value
      • max_x_value

        protected double max_x_value
      • max_y_value

        protected double max_y_value
      • lower_x_value

        protected double lower_x_value
      • upper_x_value

        protected double upper_x_value
      • upper_y_value

        protected double upper_y_value
    • Constructor Detail

      • AbstractGraphAxes

        public AbstractGraphAxes()
        Initialises a AbstractGraphAxes by setting the initial values and the layout.
    • Method Detail

      • setXResolution

        public void setXResolution​(double resolution)
        Sets the x resolution.
        Parameters:
        resolution - new x resolution
      • setYResolution

        public void setYResolution​(double resolution)
        Sets the y resolution
        Parameters:
        resolution - new y resolution
      • xAxis

        protected void xAxis​(Graphics g)
        Draws the x axis, containing of the axis line and the labels.
        Parameters:
        g - the Graphics context in which to paint
      • drawXLabels

        protected abstract void drawXLabels​(Graphics g)
        Draws the x labels onto the x axis. Must be overridden by subclasses.
        Parameters:
        g - the Graphics context in which to paint
      • setMinXValue

        public void setMinXValue​(double min)
        Sets the minimum x value
        Parameters:
        min - minimum x value
      • setMaxXValue

        public void setMaxXValue​(double max)
        Sets the maximum x value
        Parameters:
        max - maximum x value
      • setMaxYValue

        public void setMaxYValue​(double max)
        Sets the maximum y value
        Parameters:
        max - maximum y value
      • setLowerXValue

        public void setLowerXValue​(double value)
        Sets the lower value for the x-axis.
        Parameters:
        value - lower x value
      • setUpperXValue

        public void setUpperXValue​(double value)
        Sets the upper value for the x-axis.
        Parameters:
        value - upper x value
      • setUpperYValue

        public void setUpperYValue​(double value)
        Sets the upper value for the y-axis.
        Parameters:
        value - upper y value