org.nakedobjects.viewer.classic.view
Class AssociationViewer

java.lang.Object
  extended byorg.nakedobjects.viewer.classic.view.ObjectViewer
      extended byorg.nakedobjects.viewer.classic.view.RealObjectViewer
          extended byorg.nakedobjects.viewer.classic.view.AssociationViewer
All Implemented Interfaces:
java.util.Observer

public class AssociationViewer
extends RealObjectViewer

ObjectView used for objects being displayed as part of a Form. The object is held in the superclass xxxView, the enclosing object and the Field, which specifies what the object is for, is stored here


Field Summary
 
Fields inherited from class org.nakedobjects.viewer.classic.view.ObjectViewer
debug
 
Constructor Summary
AssociationViewer(NakedObject forObject, Association association, View defaultView, View alternativeView)
           
 
Method Summary
 boolean canDrop(DragDropEvent event)
           
protected  void debugData(java.lang.StringBuffer text)
           
 void drop(DragDropEvent event)
           
 Association getAttribute()
          The Attribute which this view is displaying
 NakedObject getAttributeOfObject()
          The object which contains the attribute which this view is displaying.
 java.lang.String toString()
           
 java.lang.String typeName()
           
 
Methods inherited from class org.nakedobjects.viewer.classic.view.RealObjectViewer
canDrag, copy, dispose, getMinimumSize, getObject, init, menuOptions, move, setObject, update
 
Methods inherited from class org.nakedobjects.viewer.classic.view.ObjectViewer
addOption, addView, addViewActionListener, checkClass, createDropObject, debugDetails, developerPopup, flipView, getBorderInsets, getBorderSize, getDisplay, getDisplayState, getView, idString, isResizable, minimize, newInstance, notifyActionView, open, popup, removeViewActionListener, results, setActive, setDisplay, setResizable, updateDisplayState, useView, vacantDrop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssociationViewer

public AssociationViewer(NakedObject forObject,
                         Association association,
                         View defaultView,
                         View alternativeView)
Method Detail

canDrop

public boolean canDrop(DragDropEvent event)
Overrides:
canDrop in class RealObjectViewer

debugData

protected void debugData(java.lang.StringBuffer text)
Overrides:
debugData in class RealObjectViewer

drop

public void drop(DragDropEvent event)
Overrides:
drop in class RealObjectViewer

getAttribute

public Association getAttribute()
The Attribute which this view is displaying


getAttributeOfObject

public NakedObject getAttributeOfObject()
The object which contains the attribute which this view is displaying. Note - the object itself, that is being displayed, is got through the xxView class


toString

public java.lang.String toString()
Overrides:
toString in class RealObjectViewer

typeName

public java.lang.String typeName()
Overrides:
typeName in class ObjectViewer
Returns:
java.lang.String