Class Dimension2DImpl

java.lang.Object
java.awt.geom.Dimension2D
org.compiere.print.layout.Dimension2DImpl
All Implemented Interfaces:
Serializable, Cloneable

public class Dimension2DImpl extends Dimension2D implements Serializable
2D Dimension Implementation
Version:
$Id: Dimension2DImpl.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
Author:
Jorg Janke
See Also:
  • Field Details

    • width

      public double width
      Width
    • height

      public double height
      Height
  • Constructor Details

    • Dimension2DImpl

      public Dimension2DImpl()
      Constructor 0/0
    • Dimension2DImpl

      public Dimension2DImpl(Dimension dim)
      Constructor 0/0
      Parameters:
      dim - dimension
    • Dimension2DImpl

      public Dimension2DImpl(double Width, double Height)
      Constructor 0/0
      Parameters:
      Width - width
      Height - height
  • Method Details

    • setSize

      public void setSize(double Width, double Height)
      Set Size
      Specified by:
      setSize in class Dimension2D
      Parameters:
      Width - width
      Height - height
    • setSize

      public void setSize(Dimension dim)
      Set Size
      Parameters:
      dim - dimension
    • addBelow

      public void addBelow(double dWidth, double dHeight)
      Add Size below existing
      Parameters:
      dWidth - width to increase if below
      dHeight - height to add
    • addBelow

      public void addBelow(Dimension dim)
      Add Size below existing
      Parameters:
      dim - add dimension
    • roundUp

      public void roundUp()
      Round to next Int value
    • getWidth

      public double getWidth()
      Get Width
      Specified by:
      getWidth in class Dimension2D
      Returns:
      width
    • getHeight

      public double getHeight()
      Get Height
      Specified by:
      getHeight in class Dimension2D
      Returns:
      height
    • hashCode

      public int hashCode()
      Hash Code
      Overrides:
      hashCode in class Object
      Returns:
      hash code
    • equals

      public boolean equals(Object obj)
      Equals
      Overrides:
      equals in class Object
      Parameters:
      obj - object
      Returns:
      true if w/h is same
    • toString

      public String toString()
      String Representation
      Overrides:
      toString in class Object
      Returns:
      info