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.

描述坐标轴在绘图区域上下左右四个方向所占的空间

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()
          创建新的对象,上下左右空间都为0.
 
Method Summary
 void add(double space, RectangleEdge edge)
          增加某侧的空间大小.
 java.lang.Object clone()
          克隆本对象.
 boolean equals(java.lang.Object obj)
          测试两个对象是否相等
 double getBottom()
          返回底端空间大小.
 double getLeft()
          返回左侧空间大小.
 double getRight()
          返回右侧空间大小.
 double getTop()
          返回顶端空间大小.
 int hashCode()
          计算hashcode值.
 void setBottom(double space)
          设置底端空间大小.
 void setLeft(double space)
          设置左侧空间大小.
 void setRight(double space)
          设置右侧空间大小.
 void setTop(double space)
          设置顶端空间大小.
 java.lang.String toString()
          覆盖toString方法.
 void trim(java.awt.geom.Rectangle2D area)
          用本对象去缩小矩形区域area.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AxisSpace

public AxisSpace()
创建新的对象,上下左右空间都为0.

Method Detail

getTop

public double getTop()
返回顶端空间大小.

Returns:
顶端空间大小.

setTop

public void setTop(double space)
设置顶端空间大小.

Parameters:
space - 顶端空间大小.

getBottom

public double getBottom()
返回底端空间大小.

Returns:
底端空间大小.

setBottom

public void setBottom(double space)
设置底端空间大小.

Parameters:
space - 底端空间大小.

getLeft

public double getLeft()
返回左侧空间大小.

Returns:
左侧空间大小.

setLeft

public void setLeft(double space)
设置左侧空间大小.

Parameters:
space - 左侧空间大小.

getRight

public double getRight()
返回右侧空间大小.

Returns:
右侧空间大小.

setRight

public void setRight(double space)
设置右侧空间大小.

Parameters:
space - 右侧空间大小.

add

public void add(double space,
                RectangleEdge edge)
增加某侧的空间大小.

Parameters:
space - 空间大小.
edge - 某个边界 (不可为null).

trim

public void trim(java.awt.geom.Rectangle2D area)
用本对象去缩小矩形区域area.

Parameters:
area - Rectangle2D 矩形区域 (不可为null).

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
克隆本对象.

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

equals

public boolean equals(java.lang.Object obj)
测试两个对象是否相等

Overrides:
equals in class java.lang.Object
Parameters:
obj - 要比较的对象.
Returns:
true or false.

hashCode

public int hashCode()
计算hashcode值.

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode值.

toString

public java.lang.String toString()
覆盖toString方法.

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