com.ijchart.xychart.axis
Class AxisSpace

java.lang.Object
  extended by com.ijchart.xychart.axis.AxisSpace
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class AxisSpace
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Title: IJChart

Description: a chart library for the Java(tm) platform.

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

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Constructor Summary
AxisSpace()
           Creates a new axis space record.
 
Method Summary
 void add(double space, RectangleEdge edge)
           Adds space to the top, bottom, left or right edge of the plot area.
 java.lang.Object clone()
           Returns a clone of the object.
 boolean equals(java.lang.Object obj)
           Tests this object for equality with another 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.
 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.
 java.lang.String toString()
           Returns a string representing the object (for debugging purposes).
 void trim(java.awt.geom.Rectangle2D area)
           Shrinks the given rectangle by the amount of these space.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisSpace

public AxisSpace()
Creates a new axis space record.

Method Detail

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

public void add(double space,
                RectangleEdge edge)
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).

trim

public void trim(java.awt.geom.Rectangle2D area)
Shrinks the given rectangle by the amount of these space.

Parameters:
area - Rectangle2D The rectangle area (null not permitted).

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the object.

Overrides:
clone in class java.lang.Object
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException

equals

public boolean equals(java.lang.Object obj)
Tests this object for equality with another object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare against.
Returns:
true or false.

hashCode

public int hashCode()
Returns a hash code for this object.

Overrides:
hashCode in class java.lang.Object
Returns:
A hash code.

toString

public java.lang.String toString()
Returns a string representing the object (for debugging purposes).

Overrides:
toString in class java.lang.Object
Returns:
A string.