Top Description Fields Constructors Methods
org.apache.poi.sl.usermodel

public final Class Insets2D

extends Object
implements Duplicatable
Class Inheritance
All Implemented Interfaces
org.apache.poi.common.Duplicatable
Imports
org.apache.poi.common.Duplicatable

This is a replacement for java.awt.Insets which works on doubles instead of ints

Field Summary

Modifier and TypeField and Description
public double
bottom

The inset from the bottom.

public double
left

The inset from the left.

public double
right

The inset from the right.

public double
top

The inset from the top.

Constructor Summary

AccessConstructor and Description
public
Insets2D(double
the inset from the top.
top
,
double
the inset from the left.
left
,
double
the inset from the bottom.
bottom
,
double
the inset from the right.
right
)

Creates and initializes a new Insets object with the specified top, left, bottom, and right insets.

Method Summary

Modifier and TypeMethod and Description
public Insets2D

Returns:

a copy of this Insets2D object.
copy
()

Implements org.apache.poi.common.Duplicatable.copy.

Create a copy of this object.

public boolean

Returns:

true if the two insets are equal; otherwise false.
equals
(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Checks whether two insets objects are equal.

public int

Returns:

a hash code for this Insets.
hashCode
()

Overrides java.lang.Object.hashCode.

Returns the hash code for this Insets.

public void
set(double
the inset from the top.
top
,
double
the inset from the left.
left
,
double
the inset from the bottom.
bottom
,
double
the inset from the right.
right
)

Set top, left, bottom, and right to the specified values

public String

Returns:

a string representation of this Insets object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this Insets object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

bottomback to summary
public double bottom

The inset from the bottom. This value is subtracted from the Bottom of the rectangle to yield a new location for the Bottom.

leftback to summary
public double left

The inset from the left. This value is added to the Left of the rectangle to yield a new location for the Left edge.

topback to summary
public double top

The inset from the top. This value is added to the Top of the rectangle to yield a new location for the Top.

Constructor Detail

Insets2Dback to summary
public Insets2D(double top, double left, double bottom, double right)

Creates and initializes a new Insets object with the specified top, left, bottom, and right insets.

Parameters
top:double

the inset from the top.

left:double

the inset from the left.

bottom:double

the inset from the bottom.

right:double

the inset from the right.

Method Detail

copyback to summary
public Insets2D copy()

Implements org.apache.poi.common.Duplicatable.copy.

Create a copy of this object.

Returns:Insets2D

a copy of this Insets2D object.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Checks whether two insets objects are equal. Two instances of Insets are equal if the four integer values of the fields top, left, bottom, and right are all equal.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

true if the two insets are equal; otherwise false.

Since
JDK1.1
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns the hash code for this Insets.

Returns:int

a hash code for this Insets.

setback to summary
public void set(double top, double left, double bottom, double right)

Set top, left, bottom, and right to the specified values

Parameters
top:double

the inset from the top.

left:double

the inset from the left.

bottom:double

the inset from the bottom.

right:double

the inset from the right.

Since
1.5
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this Insets object. This method is intended to be used only for debugging purposes, and the content and format of the returned string may vary between implementations. The returned string may be empty but may not be null.

Returns:String

a string representation of this Insets object.