org.jfree.chart.axis
Class AxisSpace
java.lang.Object
org.jfree.chart.axis.AxisSpace
- Cloneable, PublicCloneable, Serializable
extends java.lang.Object
implements Cloneable, PublicCloneable, Serializable
A record that contains the space required at each edge of a plot.
void | add(double space, RectangleEdge edge) - Adds space to the top, bottom, left or right edge of the plot area.
|
Object | 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 | equals(Object obj) - Tests this object for equality with another object.
|
Rectangle2D | expand(Rectangle2D area, Rectangle2D result) - Expands an area by the amount of space represented by this object.
|
double | getBottom() - 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.
|
Rectangle2D | 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.
|
Rectangle2D | shrink(Rectangle2D area, Rectangle2D result) - Shrinks an area by the space attributes.
|
String | toString() - Returns a string representing the object (for debugging purposes).
|
AxisSpace
public AxisSpace()
Creates a new axis space record.
add
public void add(double space,
RectangleEdge edge)
Adds space to the top, bottom, left or right edge of the plot area.
space
- the space (in Java2D units).edge
- the edge (null
not permitted).
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of the object.
ensureAtLeast
public void ensureAtLeast(double space,
RectangleEdge edge)
Ensures there is a minimum amount of space at the edge corresponding to
the specified axis location.
space
- the space.edge
- the location.
ensureAtLeast
public void ensureAtLeast(AxisSpace space)
Ensures that this object reserves at least as much space as another.
equals
public boolean equals(Object obj)
Tests this object for equality with another object.
obj
- the object to compare against.
expand
public Rectangle2D expand(Rectangle2D area,
Rectangle2D result)
Expands an area by the amount of space represented by this object.
area
- the area to expand.result
- an optional carrier for the result.
getBottom
public double getBottom()
Returns the space reserved for axes at the bottom of the plot area.
- The space (in Java2D units).
getLeft
public double getLeft()
Returns the space reserved for axes at the left of the plot area.
- The space (in Java2D units).
getRight
public double getRight()
Returns the space reserved for axes at the right of the plot area.
- The space (in Java2D units).
getTop
public double getTop()
Returns the space reserved for axes at the top of the plot area.
- The space (in Java2D units).
hashCode
public int hashCode()
Returns a hash code for this object.
reserved
public Rectangle2D reserved(Rectangle2D area,
RectangleEdge edge)
Calculates the reserved area.
area
- the area.edge
- the edge.
setBottom
public void setBottom(double space)
Sets the space reserved for axes at the bottom of the plot area.
space
- the space (in Java2D units).
setLeft
public void setLeft(double space)
Sets the space reserved for axes at the left of the plot area.
space
- the space (in Java2D units).
setRight
public void setRight(double space)
Sets the space reserved for axes at the right of the plot area.
space
- the space (in Java2D units).
setTop
public void setTop(double space)
Sets the space reserved for axes at the top of the plot area.
space
- the space (in Java2D units).
shrink
public Rectangle2D shrink(Rectangle2D area,
Rectangle2D result)
Shrinks an area by the space attributes.
area
- the area to shrink.result
- an optional carrier for the result.
toString
public String toString()
Returns a string representing the object (for debugging purposes).