|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.ui.RectangleInsets
public class RectangleInsets
Title: IJChart
Description: a chart library for the Java(tm) platform.
表示长方形里的嵌入物,指定长度是绝对值还是相对值(百分比).本类是不可在外部改变的.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static RectangleInsets |
INSETS_ONE
顶部、左边、底部、右边都为1的RectangleInsets. |
static RectangleInsets |
INSETS_THREE
顶部、左边、底部、右边都为3的RectangleInsets. |
static RectangleInsets |
INSETS_TWO
顶部、左边、底部、右边都为2的RectangleInsets. |
static RectangleInsets |
INSETS_ZERO
顶部、左边、底部、右边都为零的RectangleInsets. |
Constructor Summary | |
---|---|
RectangleInsets(double top,
double left,
double bottom,
double right)
构造器,长度类型为绝对值. |
|
RectangleInsets(UnitType unitType,
double top,
double left,
double bottom,
double right)
用指定的UnitType构造对象. |
Method Summary | |
---|---|
double |
calculateBottomInset(double height)
Returns the bottom margin. |
double |
calculateBottomOutset(double height)
Returns the bottom margin. |
double |
calculateLeftInset(double width)
Returns the left margin. |
double |
calculateLeftOutset(double width)
Returns the left margin. |
double |
calculateRightInset(double width)
Returns the right margin. |
double |
calculateRightOutset(double width)
Returns the right margin. |
double |
calculateTopInset(double height)
返回顶端空白. |
double |
calculateTopOutset(double height)
Returns the top margin. |
java.awt.geom.Rectangle2D |
createAdjustedRectangle(java.awt.geom.Rectangle2D base,
LengthAdjustmentType horizontal,
LengthAdjustmentType vertical)
根据本对象及水平和垂直两个方向的长度调整类型计算新的矩形. |
java.awt.geom.Rectangle2D |
createInsetRectangle(java.awt.geom.Rectangle2D base)
创建一个新的矩形对象. |
java.awt.geom.Rectangle2D |
createInsetRectangle(java.awt.geom.Rectangle2D base,
boolean horizontal,
boolean vertical)
创建一个新的矩形对象. |
java.awt.geom.Rectangle2D |
createOutsetRectangle(java.awt.geom.Rectangle2D base)
创建一个新的矩形对象. |
java.awt.geom.Rectangle2D |
createOutsetRectangle(java.awt.geom.Rectangle2D base,
boolean horizontal,
boolean vertical)
创建一个新的矩形对象. |
RectangleInsets |
ensureAtLeast(double len)
如果本对象的某个边界的长度小于len,则扩大至len. |
boolean |
equals(java.lang.Object obj)
覆盖equals方法. |
void |
expandRect(java.awt.geom.Rectangle2D rect)
扩展矩形的宽度和高度. |
void |
expandRectHeight(java.awt.geom.Rectangle2D rect)
扩展矩形的高度. |
void |
expandRectWidth(java.awt.geom.Rectangle2D rect)
扩展矩形的宽度. |
double |
extendHeight(double height)
Extends the given height to allow for the insets. |
double |
extendWidth(double width)
Extends the given width to allow for the insets. |
double |
getBottom()
返回底部长度. |
double |
getLeft()
返回左边长度. |
double |
getRight()
返回右边长度. |
double |
getTop()
返回顶部长度. |
java.awt.geom.Rectangle2D |
getTrimArea(java.awt.geom.Rectangle2D area)
返回area去掉空白后的图形. |
UnitType |
getUnitType()
长度单位类型,绝对值或相对值(百分比). |
int |
hashCode()
覆盖hasCode方法,返回hascode值. |
java.lang.String |
toString()
覆盖toString方法. |
void |
trim(java.awt.geom.Rectangle2D area)
把area的空白去掉. |
double |
trimHeight(double height)
Trims the given height to allow for the insets. |
double |
trimWidth(double width)
Trims the given width to allow for the insets. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final RectangleInsets INSETS_ZERO
public static final RectangleInsets INSETS_ONE
public static final RectangleInsets INSETS_TWO
public static final RectangleInsets INSETS_THREE
Constructor Detail |
---|
public RectangleInsets(double top, double left, double bottom, double right)
top
- 顶部长度.
left
- 左边长度.
bottom
- 底部长度. right
- 右边长度. public RectangleInsets(UnitType unitType, double top, double left, double bottom, double right)
unitType
- 长度值类型.
top
- 顶部长度.
left
- 左边长度.
bottom
- 底部长度.
right
- 右边长度.
Method Detail |
---|
public UnitType getUnitType()
public double getTop()
public double getBottom()
public double getLeft()
public double getRight()
public java.awt.geom.Rectangle2D createAdjustedRectangle(java.awt.geom.Rectangle2D base, LengthAdjustmentType horizontal, LengthAdjustmentType vertical)
base
- 要调整的矩形.
horizontal
- 水平方向的长度调整类型 (不可为null).
vertical
- 垂直方向的长度调整类型.
public java.awt.geom.Rectangle2D createInsetRectangle(java.awt.geom.Rectangle2D base)
base
- 创建新的矩形对象的基础矩形 (不可为null).
public java.awt.geom.Rectangle2D createInsetRectangle(java.awt.geom.Rectangle2D base, boolean horizontal, boolean vertical)
base
- 创建新的矩形对象的基础矩形 (不可为null).
horizontal
- 是否应用水平方向insert.
vertical
- 是否应用垂直方向insert.
public java.awt.geom.Rectangle2D createOutsetRectangle(java.awt.geom.Rectangle2D base)
base
- 创建新的矩形对象的基础矩形 (不可为null).
public java.awt.geom.Rectangle2D createOutsetRectangle(java.awt.geom.Rectangle2D base, boolean horizontal, boolean vertical)
base
- 创建新的矩形对象的基础矩形 (不可为null).
horizontal
- 是否应用水平方向insert.
vertical
- 是否应用垂直方向insert.
public double calculateTopInset(double height)
height
- 基础矩形的调度.
public double calculateTopOutset(double height)
height
- the height of the base rectangle.
public double calculateBottomInset(double height)
height
- the height of the base rectangle.
public double calculateBottomOutset(double height)
height
- the height of the base rectangle.
public double calculateLeftInset(double width)
width
- the width of the base rectangle.
public double calculateLeftOutset(double width)
width
- the width of the base rectangle.
public double calculateRightInset(double width)
width
- the width of the base rectangle.
public double calculateRightOutset(double width)
width
- the width of the base rectangle.
public double trimWidth(double width)
width
- the width.
public double extendWidth(double width)
width
- the width.
public double trimHeight(double height)
height
- the height.
public double extendHeight(double height)
height
- the height.
public void expandRectHeight(java.awt.geom.Rectangle2D rect)
rect
- Rectangle2D 要扩展的矩形 (不可为null).
public void expandRectWidth(java.awt.geom.Rectangle2D rect)
rect
- Rectangle2D 要扩展的矩形 (不可为null).
public void expandRect(java.awt.geom.Rectangle2D rect)
rect
- Rectangle2D 要扩展的矩形 (不可为null).
public void trim(java.awt.geom.Rectangle2D area)
area
- Rectangle2D 矩形 (不可为null).
public java.awt.geom.Rectangle2D getTrimArea(java.awt.geom.Rectangle2D area)
area
- Rectangle2D 要处理的矩形 (不可为null).
public RectangleInsets ensureAtLeast(double len)
len
- double 长度,必须大于等于0.
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- 要比较的对象.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |