Style Intelligence v12.0

inetsoft.report
Class Size

java.lang.Object
  extended by inetsoft.report.Size
All Implemented Interfaces:
Serializable

public class Size
extends Object
implements Serializable

This defines a size in inches.

See Also:
Serialized Form

Field Summary
 float height
          Height in inches.
 float width
          Width in inches.
 
Constructor Summary
Size()
          Create a zero size.
Size(Dimension d)
          Create a size from a dimension object.
Size(double w, double h)
          Create a Size of specified dimension.
Size(float w, float h)
          Create a Size of specified dimension.
Size(int w, int h, int res)
          Create a size.
Size(Size d)
          Create a size from a size object.
 
Method Summary
 boolean equals(Object obj)
           
 Dimension getDimension()
          Get a dimension object in integers.
 Size rotate()
          Get the size if the area is rotated (landscape mode).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

public float width
Width in inches.


height

public float height
Height in inches.

Constructor Detail

Size

public Size()
Create a zero size.


Size

public Size(float w,
            float h)
Create a Size of specified dimension.

Parameters:
w - width in inches.
h - height in inches.

Size

public Size(double w,
            double h)
Create a Size of specified dimension.

Parameters:
w - width in inches.
h - height in inches.

Size

public Size(Dimension d)
Create a size from a dimension object. No resolution conversion is done.


Size

public Size(Size d)
Create a size from a size object.


Size

public Size(int w,
            int h,
            int res)
Create a size. The sizes are converted to inches using the pixel size and resolution.

Parameters:
w - width in pixels.
h - height in pixels.
res - resolution.
Method Detail

rotate

public Size rotate()
Get the size if the area is rotated (landscape mode).

Returns:
a new Size object with width and height switched.

getDimension

public Dimension getDimension()
Get a dimension object in integers.


toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.