java.lang.Object
org.jfree.chart.axis.AxisSpace
- All Implemented Interfaces:
Serializable
,Cloneable
,PublicCloneable
A record that contains the space required at each edge of a plot.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(double space, RectangleEdge edge) Adds space to the top, bottom, left or right edge of the plot area.clone()
Returns a clone of the object.void
ensureAtLeast
(double space, RectangleEdge edge) Ensures there is a minimum amount of space at the edge corresponding to the specified axis location.void
ensureAtLeast
(AxisSpace space) Ensures that this object reserves at least as much space as another.boolean
Tests this object for equality with another object.expand
(Rectangle2D area, Rectangle2D result) Expands an area by the amount of space represented by this object.double
Returns the space reserved for axes at the bottom of the plot area.double
getLeft()
Returns the space reserved for axes at the left of the plot area.double
getRight()
Returns the space reserved for axes at the right of the plot area.double
getTop()
Returns the space reserved for axes at the top of the plot area.int
hashCode()
Returns a hash code for this object.reserved
(Rectangle2D area, RectangleEdge edge) Calculates the reserved area.void
setBottom
(double space) Sets the space reserved for axes at the bottom of the plot area.void
setLeft
(double space) Sets the space reserved for axes at the left of the plot area.void
setRight
(double space) Sets the space reserved for axes at the right of the plot area.void
setTop
(double space) Sets the space reserved for axes at the top of the plot area.shrink
(Rectangle2D area, Rectangle2D result) Shrinks an area by the space attributes.toString()
Returns a string representing the object (for debugging purposes).
-
Constructor Details
-
AxisSpace
public AxisSpace()Creates a new axis space record.
-
-
Method Details
-
getTop
public double getTop()Returns the space reserved for axes at the top of the plot area.- Returns:
- The space (in Java2D units).
-
setTop
public void setTop(double space) Sets the space reserved for axes at the top of the plot area.- Parameters:
space
- the space (in Java2D units).
-
getBottom
public double getBottom()Returns the space reserved for axes at the bottom of the plot area.- Returns:
- The space (in Java2D units).
-
setBottom
public void setBottom(double space) Sets the space reserved for axes at the bottom of the plot area.- Parameters:
space
- the space (in Java2D units).
-
getLeft
public double getLeft()Returns the space reserved for axes at the left of the plot area.- Returns:
- The space (in Java2D units).
-
setLeft
public void setLeft(double space) Sets the space reserved for axes at the left of the plot area.- Parameters:
space
- the space (in Java2D units).
-
getRight
public double getRight()Returns the space reserved for axes at the right of the plot area.- Returns:
- The space (in Java2D units).
-
setRight
public void setRight(double space) Sets the space reserved for axes at the right of the plot area.- Parameters:
space
- the space (in Java2D units).
-
add
Adds space to the top, bottom, left or right edge of the plot area.- Parameters:
space
- the space (in Java2D units).edge
- the edge (null
not permitted).
-
ensureAtLeast
Ensures that this object reserves at least as much space as another.- Parameters:
space
- the other space.
-
ensureAtLeast
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
Shrinks an area by the space attributes.- Parameters:
area
- the area to shrink.result
- an optional carrier for the result.- Returns:
- The result.
-
expand
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
Calculates the reserved area.- Parameters:
area
- the area.edge
- the edge.- Returns:
- The reserved area.
-
clone
Returns a clone of the object.- Specified by:
clone
in interfacePublicCloneable
- Overrides:
clone
in classObject
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- This class won't throw this exception, but subclasses (if any) might.
-
equals
Tests this object for equality with another object. -
hashCode
public int hashCode()Returns a hash code for this object. -
toString
Returns a string representing the object (for debugging purposes).
-