edu.cmu.sun.controller
Class ItemController

java.lang.Object
  extended by edu.cmu.sun.controller.ItemController

public class ItemController
extends java.lang.Object

A controller object for items in lists. Every time a list item is clicked on, an instance of this component is called to handle the event. Right now, we only look at left and right clicks.

Author:
Braden Kowitz, Jessica Smith

Field Summary
(package private)  ItemModel model
           
 
Constructor Summary
ItemController(ItemModel model)
           
 
Method Summary
 void leftClick()
          A left click causes the list item to be selected, and all of the sibling items to be deslected.
 void rightClick()
          A right click causes the list itme to be selected.
private  void updateChildWindows()
          When an item is selected/deselected, we must create/remove windows from the next column to the right.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

ItemModel model
Constructor Detail

ItemController

public ItemController(ItemModel model)
Method Detail

leftClick

public void leftClick()
A left click causes the list item to be selected, and all of the sibling items to be deslected. If the item is already selected, the controller just deselects the items.


rightClick

public void rightClick()
A right click causes the list itme to be selected. All siblings retain their selection state. If the item is already selected, the controller just deselects the items.


updateChildWindows

private void updateChildWindows()
When an item is selected/deselected, we must create/remove windows from the next column to the right. This call just passes the responsibility for this update to teh Model.