org.nakedobjects.viewer.classic
Class CollectionViewHandler

java.lang.Object
  extended byorg.nakedobjects.viewer.classic.CollectionViewHandler
All Implemented Interfaces:
ViewActionListener

public class CollectionViewHandler
extends java.lang.Object
implements ViewActionListener

A listener of an ObjectViewer that deals with: double-clicks by iconising/expanding the view; drops outside of an other object viewers by creating a new view; and the results of user action by displaying a new view for the new object.


Constructor Summary
CollectionViewHandler()
           
 
Method Summary
 void open(ViewActionEvent evt)
          Toggles the viewer between the default view and the alternative view.
 void showResults(ViewActionEvent evt)
          Creates a new Frame, with the right type of ObjectViewer for the object, to display the new object.
 void vacantDrop(ViewActionEvent evt)
          Creates a new Frame and ObjectViewer for the NakedCollection and places the window under the pointer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionViewHandler

public CollectionViewHandler()
Method Detail

open

public void open(ViewActionEvent evt)
Toggles the viewer between the default view and the alternative view.

Specified by:
open in interface ViewActionListener
Parameters:
evt - the event - a double-click

showResults

public void showResults(ViewActionEvent evt)
Creates a new Frame, with the right type of ObjectViewer for the object, to display the new object. Places the new window to the right and just below the pointer.

Specified by:
showResults in interface ViewActionListener
Parameters:
evt - the event - a drop ?.

vacantDrop

public void vacantDrop(ViewActionEvent evt)
Creates a new Frame and ObjectViewer for the NakedCollection and places the window under the pointer.

Specified by:
vacantDrop in interface ViewActionListener
Parameters:
evt - the event - a drop.