org.archive.wayback.util.graph
Class RectangularGraphElement

java.lang.Object
  extended by org.archive.wayback.util.graph.RectangularGraphElement
All Implemented Interfaces:
GraphElement
Direct Known Subclasses:
Graph, RegionGraphElement, ValueGraphElement, ValueGraphElements

public abstract class RectangularGraphElement
extends Object
implements GraphElement

A GraphElement which allows interrogation of it's bounding java.awt.Rectangle

Author:
brad

Field Summary
protected  int height
           
protected  int width
           
protected  int x
           
protected  int y
           
 
Constructor Summary
RectangularGraphElement(int x, int y, int width, int height)
          Construct a new RectangularGraphElement with the supplied values
 
Method Summary
 Rectangle getBoundingRectangle()
           
 int getHeight()
           
 int getWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.archive.wayback.util.graph.GraphElement
draw
 

Field Detail

x

protected int x

y

protected int y

width

protected int width

height

protected int height
Constructor Detail

RectangularGraphElement

public RectangularGraphElement(int x,
                               int y,
                               int width,
                               int height)
Construct a new RectangularGraphElement with the supplied values

Parameters:
x - the rectangles x in the global coordinate space
y - the rectangles y in the global coordinate space
width - the rectangles width
height - the rectangles height
Method Detail

getWidth

public int getWidth()
Returns:
the width

getHeight

public int getHeight()
Returns:
the height

getBoundingRectangle

public Rectangle getBoundingRectangle()
Returns:
the java.awt.Rectangle which bounds this GraphElement, in the coordinate space of the Graph which contains it.


Copyright © 2005-2011 Internet Archive. All Rights Reserved.