JHotDraw 7.0.6

org.jhotdraw.geom
Class Insets2DDouble

java.lang.Object
  extended by org.jhotdraw.geom.Insets2DDouble
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, DOMStorable

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

Insets2DDouble.

See Also:
Serialized Form

Field Summary
 double bottom
          The inset from the bottom.
 double left
          The inset from the left.
 double right
          The inset from the right.
 double top
          The inset from the top.
 
Constructor Summary
Insets2DDouble()
          Creates and initializes a new Insets2DDouble object with the 0 insets.
Insets2DDouble(double top, double left, double bottom, double right)
          Creates and initializes a new Insets2DDouble object with the specified top, left, bottom, and right insets.
 
Method Summary
 java.lang.Object clone()
          Create a copy of this object.
 boolean equals(java.lang.Object obj)
          Checks whether two insets objects are equal.
 int hashCode()
          Returns the hash code for this Insets2DDouble.
 void read(DOMInput in)
           
 java.lang.String toString()
          Returns a string representation of this Insets2DDouble object.
 void write(DOMOutput out)
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

top

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.

See Also:
clone()

left

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.

See Also:
clone()

bottom

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.

See Also:
clone()

right

public double right
The inset from the right. This value is subtracted from the Right of the rectangle to yield a new location for the Right edge.

See Also:
clone()
Constructor Detail

Insets2DDouble

public Insets2DDouble()
Creates and initializes a new Insets2DDouble object with the 0 insets.

This constructor is required by the DOMStorable interface.


Insets2DDouble

public Insets2DDouble(double top,
                      double left,
                      double bottom,
                      double right)
Creates and initializes a new Insets2DDouble object with the specified top, left, bottom, and right insets.

Parameters:
top - the inset from the top.
left - the inset from the left.
bottom - the inset from the bottom.
right - the inset from the right.
Method Detail

equals

public boolean equals(java.lang.Object obj)
Checks whether two insets objects are equal. Two instances of Insets2DDouble are equal if the four integer values of the fields top, left, bottom, and right are all equal.

Overrides:
equals in class java.lang.Object
Returns:
true if the two insets are equal; otherwise false.
Since:
JDK1.1

hashCode

public int hashCode()
Returns the hash code for this Insets2DDouble.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code for this Insets2DDouble.

toString

public java.lang.String toString()
Returns a string representation of this Insets2DDouble 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.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this Insets2DDouble object.

clone

public java.lang.Object clone()
Create a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
a copy of this Insets2DDouble object.

write

public void write(DOMOutput out)
Specified by:
write in interface DOMStorable

read

public void read(DOMInput in)
Specified by:
read in interface DOMStorable

Copyright 1996-2006 © JHotDraw.org