eShopper
Class eShopperClipboard

java.lang.Object
  extended byeShopper.eShopperClipboard

public class eShopperClipboard
extends java.lang.Object

This class allows for copying and pasting within eShopper.

Author:
Adam Goforth

Constructor Summary
eShopperClipboard(eShopperDB db)
          This is the constructor.
 
Method Summary
 void add(eShopperNode newNode)
          This adds an item to the clipboard, to later be retrieved.
 void cut(eShopperList list)
          This takes the currently selected item from the list, and adds it to the clipboard, then removes it from the list.
 eShopperNode getCurrentItem()
          This returns the item currently in the clipboard.
 void paste(eShopperList list)
          This takes the item currently in the clipboard and inserts it into the selected place in the list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

eShopperClipboard

public eShopperClipboard(eShopperDB db)
This is the constructor.

Parameters:
db - The eShopperDB that holds the shopping lists.
Method Detail

getCurrentItem

public eShopperNode getCurrentItem()
This returns the item currently in the clipboard.

Returns:
The item currently in the clipboard.

add

public void add(eShopperNode newNode)
This adds an item to the clipboard, to later be retrieved.

Parameters:
newNode - The item that should be added to the clipboard.

cut

public void cut(eShopperList list)
This takes the currently selected item from the list, and adds it to the clipboard, then removes it from the list.

Parameters:
list - The list from which the item should be taken.

paste

public void paste(eShopperList list)
This takes the item currently in the clipboard and inserts it into the selected place in the list.

Parameters:
list - The list into which the clipboard item should be inserted.