ls
Class Item

java.lang.Object
  |
  +--ls.Item

public class Item
extends java.lang.Object

This class is responsible for keeping track of the node and the corresponding graphical representation of the node.


Constructor Summary
Item()
          Creates a new item with no associated Block or Ellipse2D.Double
Item(Block b, java.awt.geom.Ellipse2D.Double e)
          Creates a new item with a specific Block and Ellipse2D.Double
 
Method Summary
 void deleteChild(Item item)
          Deletes a specific Item from the child list.
 void deleteParent(Item item)
          Deletes a specific Item from the parent list.
 Item getChild(int i)
          Gets a specific child associated with this Item
 java.util.Vector getChildren()
           
 java.awt.geom.Ellipse2D.Double getEllipse()
          Returns the Ellipse2D.Double associated with this item
 Block getItem()
          Gets the node corresponding to this item
 Item getParent(int i)
          Gets a specific parent associated with this Item
 java.util.Vector getParents()
           
 int numChild()
          Returns the number of children this particular Item has.
 int numParents()
          Returns the number of parents this particular Item has.
 void print()
           
 void setChild(Item i)
          Associates the Item with a new child.
 void setParent(Item i)
          Associates the Item with a new parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Item

public Item()
Creates a new item with no associated Block or Ellipse2D.Double

Item

public Item(Block b,
            java.awt.geom.Ellipse2D.Double e)
Creates a new item with a specific Block and Ellipse2D.Double
Parameters:
b - the Block that is being added to the editor
e - the Ellipse2D.Double corresponding to that Block
Method Detail

getItem

public Block getItem()
Gets the node corresponding to this item
Returns:
Block - b

getEllipse

public java.awt.geom.Ellipse2D.Double getEllipse()
Returns the Ellipse2D.Double associated with this item
Returns:
Ellipse2D.Double - e

getParent

public Item getParent(int i)
Gets a specific parent associated with this Item
Parameters:
i - the location of the parent
Returns:
Item

getParents

public java.util.Vector getParents()

setParent

public void setParent(Item i)
Associates the Item with a new parent.
Parameters:
i - the Item to add onto the parent list

numParents

public int numParents()
Returns the number of parents this particular Item has.
Returns:
int

deleteParent

public void deleteParent(Item item)
Deletes a specific Item from the parent list.

getChild

public Item getChild(int i)
Gets a specific child associated with this Item
Parameters:
i - the location of the child
Returns:
Item

getChildren

public java.util.Vector getChildren()

setChild

public void setChild(Item i)
Associates the Item with a new child.
Parameters:
i - the Item to add onto the child list

numChild

public int numChild()
Returns the number of children this particular Item has.
Returns:
int

deleteChild

public void deleteChild(Item item)
Deletes a specific Item from the child list.

print

public void print()