uk.ac.ed.ph.signal
Class Diagram2D

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<Diagram2DComponent>
              extended by uk.ac.ed.ph.signal.Diagram2D
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Diagram2DComponent>, Collection<Diagram2DComponent>, List<Diagram2DComponent>, RandomAccess, Diagram2DComponent

public class Diagram2D
extends Vector<Diagram2DComponent>
implements Diagram2DComponent

Class to Hold a Vector of Diagram2DComponents in the vector.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Diagram2D()
          Default constrcuor to form a blank Compound
 
Method Summary
 void addComponent(Diagram2DComponent comp)
          Method to add a DiagramComponent to the current Diagram
 void clear()
           
 void draw(Graphics2D g)
          Method to graw the Compound object
 Rectangle2D getBounds()
          Method to bet the bounds
 void setBounds(double x, double y, double w, double h)
          Method to set the Bound to specifed value
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Diagram2D

public Diagram2D()
Default constrcuor to form a blank Compound

Method Detail

addComponent

public void addComponent(Diagram2DComponent comp)
Method to add a DiagramComponent to the current Diagram

Parameters:
comp - the component

clear

public void clear()
Specified by:
clear in interface Collection<Diagram2DComponent>
Specified by:
clear in interface List<Diagram2DComponent>
Overrides:
clear in class Vector<Diagram2DComponent>

getBounds

public Rectangle2D getBounds()
Method to bet the bounds

Specified by:
getBounds in interface Diagram2DComponent
Returns:
Rectangle the bounds

setBounds

public void setBounds(double x,
                      double y,
                      double w,
                      double h)
Method to set the Bound to specifed value

Parameters:
x - x location of rectangle
y - y location of rectange
w - width
h - height
See Also:
Rectangle2D.setRect

draw

public void draw(Graphics2D g)
Method to graw the Compound object

Specified by:
draw in interface Diagram2DComponent
Parameters:
g - the Graphics2D context