uk.ac.ed.ph.signal
Class Diagram2D
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<Diagram2DComponent>
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
Constructor Summary |
Diagram2D()
Default constrcuor to form a blank Compound |
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 |
Diagram2D
public Diagram2D()
- Default constrcuor to form a blank Compound
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 rectangley
- y location of rectangew
- widthh
- 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