org.mmbase.util.images
Class Dimension

java.lang.Object
  extended by org.mmbase.util.images.Dimension
Direct Known Subclasses:
LazyDimension

public class Dimension
extends Object

Represents the `dimension' of an image, i.e. its height and width.

Since:
MMBase-1.7.4
Author:
Michiel Meeuwissen

Field Summary
static Dimension UNDETERMINED
           
protected  int x
           
protected  int y
           
 
Constructor Summary
protected Dimension()
           
  Dimension(Dimension dim)
           
  Dimension(int x, int y)
           
 
Method Summary
 boolean equals(Object o)
           
 boolean equalsIgnoreRound(Dimension dim, int offset)
           
 int getArea()
           
 int getHeight()
           
 int getWidth()
           
 int hashCode()
           
 String toString()
           
 boolean valid()
          Returns true of both x and y > 0.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

UNDETERMINED

public static final Dimension UNDETERMINED

x

protected int x

y

protected int y
Constructor Detail

Dimension

protected Dimension()

Dimension

public Dimension(int x,
                 int y)

Dimension

public Dimension(Dimension dim)
Method Detail

getWidth

public int getWidth()

getHeight

public int getHeight()

getArea

public int getArea()

toString

public String toString()
Overrides:
toString in class Object

equalsIgnoreRound

public boolean equalsIgnoreRound(Dimension dim,
                                 int offset)

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

valid

public boolean valid()
Returns true of both x and y > 0.

Since:
MMBase-1.8.1


MMBase 2.0-SNAPSHOT - null