Documentation of 'de.erichseifert.gral.plots.axes.Axis' Java class
Axis
de.erichseifert.gral.plots.axes

Class Axis

  • All Implemented Interfaces:
    java.io.Serializable


    public class Axis
    extends java.lang.Object
    implements java.io.Serializable

    Class that represents an arbitrary axis.

    Functionality includes:

    • Different ways of setting and getting the range of this axis
    • Administration of AxisListeners
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      Axis()
      Initializes a new instance without minimum and maximum values.
      Axis(java.lang.Number min, java.lang.Number max)
      Initializes a new instance with the specified minimum and maximum values.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addAxisListener(AxisListener listener)
      Adds the specified AxisListener to this Axis.
      java.lang.Number getMax()
      Returns the maximum value to be displayed.
      java.lang.Number getMin()
      Returns the minimum value to be displayed.
      java.lang.Number getPosition(java.lang.Number value)
      Returns the relative position of the specified value on the axis.
      double getRange()
      Returns the range of values to be displayed.
      boolean isAutoscaled()
      Returns whether the axis range should be determined automatically rather than using the axis's minimum and a maximum values.
      boolean isValid()
      Returns whether the currently set minimum and maximum values are valid.
      void removeAxisListener(AxisListener listener)
      Removes the specified AxisListener from this Axis.
      void setAutoscaled(boolean autoscaled)
      Sets whether the axis range should be determined automatically rather than using the axis's minimum and a maximum values.
      void setMax(java.lang.Number max)
      Sets the maximum value to be displayed.
      void setMin(java.lang.Number min)
      Sets the minimum value to be displayed.
      void setRange(java.lang.Number min, java.lang.Number max)
      Sets the range of values to be displayed.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Axis

        public Axis()
        Initializes a new instance without minimum and maximum values.
      • Axis

        public Axis(java.lang.Number min,
                    java.lang.Number max)
        Initializes a new instance with the specified minimum and maximum values.
        Parameters:
        min - minimum value
        max - maximum value
    • Method Detail

      • addAxisListener

        public void addAxisListener(AxisListener listener)
        Adds the specified AxisListener to this Axis. The Listeners will be notified if changes to the Axis occur, for Example if the minimum or maximum value changes.
        Parameters:
        listener - Listener to be added
        See Also:
        AxisListener
      • removeAxisListener

        public void removeAxisListener(AxisListener listener)
        Removes the specified AxisListener from this Axis.
        Parameters:
        listener - Listener to be removed
        See Also:
        AxisListener
      • getMin

        public java.lang.Number getMin()
        Returns the minimum value to be displayed.
        Returns:
        Minimum value.
      • setMin

        public void setMin(java.lang.Number min)
        Sets the minimum value to be displayed.
        Parameters:
        min - Minimum value.
      • getMax

        public java.lang.Number getMax()
        Returns the maximum value to be displayed.
        Returns:
        Maximum value.
      • setMax

        public void setMax(java.lang.Number max)
        Sets the maximum value to be displayed.
        Parameters:
        max - Maximum value.
      • getRange

        public double getRange()
        Returns the range of values to be displayed.
        Returns:
        Distance between maximum and minimum value.
      • setRange

        public void setRange(java.lang.Number min,
                             java.lang.Number max)
        Sets the range of values to be displayed.
        Parameters:
        min - Minimum value.
        max - Maximum value.
      • getPosition

        public java.lang.Number getPosition(java.lang.Number value)
        Returns the relative position of the specified value on the axis. The value is returned in view coordinates.
        Parameters:
        value - Value whose positition is to be determined
        Returns:
        Position relative to axis range
      • isAutoscaled

        public boolean isAutoscaled()
        Returns whether the axis range should be determined automatically rather than using the axis's minimum and a maximum values.
        Returns:
        whether the axis is scaled automatically to fit the current data
      • setAutoscaled

        public void setAutoscaled(boolean autoscaled)
        Sets whether the axis range should be determined automatically rather than using the axis's minimum and a maximum values.
        Parameters:
        autoscaled - Defines whether the axis should be automatically scaled to fit the current data.
      • isValid

        public boolean isValid()
        Returns whether the currently set minimum and maximum values are valid.
        Returns:
        true when minimum and maximum values are correct, otherwise false

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.