Java Statistical Classes

jsc.swt.virtualgraphics
Class VDimension

java.lang.Object
  |
  +--java.awt.geom.Dimension2D
        |
        +--jsc.swt.virtualgraphics.VDimension
All Implemented Interfaces:
Cloneable

public class VDimension
extends Dimension2D

This class represents a dimension (width and height) in a virtual coordinate system.

Version:
1.0
Author:
A. J. Bertie.

Field Summary
 double height
          Height of dimension.
 double width
          Width of dimension.
 
Constructor Summary
VDimension(double width, double height)
          Creates a virtual dimension from given width and height.
 
Method Summary
 double getHeight()
          Returns the height of the dimension.
 double getWidth()
          Returns the width of the dimension.
 VDimension multiply(double s)
          Returns the result of multiplying this dimension by a scalar quantity.
 void setSize(double width, double height)
          Sets the size of the dimension to the given width and height.
 String toString()
           
 
Methods inherited from class java.awt.geom.Dimension2D
clone, setSize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

public double width
Width of dimension. That is, displacement along x axis.


height

public double height
Height of dimension. That is, displacement along y axis.

Constructor Detail

VDimension

public VDimension(double width,
                  double height)
Creates a virtual dimension from given width and height.

Parameters:
width - the virtual width.
height - the virtual height.
Method Detail

getHeight

public double getHeight()
Returns the height of the dimension.

Specified by:
getHeight in class Dimension2D
Returns:
the height of the dimension.

getWidth

public double getWidth()
Returns the width of the dimension.

Specified by:
getWidth in class Dimension2D
Returns:
the width of the dimension.

multiply

public VDimension multiply(double s)
Returns the result of multiplying this dimension by a scalar quantity.

Parameters:
s - the scalar quantity.
Returns:
this dimension multiplied by z.

setSize

public void setSize(double width,
                    double height)
Sets the size of the dimension to the given width and height.

Specified by:
setSize in class Dimension2D
Parameters:
width - the virtual width.
height - the virtual height.

toString

public String toString()
Overrides:
toString in class Object

Java Statistical Classes

Copyright © Andrew James Bertie, 2005, all rights reserved. Updated 12th Aug 2005