org.opengts.util
Class PixelDimension

java.lang.Object
  extended by org.opengts.util.PixelDimension
All Implemented Interfaces:
java.lang.Cloneable

public class PixelDimension
extends java.lang.Object
implements java.lang.Cloneable

A container for pixel width and height


Constructor Summary
PixelDimension(int w, int h)
          Constructor
PixelDimension(PixelDimension pd)
          Copy constructor
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this PixelDimension
 int getHeight()
          Gets the height of the pixel
 int getWidth()
          Gets the width of the pixel
 boolean isValid()
          Returns ture if the pixel dimensions are valid
 void setHeight(int h)
          Sets the height of the pixel
 void setWidth(int w)
          Sets the witdh of the pixel
 java.lang.String toString()
          Returns a String representation of this instance
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PixelDimension

public PixelDimension(int w,
                      int h)
Constructor

Parameters:
w - The width of the pixel
h - The height of the pixel

PixelDimension

public PixelDimension(PixelDimension pd)
Copy constructor

Parameters:
pd - The PixelDimension to copy
Method Detail

clone

public java.lang.Object clone()
Returns a copy of this PixelDimension

Overrides:
clone in class java.lang.Object
Returns:
A copy of this PixelDimension object

setWidth

public void setWidth(int w)
Sets the witdh of the pixel

Parameters:
w - The width of the pixel

getWidth

public int getWidth()
Gets the width of the pixel

Returns:
The width of the pixel

setHeight

public void setHeight(int h)
Sets the height of the pixel

Parameters:
h - The height of the pixel

getHeight

public int getHeight()
Gets the height of the pixel

Returns:
The height of the pixel

isValid

public boolean isValid()
Returns ture if the pixel dimensions are valid

Returns:
True if the pixel dimensions are valid

toString

public java.lang.String toString()
Returns a String representation of this instance

Overrides:
toString in class java.lang.Object
Returns:
String representation of this instance