## org.jfree.chart.axis
Class AxisSpace

    java.lang.Object
      org.jfree.chart.axis.AxisSpace

All Implemented Interfaces:
  java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

public class AxisSpace
extends java.lang.Object
implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

A record that contains the space required at each edge of a plot.

See Also:
  Serialized Form

Constructor Summary
`AxisSpace()` Creates a new axis space record.

Method Summary
`void` `add(double space, org.jfree.ui.RectangleEdge edge)` Adds some space to the edge corresponding to the specified axis location.
`java.lang.Object` `clone()` Returns a clone of the object.
`void` `ensureAtLeast(AxisSpace space)` Ensures that this object reserves at least as much space as another.
`void` `ensureAtLeast(double space, org.jfree.ui.RectangleEdge edge)` Ensures there is a minimum amount of space at the edge corresponding to the specified axis location.
`boolean` `equals(java.lang.Object object)` Tests this object for equality with another object.
`java.awt.geom.Rectangle2D` `expand(java.awt.geom.Rectangle2D area, java.awt.geom.Rectangle2D result)` Expands an area by the amount of space represented by this object.
`double` `getBottom()` Returns the bottom space.
`double` `getLeft()` Returns the left space.
`double` `getRight()` Returns the right space.
`double` `getTop()` Returns the top space.
`java.awt.geom.Rectangle2D` `reserved(java.awt.geom.Rectangle2D area, org.jfree.ui.RectangleEdge edge)` Calculates the reserved area.
`void` `setBottom(double space)` Sets the bottom space.
`void` `setLeft(double space)` Sets the left space.
`void` `setRight(double space)` Sets the right space.
`void` `setTop(double space)` Sets the top space.
`java.awt.geom.Rectangle2D` `shrink(java.awt.geom.Rectangle2D area, java.awt.geom.Rectangle2D result)` Shrinks an area by the space attributes.
`java.awt.geom.Rectangle2D` `shrinkLeftAndRight(java.awt.geom.Rectangle2D area, java.awt.geom.Rectangle2D result)` Deprecated. This method is no longer required.
`java.awt.geom.Rectangle2D` `shrinkTopAndBottom(java.awt.geom.Rectangle2D area, java.awt.geom.Rectangle2D result)` Deprecated. This method is no longer required.
`java.lang.String` `toString()` Returns a string representing the object (for debugging purposes).

Methods inherited from class java.lang.Object
`finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### AxisSpace

    public AxisSpace()

  Creates a new axis space record.

Method Detail

### getTop

    public double getTop()

  Returns the top space.

  Returns:
    The top space.

### setTop

    public void setTop(double space)

  Sets the top space.

  Parameters:
    `space` - the space.

### getBottom

    public double getBottom()

  Returns the bottom space.

  Returns:
    The bottom space.

### setBottom

    public void setBottom(double space)

  Sets the bottom space.

  Parameters:
    `space` - the space.

### getLeft

    public double getLeft()

  Returns the left space.

  Returns:
    The left space.

### setLeft

    public void setLeft(double space)

  Sets the left space.

  Parameters:
    `space` - the space.

### getRight

    public double getRight()

  Returns the right space.

  Returns:
    The right space.

### setRight

    public void setRight(double space)

  Sets the right space.

  Parameters:
    `space` - the space.

### add

    public void add(double space,
                    org.jfree.ui.RectangleEdge edge)

  Adds some space to the edge corresponding to the specified axis location.

  Parameters:
    `space` - the space.
    `edge` - the location.

### ensureAtLeast

    public void ensureAtLeast(AxisSpace space)

  Ensures that this object reserves at least as much space as another.

  Parameters:
    `space` - the other space.

### ensureAtLeast

    public void ensureAtLeast(double space,
                              org.jfree.ui.RectangleEdge edge)

  Ensures there is a minimum amount of space at the edge corresponding to the specified axis location.

  Parameters:
    `space` - the space.
    `edge` - the location.

### shrink

    public java.awt.geom.Rectangle2D shrink(java.awt.geom.Rectangle2D area,
                                            java.awt.geom.Rectangle2D result)

  Shrinks an area by the space attributes.

  Parameters:
    `area` - the area to shrink.
    `result` - an optional carrier for the result.
  Returns:
    The result.

### shrinkLeftAndRight

    public java.awt.geom.Rectangle2D shrinkLeftAndRight(java.awt.geom.Rectangle2D area,
                                                        java.awt.geom.Rectangle2D result)

  Deprecated. This method is no longer required.

  Shrinks an area's left and right edges by the amount of this objects left and right settings.

  Parameters:
    `area` - the area to shrink.
    `result` - an optional carrier for the result.
  Returns:
    the result.

### shrinkTopAndBottom

    public java.awt.geom.Rectangle2D shrinkTopAndBottom(java.awt.geom.Rectangle2D area,
                                                        java.awt.geom.Rectangle2D result)

  Deprecated. This method is no longer required.

  Shrinks an area's top and bottom edges by the amount of this objects top and bottom settings.

  Parameters:
    `area` - the area to shrink.
    `result` - an optional carrier for the result.
  Returns:
    the result.

### expand

    public java.awt.geom.Rectangle2D expand(java.awt.geom.Rectangle2D area,
                                            java.awt.geom.Rectangle2D result)

  Expands an area by the amount of space represented by this object.

  Parameters:
    `area` - the area to expand.
    `result` - an optional carrier for the result.
  Returns:
    The result.

### reserved

    public java.awt.geom.Rectangle2D reserved(java.awt.geom.Rectangle2D area,
                                              org.jfree.ui.RectangleEdge edge)

  Calculates the reserved area.

  Parameters:
    `area` - the area.
    `edge` - the edge.
  Returns:
    The reserved area.

### clone

    public java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Returns a clone of the object.

  Specified by:
    `clone` in interface `org.jfree.util.PublicCloneable`
  Returns:
    A clone.
  Throws:
    `java.lang.CloneNotSupportedException` - This class won't throw this exception, but subclasses (if any) might.

### equals

    public boolean equals(java.lang.Object object)

  Tests this object for equality with another object.

  Parameters:
    `object` - the object to compare against.
  Returns:
    `true` or `false`.

### toString

    public java.lang.String toString()

  Returns a string representing the object (for debugging purposes).

  Returns:
    a string.